Set up the plugin in Magento

Install Adyen's plugin for Magento, and configure it in your Magento admin panel. 

Step 1: Install the plugin

Adyen's plugin for Magento is open-source and available on GitHub. The GitHub repository is connected to Packagist, so you can easily include it in your project through Composer.

Before you begin, make sure that you have installed Composer. In your terminal, go to the Magento folder and run the following commands:

  1. Install the plugin:

    composer require adyen/module-payment
  2. Enable the plugin: 

    bin/magento module:enable Adyen_Payment
  3. Execute the update scripts:

    bin/magento setup:upgrade
  4. Flush cache storage:

    bin/magento cache:flush

    If you are using a caching layer such as Varnish, you need to exclude the following URL pattern from being cached: /adyen/process/*.

Step 2: Run cron

To process notifications, our webhook service, you need to have cron running on your server. For instructions on how to set up cron in Magento, refer to Configure and run cron.

The cron job generation time interval for the adyen_payment group is set to 1 minute. 

Step 3: Configure the plugin in Magento 

Before you begin, make sure that you have set up your Adyen Customer Area.

Configure the Adyen plugin in your Magento admin panel: 

  1. Log in to your Magento admin panel. 
  2. In the left navigation bar, go to Stores > Configuration
  3. In the menu, go to Sales > Payment Methods.
  4. Click Required Settings and fill out the following fields: 
Field Description

Name of your Adyen merchant account for which the payments will be processed.

Select whether you want to use test or production mode.

Your user name for notifications from Adyen Customer Area (*).

Your password for notifications from Adyen Customer Area (*).

Your web service (ws) username from Adyen test Customer Area (*).

Your web service (ws) password from Adyen test Customer Area (*).

Your web service (ws) username from Adyen live Customer Area (*).

Your web service (ws) password from Adyen live Customer Area (*).

The capture delay that you set in Adyen Customer Area.

Possible values:

  • manual – Select this if you set capture delay to manual (manual capture).
  • immediate – Select if you set capture delay to immediate, or to some fixed number of days (automatic capture).

Only applicable to payments processed with the redirect method: status given to orders before receiving an AUTHORISATION notification from Adyen.

For more information, refer to Order management.

Only applicable to payments with manual capture: status given to orders after receiving a successful AUTHORISATION notification from Adyen.

For more information, refer to Order management.

Status given to orders after the payment has been completed. When this happens depends on whether the capture is manual or automatic.

  • Manual capture: after receiving a successful CAPTURE notification from Adyen.
  • Automatic capture: after receiving a successful AUTHORISATION notification from Adyen.

For more information, refer to Order management.

Status given to orders after receiving one of the following notifications from Adyen:

Select Yes to enable debug logging on the Magento server.

(*) You noted this down when you set up Adyen Customer Area.

Step 4 (optional): Configure advanced settings

Configure the advanced settings for the plugin: 

  1. Log in to your Magento admin panel. 
  2. In the left navigation bar, go to Stores > Configuration
  3. In the menu, go to Sales > Payment Methods.
    Below the Required Settings section, you can find sections for configuring several advanced settings, explained below. 

Magento order processing

In the Magento Order Processing section, you can configure the following fields: 

Field Description
Use manual capture for PayPal

Select Yes if you want to use manual capture for your PayPal integration.

To change this setting, you first need to contact our Support Team.

Use auto-capture for OpenInvoice payments

Select Yes if you want to use automatic capture for your open invoice payment methods (Klarna, AfterPay, and Ratepay).

To change this setting, you first need to contact our Support Team.

Order status: payment capture (virtual products)

Status given to orders of virtual products after payment is confirmed. By default, this is the same as for normal products.

Order status: pending Bank Transfer/SEPA orders

Status given to orders after receiving a PENDING notification from Adyen (**).

Send order confirmation email for Bank Transfer/SEPA

Select Yes to send a confirmation email to the shopper, after you received a PENDING notification from Adyen (**).

Sepa Payment flow

Choose the payment flow that you want to use for SEPA payments.

Possible values:

  • Sale – Use immediate automatic capture for SEPA payments. This is the default setting.
  • Auth/Cap – Use the value that you set for Capture Delay in Adyen Customer Area.

(**) PENDING notifications. By default, Adyen does not inform your Magento store about pending payments. To set up these notifications:

  1. Log in to Adyen Customer Area. 
  2. Go to Account > Server Communication.
  3. Next to BankTransfer Pending Notification and Direct-Debit Pending Notification, click Add
  4. In the URL box, enter your website URL followed by /adyen/process/json.
  5. Select the Active checkbox.
  6. Set Method to JSON.
  7. In the User Name and Password boxes, enter the user name and password for your Adyen notifications. 
    You noted this down when you set up Adyen Customer Area.
  8. Click Save Configuration.

Adyen Payment Notifications

This setting is only relevant if you perform offline refunds in Magento. 

If you already made an offline refund in Magento, and then make the same refund in the Adyen Customer Area, two credit memos may be created. To prevent this from happening, you can choose to ignore the REFUND notifications from Adyen: 

  1. Click Advanced: Adyen Payment Notifications
  2. Set Ignore refund notification to Yes. 

For more information about refunds, refer to Issue a refund.

Billing Agreements

Adyen can securely store payment details of your shoppers, allowing you to offer recurring payments.

For a list of payment methods for which recurring payments are available, refer to the  Payment methods .
For credit cards, you can use stored payment details for  the following types of transactions: 

  • One-click transactions – To complete the transaction, the shopper needs to enter their CVC/CVV. 
  • Recurring transactions – You can complete the transaction without the shopper being present.

Each of the above requires a specific type of recurring contract. To determine the type of recurring contract you want to use, click Advanced: Billing Agreements, and select the Agreement Type that you want to use.

Possible values: 

  • NONE – Do not enable stored payment methods.
  • ONECLICK – Enable stored payment methods for one-click transactions, where the shopper needs to enter their CVC/CVV to complete the payment.
  • RECURRING – Enable stored payment methods for recurring transactions, where you can complete the payment without the shopper being present.
  • ONECLICK, RECURRING – Enable stored payment methods for both one-click and recurring transactions.

Manual Review

Adyen's RevenueProtect allows you to configure rules for assigning a risk score to each payment transaction. Payments with a risk score above a certain threshold are automatically refused. In addition, you have the option to manually review payments that have triggered some fraud rules, but do not yet meet the threshold for automatic refusal.

To set up manual review, you first need to request our Support Team to enable this functionality. In your request, let us know what should happen at the following decision points in the manual review process:

  1. A payment with manual capture is accepted: capture, or no action
  2. A payment is rejected: cancel or refund, or no action
  3. You have not made a decision on a payment, and the authorisation is about to expire: cancel or refund, or capture

Once you have confirmation from Adyen Support that manual review is enabled for your account, you can start using it in Magento.

In Magento, you can optionally set a separate status for orders under manual review. For that, go to Manual Review in the Advanced section, and configure the following settings: 

Field Description

Status given to orders after receiving an AUTHORISATION notification, indicating that the order has come under manual review.

Manual Review Accepted Status

Status given to orders after receiving a MANUAL_REVIEW_ACCEPT notification from Adyen. Only applicable if you chose to perform no action after accepting a payment under manual review.

Split Payment

This setting is only relevant if you want to partially refund split payments. 

When you accept gift cards on the Adyen platform, your shopper can pay a part of the transaction amount with their gift card, and the remaining amount with another payment method. In case of a partial refund, you can customize how the individual payments are refunded. 

Go to Advanced: Manual Review, and select the strategy you want to use. 

 Possible values:

  • Refund from first payment first – The shopper's first payment is refunded first. 
  • Refund from last payment first – The shopper's last payment is refunded first. 
  • Refund based on ratio – The payments are refunded in proportion to the split. 

For example, your shopper paid 100 euros in three parts, in the following order: 

  1. 20 euros with gift card A.
  2. 50 euros with gift card B.
  3. 30 euros with credit card.

If you want to refund 60 euros to the shopper, the above strategies would result in the following refunds: 

  • Refund from first payment first – 20 euros to gift card A, and 40 euros to gift card B. 
  • Refund from last payment first – 30 euros to the credit card, and 30 euros to gift card B. 
  • Refund based on ratio – 12 euros to gift card A, 30 euros to gift card B, and 18 euros to the credit card. 

Next steps

Set up the payment methods in Magento

Set up the payment methods you wish to offer in your Magento admin panel.

link

Test and go live

Test your integration, and start processing live transactions.

link