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 . To install the plugin:

  1. Download the latest version of our Adyen plugin available on GitHub.
  2. Extract the contents from the downloaded file.
  3. Upload only the content that's inside the extracted folder (magento-x.x.x) and move it to the root folder of your Magento installation.
  4. Verify the folder and file permissions of the uploaded files.
  5. In your Magento admin panel, go to System > Cache Management.
  6. In the upper-right corner of the screen, click Flush Cache Storage.
  7. If you are already logged in to your Magento backend, log out, and then log in again.

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

If your hosting provider is running PHP in CGI mode, you need to enable HTTP Basic Authentication by adding the following rules to the .htaccess file in the Magento root directory:

RewriteEngine on:
RewriteCond %{HTTP:Authorization} (.+)
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]

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 main menu, go to System > Configuration
  3. In the left navigation bar, go to Sales > Payment Methods.
  4. Click on the Default Settings for Adyen.
  5. In the required Required Settings section, fill out the following fields:  

Field Description
Merchant Account

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

Test/Production Mode

Select whether you want to use test or production mode.

Notification User Name
Your user name for notifications from Adyen Customer Area (*).
Notification Password

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

Test: Web Service Username

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

Test: Web Service Password

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

Test: Api-Key Your API key from Adyen test Customer Area (*) .
Live: Web Service Username

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

Live: Web Service Password

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

Live: Api-Key Your API key from Adyen live Customer Area (*) .
Live: Endpoint URL prefix

The URL prefix [random]-[company name] from your Adyen live Customer Area > API URLs and Response. For more information, refer to Checkout endpoints.

Capture Delay

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).
Order status: order creation

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.

Order status: payment authorisation

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 .

Order status: payment confirmed

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.
Order status: order cancellation

Status given to orders after receiving a successful CANCEL_OR_REFUND notification from Adyen.

Enable debug logging

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 main menu, go to System > Configuration
  3. In the left navigation bar, go to Sales > Payment Methods.
  4. Click on the Default Settings for Adyen.

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: Adyen refunded Status given to orders after receiving a REFUND notification from Adyen.
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 (**).

Select Yes to create a pending invoice, after you received an AUTHORISATION notification from Adyen.

Select Yes to send a capture request to Adyen, after you do a shipment.

Enable Uncancel Order If you the order is cancelled, but you received an AUTHORISATION notifcation from Adyen, this will automatically uncancel the order.
Invoice email Select Yes to enable update emails.
Receive order status update email (deprecated)

DEPRECATED Select Yes to enable update emails for all order status changes to the shopper.

(**) 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 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  – Y ou 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.

Checkout experience

Field Description
Redirect destination after cancellation

Determines how shoppers get redirected after they cancel a payment. Possible values:

  • Cart
  • Checkout
Payment method render method

Select whether the payment methods will be displayed with their logo, or just the name.

Language locale (optional)

This overrides the default shopper locale of the Magento store. Leave empty to let Magento decide (Ex: nl_NL)

ISO Country Code (optional) This overrides the shopper billing address country when determining what payment methods to display.

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
Manual Review Status

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

After you have configured the plugin, set up the payment methods in your Magento admin panel.

link  

Test and go live

Test your integration, and start processing live transactions.

link