Adyen / adyen-magento2-express-checkout

Adyen Magento 2 Express Checkout Module
MIT License
11 stars 6 forks source link

Add shipping methods into Apple Pay Express #117

Closed maxparkergene closed 1 month ago

maxparkergene commented 2 months ago

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

candemiralp commented 2 months ago

Hello @maxparkergene,

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

Best Regards, Can