bitbag/adyen-plugin

Sylius Adyen payment gateway plugin.

Installs: 1 354

Dependents: 0

Suggesters: 0

Security: 0

Stars: 14

Watchers: 4

Forks: 1

Open Issues: 11

Type:sylius-plugin


README

Support

You can order our support on this page.

We work on amazing eCommerce projects on top of Sylius and Pimcore. Need some help or additional resources for a project? Write us an email on mikolaj.krol@bitbag.pl or visit our website! 🚀

Demo

We created a demo app with some useful use-cases of the plugin! Visit demo.bitbag.shop to take a look at it. The admin can be accessed under demo.bitbag.shop/admin link and sylius: sylius credentials.

Installation

$ composer require bitbag/adyen-plugin

Add plugin dependencies to your AppKernel.php file:

public function registerBundles()
{
    return array_merge(parent::registerBundles(), [
        ...
        
        new \BitBag\SyliusAdyenPlugin\BitBagSyliusAdyenPlugin(),
    ]);
}

Import routing in your app/config/routing.yml file:

# app/config/routing.yml
...

bitbag_sylius_adyen_plugin:
    resource: "@BitBagSyliusAdyenPlugin/Resources/config/routing.yml"

Import required config in your app/config/config.yml file:

# app/config/config.yml

imports:

   ...
   
   - { resource: "@BitBagSyliusAdyenPlugin/Resources/config/state_machine.yml" }

Settings

Signature for notifications

Settings for notifications

  • Sign in to the Customer Area and navigate to Settings > Server Communication.
  • For Standard notification click Edit & Test.
  • Required settings for transport
    • Set URL for notifications: https://{your_domain}/payment/adyen/notify
    • Set method: HTTP POST
  • Expand Additional Settings.
  • Click Generate New HMAC Key and copy the key to use it for your server configuration.
  • Click Save Configuration. The generated HMAC key is now in effect and is used to sign all newly generated notifications.

How to get HMAC keys for a skin

How to get code for a skin

  • Sign in to the Customer Area using your company-level account.
  • On the left navigation sidebar, click Skins.
  • Select an existing skin from the List and copy the contents of the skin code column

How to get Merchant account for a skin

  • Sign in to the Customer Area using your company-level account.
  • On the left navigation sidebar, click Skins.
  • Select an existing skin from the List and copy the contents of the Valid accounts column

Test card numbers

Usage

Running plugin tests

  • PHPSpec

    $ bin/phpspec run
  • Behat (non-JS scenarios)

    $ bin/behat --tags="~@javascript"
  • Behat (JS scenarios)

    1. Download Chromedriver

    2. Run Selenium server with previously downloaded Chromedriver:

      $ bin/selenium-server-standalone -Dwebdriver.chrome.driver=chromedriver
    3. Run test application's webserver on localhost:8080:

      $ (cd tests/Application && bin/console server:run 127.0.0.1:8080 -d web -e test)
    4. Run Behat:

      $ bin/behat --tags="@javascript"

Opening Sylius with your plugin

  • Using test environment:

    $ (cd tests/Application && bin/console sylius:fixtures:load -e test)
    $ (cd tests/Application && bin/console server:run -d web -e test)
  • Using dev environment:

    $ (cd tests/Application && bin/console sylius:fixtures:load -e dev)
    $ (cd tests/Application && bin/console server:run -d web -e dev)