Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple Pay - error message never displayed #59

Open
dimitriBouteille opened this issue Nov 9, 2023 · 2 comments · May be fixed by #69
Open

Apple Pay - error message never displayed #59

dimitriBouteille opened this issue Nov 9, 2023 · 2 comments · May be fixed by #69

Comments

@dimitriBouteille
Copy link
Contributor

dimitriBouteille commented Nov 9, 2023

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.

reject($t('There are no shipping methods available for you right now. Please try again or use an alternative payment method.'));

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 :

  • errors: ApplePayError[]
  • newTotal: ApplePayLineItem

An example that works: Adyen - Step 4: Configure the callback to handle shipping method changes

To Reproduce

  • Selected shipping address with any shipping method
  • Wait 30s for Apple Pay to validate the shipping address (onShippingContactSelect call reject function)
  • Apple Pay display Payment not completed
  • Apple Pay close payment sheet

💥 Redirected back to the checkout, no error message displayed (Magento)

image

Expected behavior

Error message must be displayed in Apple Pay sheet.


Why all reject callback are called with string ? Is this on purpose?

@dimitriBouteille
Copy link
Contributor Author

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

Capture d’écran du 2023-11-09 09-38-47

@dimitriBouteille
Copy link
Contributor Author

Same issue for authorization step :(

@dimitriBouteille dimitriBouteille linked a pull request Dec 13, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant