ruudk/payment-adyen-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

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

1.2.0 2015-10-25 11:40 UTC

This package is auto-updated.

Last update: 2022-02-01 12:27:52 UTC


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.