ruudk / payment-adyen-bundle
A Symfony2 Bundle that provides access to the Adyen API. Based on JMSPaymentCoreBundle.
Installs: 1 728
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 4
Forks: 8
Type:symfony-bundle
Requires
- php: ^5.3.2|^7.0
- jms/payment-core-bundle: ~1.0
- kriswallsmith/buzz: >=0.7
- symfony/framework-bundle: ~2.0
README
A Symfony2 Bundle that provides access to the Adyen API. Based on JMSPaymentCoreBundle.
Installation
Step1: Require the package with Composer
php composer.phar require ruudk/payment-adyen-bundle
Step2: Enable the bundle
Enable the bundle in the kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Ruudk\Payment\AdyenBundle\RuudkPaymentAdyenBundle(), ); }
Step3: Configure
Add the following to your routing.yml:
ruudk_payment_adyen_notifications: pattern: /webhook/adyen defaults: { _controller: ruudk_payment_adyen.controller.notification:processNotification } methods: [GET, POST]
Add the following to your config.yml:
ruudk_payment_adyen: merchant_account: Your merchant account skin_code: Your skin code secret_key: Your secret key test: true/false # Default true logger: true/false # Default true timeout: the timeout in seconds # Default 5 shopper_locale: the locale Adyen should use # Default null methods: - ideal - mister_cash - giropay - direct_ebanking - credit_card # amex,visa,mc
Make sure you set the return_url
in the predefined_data
for every payment method you enable:
$form = $this->getFormFactory()->create('jms_choose_payment_method', null, array( 'amount' => $order->getAmount(), 'currency' => 'EUR', 'predefined_data' => array( 'adyen_ideal' => array( 'return_url' => $this->generateUrl('order_complete', array(), true), ), 'adyen_giropay' => array( 'return_url' => $this->generateUrl('order_complete', array(), true), ), // etc... ), ));
See JMSPaymentCoreBundle documentation for more info.