Description
Apple Pay checkout fails when the storefront is opened in a Safari Private Browsing window. The Apple Pay button renders, but the payment session does not complete.
Steps to reproduce
- Open the storefront in Safari in a Private Browsing window.
- Add a product to the cart and go to checkout.
- Attempt to pay with Apple Pay.
Expected behaviour
The Apple Pay payment sheet opens and the payment completes normally, as it does in a regular Safari window.
Actual behaviour
The payment session fails/cancels (exact symptom not yet captured — see "Next steps" below).
Suspected root cause
The issue is most likely not the capability check in render() (swag-paypal.apple-pay.js#L29):
if (!window.ApplePaySession?.supportsVersion(4) || !window.ApplePaySession?.canMakePayments()) {
Apple's developer documentation states that canMakePayments() returns identically regardless of Private Browsing, so this check should pass either way.
The more likely fault line is the merchant validation step in handleValidateMerchant() (swag-paypal.apple-pay.js#L87-L99):
const { merchantSession } = await paypal.Applepay().validateMerchant({
validationUrl: event.validationURL,
displayName: this.options.displayName,
});
This is a live cross-origin network call from the browser to PayPal's Apple Pay validation endpoint, triggered via session.onvalidatemerchant. Safari Private Browsing's storage partitioning / Intelligent Tracking Prevention (blocked or partitioned cookies for cross-origin requests) is the prime suspect for breaking this call. This matches multiple reports on the Apple developer forums of onvalidatemerchant silently failing to fire, or oncancel firing immediately after session.begin(), in restrictive browsing contexts:
Next steps for whoever picks this up
The exact console error has not been live-reproduced yet. Please capture the browser console and network tab output when handleValidateMerchant() runs in a Private Browsing window, to confirm whether the validateMerchant request is being blocked/rejected by ITP/storage partitioning, or whether the failure occurs elsewhere (e.g. oncancel firing before onvalidatemerchant).
Environment
- Plugin: SwagPayPal (file:
src/Resources/app/storefront/src/checkout/swag-paypal.apple-pay.js)
- Browser: Safari, Private Browsing mode
Description
Apple Pay checkout fails when the storefront is opened in a Safari Private Browsing window. The Apple Pay button renders, but the payment session does not complete.
Steps to reproduce
Expected behaviour
The Apple Pay payment sheet opens and the payment completes normally, as it does in a regular Safari window.
Actual behaviour
The payment session fails/cancels (exact symptom not yet captured — see "Next steps" below).
Suspected root cause
The issue is most likely not the capability check in
render()(swag-paypal.apple-pay.js#L29):Apple's developer documentation states that
canMakePayments()returns identically regardless of Private Browsing, so this check should pass either way.The more likely fault line is the merchant validation step in
handleValidateMerchant()(swag-paypal.apple-pay.js#L87-L99):This is a live cross-origin network call from the browser to PayPal's Apple Pay validation endpoint, triggered via
session.onvalidatemerchant. Safari Private Browsing's storage partitioning / Intelligent Tracking Prevention (blocked or partitioned cookies for cross-origin requests) is the prime suspect for breaking this call. This matches multiple reports on the Apple developer forums ofonvalidatemerchantsilently failing to fire, oroncancelfiring immediately aftersession.begin(), in restrictive browsing contexts:Next steps for whoever picks this up
The exact console error has not been live-reproduced yet. Please capture the browser console and network tab output when
handleValidateMerchant()runs in a Private Browsing window, to confirm whether thevalidateMerchantrequest is being blocked/rejected by ITP/storage partitioning, or whether the failure occurs elsewhere (e.g.oncancelfiring beforeonvalidatemerchant).Environment
src/Resources/app/storefront/src/checkout/swag-paypal.apple-pay.js)