Sylius Adyen payments integration.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 5409327 May 14, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
etc/build first commit Jan 10, 2018
features first commit Jan 10, 2018
spec first commit Jan 10, 2018
src Cleanup Jan 15, 2018
tests first commit Jan 10, 2018
.gitignore Repairing tests Jan 15, 2018
.travis.yml Repairing tests Jan 15, 2018
README.md Update README.md May 13, 2018
behat.yml.dist first commit Jan 10, 2018
composer.json Update composer.json Jan 10, 2018
composer.lock Repairing tests Jan 15, 2018
easy-coding-standard.neon first commit Jan 10, 2018
node_modules first commit Jan 10, 2018
phpspec.yml.dist first commit Jan 10, 2018
phpunit.xml.dist first commit Jan 10, 2018

README.md


Support

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)