Adyen - Installation and Configuration
To integrate Adyen into your project, first you need to install and configure the Adyen module. This topic describes how to do that.
Installation
To install the Adyen module, run
composer require spryker-eco/adyen
Configuration
General Configuration
You can find all necessary configurations in vendor/spryker-eco/adyen/config/config.dist.php
The table below describes all general configuration keys and their values.
Configuration Key | Type | Description |
$config [AdyenConstants::MERCHANT_ACCOUNT] | string | Name of the merchant account |
$config [AdyenConstants::REQUEST_CHANNEL] | string | Name of the communication channel with Adyen, has to be "Web" |
$config [AdyenConstants::SDK_CHECKOUT_SECURED_FIELDS_URL] | string | JS SDK URL to encrypt Credit Card secure fields |
$config [AdyenConstants::SDK_CHECKOUT_ORIGIN_KEY] | string | Origin key of JS SDK that generated based on project base URL |
$config [AdyenConstants::MULTIPLE_PARTIAL_CAPTURE_ENABLED] | bool | Defines if multiple capture is enabled. "false" by default |
$config [AdyenConstants::SOCIAL_SECURITY_NUMBER_COUNTRIES_MANDATORY] | array | List of countries with SSN mandatory |
$config [AdyenConstants::IDEAL_ISSUERS_LIST] | array | List of iDeal issuers |
$config [AdyenApiConstants::API_KEY] | string | API key, provided by Adyen |
$config [AdyenApiConstants::GET_PAYMENT_METHODS_ACTION_URL | string | URL for getting available payment methods via an API call |
$config [AdyenApiConstants::MAKE_PAYMENT_ACTION_URL] | string | URL for making payment via an API call |
$config [AdyenApiConstants::PAYMENTS_DETAILS_ACTION_URL] | string | URL for payment details via an API call |
$config [AdyenApiConstants::AUTHORIZE_ACTION_URL] | string | URL for authorizing via an API call |
$config [AdyenApiConstants::AUTHORIZE_3D_ACTION_URL] | string | URL for authorizing via 3D API call |
$config [AdyenApiConstants::CAPTURE_ACTION_URL] | string | URL for capturing via an API call |
$config [AdyenApiConstants::CANCEL_ACTION_URL] | string | URL for canceling via API call |
$config [AdyenApiConstants::REFUND_ACTION_URL] | string | URL for refunding via an API call |
$config [AdyenApiConstants::CANCEL_OR_REFUND_ACTION_URL] | string | URL for canceling or refunding an API call (when it's not possible to know if payment is already captured) |
$config [AdyenApiConstants::TECHNICAL_CANCEL_ACTION_URL] | string | URL for technical cancellation via an API call |
$config [AdyenApiConstants::ADJUST_AUTHORIZATION_ACTION_URL] | string | URL for adjusting and authorized amount via an API call |
Specific Configuration
The table below describes specific payment method configuration keys and their values. These configurations are also available in vendor/spryker-eco/adyen/config/config.dist.php
Configuration Key | Type | Description |
$config [AdyenConstants::SOFORT_RETURN_URL] | string | URL to return customer after payment with Sofort |
$config [AdyenConstants::CREDIT_CARD_3D_RETURN_URL] | string | URL to return customer after passing the 3D secure |
$config [AdyenConstants::IDEAL_RETURN_URL] | string | URL to return customer after payment with iDeal |
$config [AdyenConstants::PAY_PAL_RETURN_URL] | string | URL to return customer after payment with PayPal |
$config [AdyenConstants::ALI_PAY_RETURN_URL] | string | URL to return customer after payment with AliPay |
$config [AdyenConstants::WE_CHAT_PAY_RETURN_URL] | string | URL to return customer after payment with WeChatPay |
$config [AdyenConstants::CREDIT_CARD_3D_SECURE_ENABLED] | bool | Defines if 3D secure is enabled for Credit Card payments |
Having specified necessary configuration keys, add payment methods to State Machine (OMS) configuration in the following file:
$config[OmsConstants::PROCESS_LOCATION] = [
...
APPLICATION_ROOT_DIR . '/vendor/spryker-eco/adyen/config/Zed/Oms',
];
$config[OmsConstants::ACTIVE_PROCESSES] = [
...
'AdyenCreditCard01',
'AdyenSofort01',
'AdyenDirectDebit01',
'AdyenKlarnaInvoice01',
'AdyenPrepayment01',
'AdyenIdeal01',
'AdyenPayPal01',
'AdyenAliPay01',
'AdyenWeChatPay01',
];
$config[SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING] = [
...
AdyenConfig::ADYEN_CREDIT_CARD => 'AdyenCreditCard01',
AdyenConfig::ADYEN_SOFORT => 'AdyenSofort01',
AdyenConfig::ADYEN_DIRECT_DEBIT => 'AdyenDirectDebit01',
AdyenConfig::ADYEN_KLARNA_INVOICE => 'AdyenKlarnaInvoice01',
AdyenConfig::ADYEN_PREPAYMENT => 'AdyenPrepayment01',
AdyenConfig::ADYEN_IDEAL => 'AdyenIdeal01',
AdyenConfig::ADYEN_PAY_PAL => 'AdyenPayPal01',
AdyenConfig::ADYEN_ALI_PAY => 'AdyenAliPay01',
AdyenConfig::ADYEN_WE_CHAT_PAY => 'AdyenWeChatPay01',
];
To complete the payment modification requests (cancel, capture, refund), it's necessary to configure notification on Adyen merchant Backend side.
What's next?
Once you are done with the installation and configuration of the CrefoPay module, integrate Adyen into your project.
Last review date: November, 16th, 2018