Skip to content

Cart updates do not cause reinitialisation of payment methods #139

@pdredge

Description

@pdredge

Describe the bug
Payment methods not reinitialised on cart update.

When using the one page checkout if a user does an interaction that would cause the cart to update then the payment methods are not reinitialised. This means that if a user selects a payment method, for example CC, without selecting a shipping option they are presented with an error. When the user then selects a shipping option the error persists in the payment option field and can only be cleared by selecting a new payment option or refreshing the page.

To Reproduce
Steps to reproduce the behavior:
On a Hyva site checkout using onepage checkout and adyen/module-hyva-checkout module

  • Add an item to the basket and go to the checkout
  • Enter user details but do not select a shipping method
  • Select a payment option (eg. Credit Card) and press place order
  • The user is presented an error (correctly)
  • Select a shipping method and scroll back to payment section
  • The error still persists and is not removed by selecting a new shipping option

Expected behavior
Any action that updates the cart, such as selecting shipping option, adding discount codes etc to cause the payment methods to be reinitialised.

Magento version
2.4.6-p13

Plugin version
1.3.0

Screenshots

Error before entering address
Image

Error after address is entered and method is selected
Image

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions