Apple Pay is a mobile payment method developed by Apple. Its integration with PrestaShop Checkout allows your customers to pay via this service.
| ⚠️ Apple Pay is available for versions 1.7 and 8 of PrestaShop. |
How to configure Apple Pay for PrestaShop Checkout
First and foremost, ensure that you are using the latest version of PrestaShop Checkout. To do this, navigate to your back office in the module manager menu.
Here are the configuration steps:
Click on "Configure" the module. Then go to the Payment Settings tab. Locate the Enable Payment Methods section and click on the Edit button.
You will find the Apple Pay option there; enable it if it is not already done, and click on "Configure".
3. Click on "Save your domain."
4. PrestaShop Checkout will check if the domain verification file is available on your server to use Apple Pay. For troubleshooting if the domain file is not available, please refer to the Troubleshooting section below.
5. Then, register your Apple Pay domain on your PayPal account.
Once the verification is successful, you will see a confirmation message on your PrestaShop Checkout interface.
After the successful registration of your domain, Apple Pay will function fully on your PrestaShop store.
Note: If the automatic registration fails, you may attempt to manually register your domain within PayPal. Please contact PrestaShop PayPal support if you encounter any difficulties. (Production or Sandbox).
Troubleshooting the domain when the registration file is not available.
The module uses the moduleRoutes to automatically expose the domain verification file through a dynamic route.
Breakdown of issues.
1. Point in the URL access path:
- 2. By default, Nginx and certain server configurations may block URLs containing a point in dynamic routes. 3. This is a common security feature to prevent access to unintended files.
- 4. The routing system of PrestaShop may not handle these URLs correctly if the platform is not installed in the root directory.
2. Installation without root:
- If PrestaShop is installed in a subdirectory (for example, https://example.com/shop/), the moduleRoutes may not correctly map the path /.well-known/.
3. Server-specific behavior:
- Apache often handles these routes via .htaccess rules, but Nginx requires explicit configurations to allow access to .well-known.
Possible options:
1. Placement of static files
If possible, bypass dynamic routing by statically placing the apple-developer-merchantid-domain-association file in the .well-known directory of your domain's root directory:
Steps:
- Create the .well-known directory at the root of your server.
- Place the file apple-developer-merchantid-domain-association there.
- Configure your server to serve the " .well-known " directory if necessary.
Advantages: completely avoids routing issues.
Disadvantages: requires manual placement of files.
Custom Nginx configuration.
For Nginx servers, explicitly allow access to the .well-known URLs:
Add the following block to your Nginx configuration:
location /.well-known/ {
allow all;
root /path/to/prestashop/root;
}Advantages: allows for dynamic management and supports the routing system of PrestaShop.
Disadvantages: requires server-level access to modify configurations.
Download and host the domain association file for the sandbox.
- Production: https://paypalobjects.com/devdoc/apple-pay/well-known/apple-developer-merchantid-domain-association
- Sandbox: https://paypalobjects.com/devdoc/apple-pay/sandbox/apple-developer-merchantid-domain-association
Frequently Asked Questions
I conducted payment tests and they are not being accounted for, what should I do?
Caution during payment tests in production.
Apple Pay payments are processed as card payments; they are subject to a fraud detection system that utilizes AI to analyze user behavior and transaction data in order to calculate a risk score.
Payments with low amounts and test product data are classified as suspicious and may trigger a transaction block. The card number may be blacklisted for a few hours.
For payment testing, it is advisable to use sandbox mode or to conduct an authentic transaction with a real product in the cart. It should be noted that if payment attempts have been made, it is advisable to change the card in case the system has already recorded this card as potentially fraudulent (only for a few hours).