Open dimitriBouteille opened 1 year ago
When no delivery method is available, Apple Pay suggests using the error with the following code: addressUnserviceable
The code that indicates that the merchant can’t provide service to the shipping address (for example, can’t deliver to a P.O. Box).
if (result.length === 0) {
reject({
newTotal: {
label: this.getMerchantName(),
amount: formatAmount(getCartSubtotal() * 100),
},
errors: [new ApplePayError('addressUnserviceable')],
});
return;
}
Why this error, Apple Pay display generic message
Same issue for authorization step :(
Describe the bug
When no delivery method is available, the following message is displayed:
There are no shipping methods available for you right now. Please try again or use an alternative payment method.
https://github.com/Adyen/adyen-magento2-express-checkout/blob/cf8ef25d64120c90e7e7a7ac49719cbe884adadc/view/frontend/web/js/applepay/button.js#L261
Unfortunately this error is never displayed ...
When I check Adyen component ApplePayService and Apple Pay document,
reject('My error')
is not valid.Obviously the
reject
function must be called with an object containing the following information :An example that works: Adyen - Step 4: Configure the callback to handle shipping method changes
To Reproduce
Payment not completed
:boom: Redirected back to the checkout, no error message displayed (Magento)
Expected behavior
Error message must be displayed in Apple Pay sheet.
Why all
reject
callback are called with string ? Is this on purpose?