Troubleshooting Apple Pay on the Web integration

Consult the following troubleshooting tips if you have any issues with Apple Pay on the Web integration.

Procedure

  • All code is written so that Apple Pay can be deployed to any store. If you encounter issues such as JavaScript methods not found, review the following guide.

    The following resources that have a dependency on the Aurora starter store. Ensure that you implement your own versions of the Aurora starter store code that is being called from the Apple Pay helper code.

    1. ProductDisplay.js (setEntitledItems, getCatalogEntryId): Gets a valid catalogEntryId after the shopper selects attributes for all defining attributes.
    2. MessageHelper.js (displayErrorMessage): Displays error messages in the storefront.
    3. MiniShopCartDisplay.js (setDeleteCartCookie): Clears the shopping cart cookie after an order completes successfully.
    4. PhysicalStoreCookieJS getStoreIdsFromCookie: Sets the physical store location that is selected by the shopper.
    5. ApplePay.js: Contains the following dependencies:
      • For the mini shopping cart, toggleApplePayButtonInMiniCart() checks for the existence of some DOM elements to determine if items are in the shopping cart. If items are in the shopping cart, then the Apple Pay button is displayed. Otherwise, it is not displayed. Accordingly, change the code to determine whether your mini cart contains items.
      • For Buy online, pick-up in store, getBOPISParameters() and validateBOPISParameters() checks for the existence of some DOM elements that are in the Aurora shopping cart page. The function looks for hidden elements that have the shipModeId for pickUpInStore, and orderItemId. If your shopping cart page is not based on Aurora, those elements do not exist. Accordingly, replace these methods with your custom store implementation.
  • If the Apple Pay button is not displayed after you place all the code in your store, ensure that all of the following conditions are met:
    1. Ensure that you are using the Safari web browser on an Apple device that has the proper OS support for Apple Pay on the Web.
    2. Ensure that the current store page is served over HTTPS.
    3. Ensure that your iPhone or iPad supports touch authentication and that it is enabled.
    4. Ensure that there is at least one credit card that is saved in the iPhone or iPad.