Adyen / adyen-magento2-express-checkout

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

Cannot select shipping method in Apple Pay payment sheet #106

Closed pignion closed 1 month ago

pignion commented 2 months ago

Describe the bug When using Apple Pay from the shopping cart, I cannot select a shipping method, even when Magento provides multiple shipping methods. The first shipping method provided by Magento is automatically chosen.

To Reproduce Steps to reproduce the behavior:

  1. As a guest user, add an item to the cart
  2. Go to the shopping cart
  3. Click the Apple Pay button
  4. In the payment sheet, select a shipping address that will return multiple shipping methods from Magento

Expected behavior

Actual behavior

Screenshots

Screenshot 2024-08-28 at 12 19 52 PM

Desktop (please complete the following information):

Smartphone (please complete the following information):

Adyen Versions

Additional context The ApplePaySession's completeShippingContactSelection should be called with all available shipping methods, which will cause them to show up as options on the payment sheet, according to the Apple Documentation

When I step through button.js and get to the point where the shipping methods are retrieved from Magento, I can see multiple shipping methods returned, but they seem to be being discarded.

I can see pretty clearly here where Adyen's Express Payment javascript is selecting the first available method rather than checking to see what shipping method has been selected in Magento:

pignion commented 2 months ago

Additional Information: I've confirmed that when I downgrade to 2.0.0, I can see shipping methods, so this appears to be a regression in 2.1.0 onward, where I can reproduce the issue.

maxinestewart commented 2 months ago

Any update @adyen-packagist when this will be resolved? it is impacting our client's website

candemiralp commented 1 month ago

Hello @pignion,

Thank you for reporting this issue in details. As I see, @maxparkergene has already created a pull request for this bug. We will review and merge the fix soon.

Best Regards, Can