Adyen / adyen-magento2-hyva

MIT License
7 stars 4 forks source link

Possibly originating in Hyva: Switching between addresses for Guest #29

Closed pmarjan-onestic closed 7 months ago

pmarjan-onestic commented 8 months ago

In Hyva checkout, when a guest user is changing the country in the address section, the list of payment method updates according to the available methods for the given country.

Based on this functionality, and suppose GooglePay is available only for Spain:

But then, when switching back, the magewire component

Adyen\Hyva\Magewire\Payment\Method\GooglePay

that matches the block checkout.payment.method.adyen_googlepaythat loads the GooglePay component is NOT found, thus the Adyen component is not rendered.

pmarjan-onestic commented 8 months ago

I made an attempt to load the component, as in the description, when coming back to a country that would allow the payment method, but was not successful about it.

Therefore, I went with an alternate behavior: if a method is not available for a given country - do NOT remove it from the list, but display a message for the customer. (This is still in conflict with other non-adyen methods which would hide anyway)

I am not greatly convinced that this is a good idea, but the gist of it is visible in the cast below, and coding available on the keep-methods-listed branch.

Guest-Switching-Address-Version-Keep-Methods-Listed-Branch.webm

@candemiralp @RokPopov please review and let me know what you think?

pmarjan-onestic commented 8 months ago

@candemiralp @RokPopov

I think we have a solution now.

Please keep in mind, that this is the case that looks specifically for Guests. Customers cases are part of other ticket.

pmarjan-onestic commented 8 months ago

The associated commit has some issues with it, and is reverted in latest develop. The ticket will be reopened.

pmarjan-onestic commented 7 months ago

Solved with recent commit. Can be closed.