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

Add shipping methods into Apple Pay Express #117

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

maxparkergene
Copy link

@maxparkergene maxparkergene commented Sep 23, 2024

Summary

Currently when using Apple Pay Express if there are multiple shipping methods available all but the first are ignored and you cannot change your shipping method.

Changed the onShippingContactSelect to pass the full array of returned shipping methods into the afterSetTotalsInfo. This function then checks if the parameter is an array and if it is will set the newShippingMethods so that all shipping methods can be used.

The onShippingMethodSelect hasn't been changed and that still passes the single shipping method into the afterSetTotalsInfo function as we don't need to change the shipping methods on this callback.

Tested scenarios

Tested with Apple Pay using a sandbox Adyen account for delivery addresses with multiple, a single and no shipping methods available.

Adobe Commerce Version: 2.4.5-p9
Adyen Payments: 9.7.1
Adyen Express Checkout: 2.2.1

Fixes #106

@maxparkergene maxparkergene requested a review from a team as a code owner September 23, 2024 11:09
@candemiralp
Copy link
Member

Hello @maxparkergene,

Thank you for your contribution. We will merge this PR after reviewing it.

Best Regards,
Can

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 this pull request may close these issues.

Cannot select shipping method in Apple Pay payment sheet
3 participants