adyen-magento2 icon indicating copy to clipboard operation
adyen-magento2 copied to clipboard

reloading checkout page on payment step does not preserve payment method selection

Open speedupmate opened this issue 3 years ago • 4 comments

Describe the bug Reloading checkout page on payment step does not preserve payment method selection

To Reproduce Steps to reproduce the behavior:

  1. Go to checkout fill address, shipping and reach payment step
  2. select adyen_hpp related method from payment method list
  3. reload the page and observe if the selected method is still selected

Expected behavior Reloading checkout page on payment step should preserve payment method selection. Test with any built in method

Magento version all

Plugin version all

Additional context

https://github.com/Adyen/adyen-magento2/blob/4e33ad9771fbacc73a40b5330024634573a65d66/view/frontend/web/template/payment/hpp-form.html#L42

As expected by frontend API (defined by defaults) payment method selection element id needs to be the payment method code . Adyen implements "subCodes" that pretend to be virtual payment methods on frontend level and thus the methods can't be selected by default after page load .

speedupmate avatar Feb 04 '22 12:02 speedupmate

Hi @speedupmate,

Thank you for opening this issue. This would be a valuable improvement. As this is not a previously existing functionality I will mark it as an Enhancement. This will be picked up once we have room in our backlog.

Cheers, Titus

tnaber avatar Feb 09 '22 14:02 tnaber

Hi @speedupmate,

Thank you for opening this issue. This would be a valuable improvement. As this is not a previously existing functionality I will mark it as an Enhancement. This will be picked up once we have room in our backlog.

Cheers, Titus

Should be noted that this is default functionality for all standard payment methods that follow the proper best practices for creating Magento 2 payment methods. This issue is only introduced because of the non-standard way the module handles alternative payment methods.

GamesmenJordan avatar Feb 10 '22 06:02 GamesmenJordan

@tnaber

I only bumped against all those issues cause I had to make it work for a customer. And the priority you set is fine with me as I was just giving feedback .

And overall feedback not related only to this issue: What I did observe was that out of all the issues reported you would have none if you just get your virtual items with backend requests. You need few plugins for payment method related methods to do that and after that you could just delete 99% of the js you have for the frontend and depend on defaults (like payment template from free payment method and just the default.js api for everything else with 1% being your custom method handling). All virtual payment methods would get a real payment method code and would appear to system as real methods if virtualised in backend level.

I understand that this is probably too much to change but whenever you decide to revamp the whole extension just go that route instead and leave the frontend as default as possible.

speedupmate avatar Feb 10 '22 08:02 speedupmate

Coming to that issue after having to implement that for our stores too. @speedupmate is right for me, please investigate on his opinion. AFAIK Adyen already reported somewhere in that repository that a decision to implement all methods with real Magento payment methods is taken. I see that as more urgent than "low priority", as that change will effect on the ROI of companies/developers basing their work on the current implementation, and the current one is actually seriously UX affecting, in my opinion. Commenting to stay in touch.

kanevbg avatar Feb 10 '24 22:02 kanevbg