Adyen / adyen-magento2

Adyen Payment plugin for Magento2
MIT License
154 stars 208 forks source link

HPP Payment methods not refreshing on payment country change #314

Closed Stoux closed 5 years ago

Stoux commented 5 years ago

Magento version: 2.2.5 Community Plugin version: 2.3.1 Description We're experiencing an issue where the Payment methods of the HPP widget don't update when the user updates their country. For example we have Bancontact active only for Belgium.

  1. Go to the checkout
  2. Enter your payment details
  3. Select Belgium
  4. Continue to review & payments
  5. You'll see Bancontact show up as an option
  6. Return to shipping
  7. Select Netherlands
  8. Continue to review & payments
  9. It still shows Bancontact
  10. Refresh the page (chrome will keep Netherlands in the form)
  11. Bancontact will be gone

Here's a video showing the issue: https://drive.google.com/file/d/1saZznePYRFt23qlBJm9sIUoMOhsT_A_o/view?usp=sharing Steps 4 - 11 are visible starting @ 1:30

rikterbeek commented 5 years ago

Hi @Stoux,

Thanks for letting us know. Indeed I see that the initialize() method is not called when you go back and forward. This is not what we would expect as this page is reloaded again. We need to check if we can move the logic of getting the payment methods from the initialize to the getAdyenHppPaymentMethods because that one is called as it is defined in the template. If you have any better idea let us know we can incorporate this into the change.

Regards, Rik Adyen

awojtczyk commented 5 years ago

We are getting wrong methods for the guest checkouts aswell.

Stoux commented 5 years ago

Hi @rikterbeek,

Sadly I don't know enough of the internals of this module to give you any meaningful advice. I do however believe it has been fixed as I can't replicate the behaviour anymore.