shivella / ideal-bundle
Symfony iDeal Bundle
Installs: 2 413
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.4
- mollie/mollie-api-php: 1.8.x
- symfony/framework-bundle: ^2.7 || ^3.1
Requires (Dev)
- matthiasnoback/symfony-dependency-injection-test: ^1.0
- phpunit/phpunit: 4.*
- symfony/form: ^2.7 || ^3.1
Suggests
- ruudk/payment-mollie-bundle: Please migrate from shivella/ideal-bundle to ruudk/payment-mollie-bundle
This package is not auto-updated.
Last update: 2020-01-26 01:14:51 UTC
README
Please consider using: https://github.com/ruudk/PaymentMollieBundle
Mollie iDeal bundle
This Symfony3 bundle adds support for iDEAL payments by Mollie. It is using Mollie-php-api. A Mollie account is required.
For more information see Mollie
Installation
Installation is a quick 3 step process:
- Download ideal-bundle using composer
- Enable the Bundle in AppKernel.php
- Configure your Mollie credentials
Step 1: Download ideal-bundle using composer
Add UsoftIDealBundle by running the command:
$ composer require shivella/ideal-bundle
Step 2: Enable the Bundle in AppKernel.php
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Usoft\IDealBundle\UsoftIDealBundle(), ); }
Step 3: Configure Mollie credentials
# app/config/config.yml # ideal Mollie usoft_i_deal: mollie: key: secret_mollie_key description: "Mollie payment"
Usage in Controller
<?php // Acme/Bundle/OrderController.php public function paymentAction(Request $request) { $form = $this->createForm(IdealType::class); $form->handleRequest($request); if ($form->isValid()) { $mollie = $this->get('mollie'); $bank = new Bank($form->get('bank')->getData()); $amount = (float) 120.99; return $mollie->execute($bank, $amount, 'route_to_confirm_action'); } return $this->render('payment.html.twig', ['form' => $form->createView()]); } /** * @Route("/order/confirm", name="route_to_confirm_action") * * @param Request $request */ public function confirmAction(Request $request) { if ($this->get('mollie')->confirm($request)) { // handle order.... } else { // Something went wrong... } }