-
Notifications
You must be signed in to change notification settings - Fork 16
Home
Welcome to the adyen-prestashop wiki!
Our plugin for PrestaShop allows you to accept credit cards and local payment methods on your PrestaShop website.
You can find the Adyen Payment plugin for PrestaShop here or in PrestaShop Marketplace
- Credit cards – Accept credit card payments on your website and mobile application, without redirecting to an external website. Sensitive cardholder data is collected securely using our Custom Card Component, which reduces your PCI DSS-compliance requirements.
- Dynamic 3D Secure 2 authentication, including AVS checks.
- Local payment methods – Accept local payment methods including iDEAL, Sofort, Klarna, giropay, Google Pay, and many others.
- Tokenization – Offer returning shoppers a faster checkout experience by saving their card details.
- Revenue Protect - Use our risk management system to identify and block fraudsters, while reducing friction for legitimate shoppers. You can either fully automate the risk management process, or add manual review for certain payments.**
As of 31 December 2021 no bug fixes or new features will be released for PrestaShop 1.6.x.
After 31 December 2022, you will not be able to use our plugin with PrestaShop 1.6.x.
This documentation reflects the latest version of the plugin. You can find the latest version on GitHub. Our plugin supports the following:
- PrestaShop version 1.7.0.0 or later.
- PrestaShop version 1.6.x (deprecated). Please reach out to your sales manager if you are using this version.
We cannot offer support if you are not using the default PrestaShop checkout. We do not recommend customizing the plugin, because this could make it harder to upgrade and maintain your integration. If you decide to customize, we recommend that you:
- Keep track of the custom code added to your integration.
- Create an issue on GitHub if you want to request a new feature for the plugin.
Before you begin to integrate, make sure you have followed the Get started with Adyen Guide to:
- Get an overview of the steps needed to accept live payments.
- Create your test account.
You have the following options for installing the plugin:
- Download from PrestaShop Marketplace: This is the easiest option, however it's only available if you're in France or Spain.
- Download from GitHub: The easiest option if you're not in France or Spain.
- Install with Composer: An advanced option only recommended for developers.
For authenticating API requests from PrestaShop, you need to provide an API key.
To generate an API key for your test environment:
- Log in to your Customer Area.
- Go to Developers > API credentials, and select the credential username for your integration, for example [email protected].
- Under Authentication, select Generate New API Key.
- Copy and securely store the API key in your system — you won't be able to restore it later.
- If your API key is lost or compromised, you need to generate a new one.
- Select Save at the bottom of the page.
To get an API key for your live environment, follow the same steps in your live Customer Area.
You will need to add the test and live API keys in the PrestaShop back office as described in Step 5.
The plugin needs the client key to show the input fields for card details.
The client key is linked to one or more allowed origins — the domains from which we expect to get your client-side requests. For example, if you're collecting shopper's payment information at: https://example.org/checkout, you would need to link the domain https://example.org as an allowed origin to your client key.
To generate a client key:
- Log in to your Customer Area.
- Go to Developers > API credentials, and select the credential username for your integration, for example [email protected].
- Add your domains under Allowed origins. These are the domains from which you will be sending your client-side requests.
- Under Authentication, select Generate New Client Key.
- Select Save at the bottom of the page.
You now have a client key for your test environment. To get a client key for your live environment, follow the same steps in your live Customer Area.
You will need to copy the test and live client keys and add them in the PrestaShop back office as described in Step 5.
Adyen uses notification webhooks to let your PrestaShop platform know whether the payment was successful, and to move the order to the next phase or cancel it. In this way, you are always informed of payment status changes, even with payment methods where the shopper completes the payment after they leave your online store.
To set up notifications in your Adyen account:
- Log in to your Customer Area with your company-level account.
- Go to Developers > Webhooks.
- In the upper-right corner, select the + Webhook button.
- Next to Standard notification, select Add.
- Under Transport:
- At URL enter your website URL followed by module/adyenofficial/Notifications.
- Select the Active check box.
- Set Method to JSON.
- Under Authentication:
- Enter your User Name and Password for basic authentication.
- Add these authentication credentials in your PrestaShop back office as described in Step 5.
- Under Additional Settings:
- Select Generate new HMAC key.
- Securely store the HMAC key in your system.
- Add the HMAC Key in your PrestaShop back office as described in Step 5..
- Select Save Configuration. Contact our Support Team to enable OFFER_CLOSED notifications as part of your standard notifications.
In your PrestaShop back office, go to:
- Modules and Services if you are using version 1.6.
- Modules > Module Manager if you are using version. In the Payment section, find Adyen and select Configure. 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 (live) mode. |
Notification Username | This can be any username, as long as it matches the username for basic authentication that you entered in your Adyen Customer Area |
Notification Password | This can be any password, as long as it matches the password for basic authentication that you entered in your Adyen Customer Area. |
HMAC key for notifications | This is the HMAC key that you generated in your Adyen Customer Area |
Secure token for cron job | A token generated when you installed the plugin. This secures your endpoint. Underneath we show your website URL with the token attached. You need this URL plus token when you set up a cron job for processing notifications. In case you want to regenerate the token, delete the current token from the text box and save the configuration with an empty value. This will generate a new token. |
Process notifications upon receiving them | When you enable this feature, the plugin processes queued notifications after receiving them. Alternatively, you can set up a cron job. |
API key for Test | The API key from your test Customer Area. |
API key for Live | The API key from your live Customer Area. |
Client key for Test | The client key from your test Customer Area. |
Client key for Live | The client key from your live Customer Area. |
Live endpoint prefix | The URL prefix [random]-[company name] from your live Customer Area > Developers > API URLs. For more information, refer to Checkout endpoints. |
Enable stored payment methods | Enable if you want shoppers to be able to store and use their payment details during checkout for payment methods that support one click payments. |
Apple Pay merchant name | Name of your Adyen merchant account for which the payments will be processed. |
Apple Pay merchant identifier | The Authorisation MID value. For test, this is in your test Customer Area > Payment methods > Apple Pay. For production (live), this is in your live Customer Area > Payment methods > Apple Pay. |
Google Pay gateway merchant ID | Name of your Adyen merchant account for which the payments will be processed. |
Google Pay merchant identifier | The Authorisation MID value in your live Customer Area > Payment methods > Google Pay. When testing, you can use any value. |
Collapsable payment display | Only available in PrestaShop version 1.6. Enable if you want the payment methods to be rendered in a collapsable section during checkout. |
Adyen checkout styling | Enable to include the default Adyen styling in the checkout page. Disable to customize the styling of the checkout page. |
Integrator Name | The name of the system integrator, in case you are using one. |
- In your PrestaShop back office, go to:
- Localization > Translations if you are using version 1.6 of PrestaShop.
- International > Translations if you are using version 1.7 of PrestaShop
- Under Type of translation select Installed modules translations.
- If you are using version 1.7 of PrestaShop select the Adyen module.
- Identify the language to be modified and select Modify.
- After modifying a translation select Save and stay or Save.
If an original translation contains special syntax, such as %d or %s, the modified translation should also contain the same special syntax.
To enable a payment method, you need to add it in your Customer Area.
On your PrestaShop platform, to correctly render the payment methods on your checkout page, the displayPaymentTop hook must be present. This call is enabled by default and it is initiated from the following template files:
Version 1.6: {$HOOK_TOP_PAYMENT}
in themes/default-bootstrap/order-payment-classic.tpl
Version 1.7: {hook h='displayPaymentTop'}
in themes/classic/templates/checkout/_partials/steps/payment.tpl
For most payment methods, this is enough to have them rendered by the plugin.
The following payment methods need some additional configuration:
Buy now, pay later (open invoice) payment methods like Klarna and Afterpay require a billing and shipping address. To ensure your shoppers understand what data you are collecting:
- In your PrestaShop back office, go to International > Translations.
- Open the shop forms labels for your language and enter localized address line labels to collect the street name and the house number or name. For example, for English:
- First address line with the ID Address: Change the label to Street.
- Second address line with the ID Address Complement: Change the label to House number or name.
- Select Save.
- Repeat for all languages you are using.
With the default PrestaShop configuration, to find labels:
- Go to the International/Translations page.
- From the Type of translation drop-down menu, select Theme Translations.
- Look under Shop > Forms > Labels.
To accept Apple Pay payments with Adyen's PrestaShop plugin, you need to:
- Follow the instructions to enable Apple Pay with your own certificate.
- Fill out the Apple Pay merchant name and Apple Pay merchant identifier fields in your PrestaShop back office.
Apple Pay is only available in the Safari browser.
As described previously, you should set up webhook notifications to receive important updates about the payment status. While the plugin offers an option to process the notifications upon receiving them, it may cause your server to try processing them too often and thus use extra resources.
To avoid that, you need to set up a cron job and run it every minute. PrestaShop doesn't provide a cron service so you need to create a job outside of PrestaShop.
-
Use the cron utility on your Linux instance or an external cron job service to create a cron job that runs every minute and calls your website URL. This must be the URL with the secure token attached, as shown under the Secure token for cron job field in the admin panel (see set up the plugin in your PrestaShop back end ).
-
Test whether the cron job works correctly:
- Enable the cron job.
- Place a test order with a successful payment.
- Verify that you have a new log file adyen_notification.log in your /logs/adyen folder. It can take a few minutes before the file appears.
After you have installed and configured the plugin, you can validate the setup.
- Log in to your PrestaShop back office.
- Go to Modules and services > Adyen Validator if you are using version 1.6 of PrestaShop.
- Go to Modules > Adyen Module > Validator if you are using version 1.7 of PrestaShop.
- Select Validate.
The validator checks the following:
- The database tables required by the plugin have been created.
- The configuration values required by the plugin have been added to the
ps_configuration
database table, and these values are not empty. - The order statuses required by the plugin have been added to the
ps_order_state
database table. - All hooks required by the plugin have been successfully registered.
If everything is set up correctly, you will see a message with a green overlay. If something is incorrect, you will see an error message with a red overlay. Go to Advanced Parameters > Logs to view more details if the validation is not successful.
The validation only checks if there are empty configuration values in the plugin configuration fields. It does not validate if the values in the input field are correct.
After you've set up the plugin, use our test card numbers to make test payments.
After your test payments, look up the payment status in your Customer Area. If a transaction has been refused due to a high risk score, consider making adjustments to your risk profile scoring.
To enable standard refunds:
- Log in to your PrestaShop back office.
- Go to Merchandise returns under the Orders menu if you are using version 1.6 of PrestaShop.
- Go to Merchandise returns under the Customer service menu if you are using version 1.7 of PrestaShop.
- Activate the Product returns option.
- Select Save.
To issue a standard refund:
In the menu, go to Orders > Orders to open the Orders overview page, and select the order you want to refund. In the Orders section, select Standard Refund. Select the check box under the Refund column of the products to be refunded. Select Generate a credit slip. (Optional) Select Repay shipping costs to also refund the shipping cost. Select Refund products at the bottom of the page to issue the refund.
To issue a partial refund:
- Log in to your PrestaShop back office.
- In the menu, go to Orders > Orders to open the Orders overview page, and select the order you want to refund.
- In the Orders section , select Partial Refund.
- Under Products, enter:
- Quantity: The number of items refunded. This must be a whole number.
- Amount: (Optional) The refund amount. If left empty, it is the maximum applicable amount including taxes.
- Optionally select:
- Re-stock products: The quantity of the refunded items you specified will be added back in stock.
- Generate a voucher: Issue a voucher instead of a refund payment. The voucher code is automatically sent to the shopper's email address. Issue the refund: At the bottom of the page, select Partial Refund. After issuing the refund, the order status changes to Refunded and a credit slip is generated.
When the payment for an order has been completed (the order status is updated to Payment Accepted), PrestaShop automatically sends an order confirmation email to the shopper.
The order confirmation email is the only email that is sent by default. You can also configure other status updates to trigger emails, and customize the text in the email.
On PrestaShop version 1.6, shoppers paying with a redirect payment method (such as iDEAL, or a card payment that was routed to 3D Secure 1) will already get the order confirmation email when being redirected to the payment page. This means that a shopper might get the order conformation email, even though they did not complete the payment.
To make sure that the email sent to the shopper is accurate, you can customize the order confirmation email to say that you are waiting for the payment to completed.
To send an email to the shopper when their order status has changed:
- Log in to your PrestaShop back office.
- Version 1.6 of PrestaShop: Under the Orders menu, go to Statuses.
- Version 1.7 of PrestaShop: Under the Shop Parameters menu, go to Order settings. Then, select the Statuses tab.
- Select the status for which you want to configure an email.
- Select the Send an email to the customer when his/her order status has changed option. A Template drop-down menu will appear.
- Select the email template to be sent when the order is updated to this status. The email template determines which information is included in the email, for example product details, or additional information about the shipping. You can additionally customize the text in each template.
To customize the text in an email template:
- Log in to your PrestaShop back office.
- Version 1.6 of PrestaShop: Under the Localization menu, go to Translations.
- Version 1.7 of PrestaShop: Under the International menu menu, go to Translations.
- From the Type of translation drop-down menu, select Email Translations.
- Version 1.7 of PrestaShop: Select the type of email content to modify. Select the language to customize.
- Select Modify. This opens the Translations page.
- Select Core emails.
- Select the email template that you want to customize, and whether you want to modify the HTML or the TXT version.
- Make your changes, then select Save.
If you are already using an Adyen PrestaShop plugin version earlier than 2.1.0 and want to use the latest version, proceed as follows:
- Uninstall the existing Adyen plugin.
- In the Configure drop-down menu select Uninstall if you are using version 1.6 of PrestaShop.
- In the Upgrade drop-down menu select Uninstall if you are using version 1.7 of PrestaShop.
- Manually remove the /adyen folder from the /modules folder.
This is necessary because the plugin name has changed from
adyen
toadyenofficial
. - Install the latest plugin version as described in Step 1: Install the plugin.
- Configure the latest plugin version as described in Step 4: Set up the plugin in PrestaShop back office.
When you reinstall the plugin, the plugin takes care of most of its configurations and functions except for the items listed below. We recommend that you follow the steps here to make sure that when you reinstall the plugin, it won't pick up settings from a previous installation.
- Order statuses
The plugin keeps the Waiting for payment and Payment needs attention order statuses because existing orders might still use them. If you would also like to remove these statuses, first make sure that these are no longer in use.
To check if these statuses are still in use:
- Go to the Orders page in your PrestaShop admin panel.
- Filter the orders for the Waiting for payment and Payment needs attention order statuses.
- If there are any, move them to another status that you would like to use.
When there are no more orders using these statuses, you can delete these statuses from your order status list.
- Configurations
The plugin keeps the ADYEN_OS_WAITING_FOR_PAYMENT and ADYEN_OS_PAYMENT_NEEDS_ATTENTION configuration fields in your database in case there are still orders in your system with the corresponding statuses. If you have already removed the statuses, you can also remove these leftover configurations.
In your PrestaShop back office, go to:
- Modules and Services > Adyen Logs if you are using version 1.6 of PrestaShop.
- Modules > Adyen Module > Logs if you are using version 1.7 of PrestaShop. If you also want to include log files that are not related to Adyen, select the Include all log files check box. Select Download.
To find the logs for PrestaShop:
- Version 1.6: In your PrestaShop root folder, go to
/log/adyen
- Version 1.7: In your PrestaShop root folder, go to
/var/logs/adyen
-
Installation and setup
- Step 1: Install the plugin
- Step 2: Generate an API key
- Step 3: Generate a client key
- Step 4: Set up notifications
- Step 5: Set up Capture Delay
- Step 6: Set up the plugin in PrestaShop back office
- Step 7: Set up payment methods
- Step 8: Set up a cron job
- Step 9 (optional): Validating the plugin
- Step 10: Make test payments
- Updating from a version earlier than 2.1.0
- Reinstalling the plugin
- Logs
- Go-live checklist
- Upgrade the Plugin
- Troubleshooting