Enable Apple Pay on the Web Using a LINK Cartridge
If the merchant enables Apple Pay through a LINK cartridge, the merchant must meet minimum requirements.
The merchant must:
- have a supported iOS device
- create an Apple Developer account
- become a member of the iOS Developer program
- be running Xcode 6.1 or later
In Xcode, enable Apple Pay under Capabilities in your Project Settings and enable both Apple Merchant IDs.
- update the LINK cartridge
Salesforce B2C Commerce Extensions
B2C Commerce provides the constant METHOD_DW_APPLE_PAY to the new Apple Pay system Payment Method.
B2C Commerce provides hooks for payment authorization:
- dw.extensions.applepay.getRequest
- dw.extensions.applepay.prepareBasket
- dw.extensions.applepay.shippingContactSelected
- dw.extensions.applepay.shippingMethodSelected
- dw.extensions.applepay.paymentAuthorized.createOrder
- dw.extensions.applepay.paymentAuthorized.authorizeOrderPayment
- dw.extensions.applepay.paymentAuthorized.placeOrder
- dw.extensions.applepay.paymentAuthorized.failOrder
- dw.extensions.applepay.cancel
- dw.extensions.paymentapi.beforeAuthorization (If not implemented, custom data will neither be included in the request nor handled in the response as before.)
- dw.extensions.paymentapi.afterAuthorization (If not implemented, custom data will neither be included in the request nor handled in the response as before.)
- applepay.prepareBasket
- applepay.shippingContactSelected
- applepay.shippingMethodSelected
- applepay.paymentMethodSelected
- applepay.cancel
The API class dw.extensions.applepay.ApplePayHookResult indicates error reasons.
The <isapplepay> ISML tag injects a default black Apple Pay button into the HTML page.
You can use the following CSS class names on pages where Apple Pay for the Web is enabled:
- dw-apple-pay-button
- dw-apple-pay-mini-cart
- dw-apple-pay-cart
- dw-apple-pay-logo-white
- dw-apple-pay-border
Testing Your Apple Pay on the Web Implementation
You use the Apple Pay Sandbox to test integration and payment sheet configuration. For more details, see Apple Pay Sandbox Testing (at https://developer.apple.com/support/apple-pay-sandbox/).