Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues when switching payment methods #51

Open
jansentjeu opened this issue Sep 11, 2024 · 2 comments
Open

Issues when switching payment methods #51

jansentjeu opened this issue Sep 11, 2024 · 2 comments
Assignees

Comments

@jansentjeu
Copy link

jansentjeu commented Sep 11, 2024

Describe the bug
When you switch payment methods, the error message "We are sorry, this method is temporarily unavailable" appears. This is due to the event listeners on event "checkout:payment:method-activate". When you have clicked on a payment method, this listener is set for it. When you then click on another payment method, a listener is also set for this. However, the event listener is now also triggered for one payment method while you click on another payment method.

See attached screenshots

To Reproduce
Steps to reproduce the behavior:

  1. Go to the checkout
  2. Click on a payment method. For example iDeal
  3. Now click on another payment method. For example Billie
  4. Error is shown

Expected behavior
Billie is activated and no error message is shown

Magento version
2.4.7-p2

Plugin version
1.0.0

Screenshots
image

Schermopname.2024-09-11.om.10.37.44.mov

Additional context
Besides this issue I have the following question. What is the reason to call the init function in the "checkout:payment:method-list-boot" event listener? See for example view/frontend/templates/payment/method-renderer/adyen-default-method.phtml line 19. This is called for the previous payment method when you switch. I don't think this should happen since you would set the AdyenPaymentHandler to the previous payment method value and also the activatePaymentMethod function.

@candemiralp
Copy link
Member

Hello @jansentjeu,

Thank you for creating this issue. We will check the points that you have mentioned and get back to you soon.

Best Regards,
Can

@candemiralp candemiralp self-assigned this Nov 8, 2024
@fzemmel
Copy link
Contributor

fzemmel commented Jan 14, 2025

Any news on this issue?
Unmounting and initializing the ‘checkout:payment:method-list-boot’ event also forces payment methods with input fields (e.g., credit card details) to reset those fields. For example, if I fill out the credit card details and then use the coupon field, the ‘checkout:payment:method-list-boot’ event is dispatched, causing my credit card details to be cleared.
This primarily presents a UX issue, as it disrupts the user experience by requiring the user to re-enter their information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants