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

Failed checkout shows incorrect error message #5895

Closed
mkllnk opened this issue Aug 11, 2020 · 3 comments · Fixed by #5906
Closed

Failed checkout shows incorrect error message #5895

mkllnk opened this issue Aug 11, 2020 · 3 comments · Fixed by #5906
Assignees
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround.

Comments

@mkllnk
Copy link
Member

mkllnk commented Aug 11, 2020

Description

During checkout the payment can fail for several reasons, for example:

  • Invalid card number.
  • Invalid expiry date.
  • Invalid CVC.
  • Insufficient funds.
  • ...

The first failure is shown correctly, but for subsequent failures the checkout page shows a previous error message.

Expected Behavior

The error message shown tells the reason for the most recent failure.

Actual Behaviour

The error message is often related to previous payment failures.

Steps to Reproduce

There are two symptoms of this issue:

Error showing twice

  1. Choose a shop, add an item to the cart and fill in the checkout page.
  2. Enter an invalid card number: 4444 3333 2222 1111
  3. Enter a valid expiry date and a random cvc: 123
  4. Click on checkout and observer the error message.
  5. Click on the main OFN logo to go back to the homepage and observe the same error message.

Wrong error on the checkout page

  1. Choose a shop, add an item to the cart and fill in the checkout page.
  2. Enter an invalid card number: 4000000000000002
  3. Enter a valid expiry date and a random cvc: 123
  4. Click on checkout and observer the error message.
  5. Enter a card number for incorrect cvc: 4000000000000127
  6. Observe the previous error message "invalid card" instead of "invalid cvc".

Animated Gif/Screenshot

memory_effect_Stripe_connect

Recorded by @filipefurtad0 for his comment on another issue: #5785 (comment)

Workaround

Load another page before checking out again to see the correct error. Otherwise, just check out with a valid card. 😉

Severity

bug-s3: a feature is broken but there is a workaround

Your Environment

  • Version used: v3.2.1

Possible Fix

It's likely a problem with the flash error message. The flash is either not cleared or set twice.

@mkllnk mkllnk self-assigned this Aug 11, 2020
@mkllnk mkllnk added the bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. label Aug 11, 2020
@mkllnk mkllnk removed their assignment Aug 13, 2020
@Matt-Yorkley Matt-Yorkley self-assigned this Aug 14, 2020
@Matt-Yorkley
Copy link
Contributor

Matt-Yorkley commented Aug 14, 2020

Okay, so the two parts of this bug are:

  1. If an error / flash message is generated with a failed card, then a second card is tried (and has an error), the previous message is shown instead of the new message.
  2. Subsequently moving to a different page shows the flash message again, and it shouldn't

I've just been trying this on Aus Staging with v3.2.2 deployed, and I can't replicate the first part of this bug (subsequent messages not shown correctly) with Stripe SCA, but I can replicate with Stripe Connect...

@luisramos0
Copy link
Contributor

nice!
@filipefurtad0 has been talking about the "memory effect" for a few weeks now, this is it 🎉

@filipefurtad0
Copy link
Contributor

Yes, that's it! Thank you for opening this issue @mkllnk! 👍

I could not reproduce this for Stripe-SCA either @Matt-Yorkley . But it seems to affect other flash messages as well, like on the cart page for example, after stock levels being reduced while on the checkout page:

flash_memory

Hope this helps further in tackling this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants