Openfoodnetwork: Flash error "The payment could not be processed. The payment could not be completed" when customers provide payment authorization

Created on 14 May 2021  路  6Comments  路  Source: openfoodfoundation/openfoodnetwork

Description


Despite payment success, the customer sees a red flash error indicating that "The payment could not be processed. The payment could not be completed", after using the received link per email to payment provide authorization.

Refreshing the page displays:
"The payment could not be processed. Invalid payment state: succeeded"

Note that navigating to other pages displays the error as well - this is the "memory effect" bug #7600.

Expected Behavior

If the payment is successful the flash error should not be displayed.

Actual Behaviour

A successfully authorized payment (verified in Stripe) triggers a misleading flash error to the user.

Steps to Reproduce




As an admin:

  1. Create a BO order and add a Stripe SCA payment using the x-3184 card

As a customer:

  1. Log in as the respective customer
  2. Take the link received per email and paste it into the customers browser session
  3. Click "Complete Authentication"
  4. See the error "The payment could not be processed. The payment could not be completed."
  5. Refresh the page.
  6. See the error "The payment could not be processed. Invalid payment state: succeeded"

Animated Gif/Screenshot


Peek 2021-05-14 09-53

After refreshing the page, as a customer, the error changes to:

image

Workaround

Proposing:
bug-s2: a non-critical feature is broken, no workaround

Severity

Your Environment

  • Version used: v3.7.1
  • Browser name and version: Firefox 88
  • Operating System and version (desktop or mobile): Desktop Ubuntu 20.04

Possible Fix

Maybe related to #7614.

bug-s2

All 6 comments

I think this is a regression and maybe a release blocker. It does not occur in staging-AU which currently has this commit https://github.com/openfoodfoundation/openfoodnetwork/commit/86729697985a41eff526c15bc0ae6e1c2143841c staged in it.

Peek 2021-05-14 10-19

I did a bit of hunting and found the relevant Bugsnag: https://app.bugsnag.com/open-food-france/coopcircuits/errors/604b10a984971c00080d5b95?filters[event.since][0][type]=eq&filters[event.since][0][value]=30d&filters[error.status][0][type]=eq&filters[error.status][0][value]=open&filters[search][0][type]=eq&filters[search][0][value]=succeeded

Wait... is that the right one? @filipefurtad0 can you remember which server did you encountered this on?

Yes, that seems right @Matt-Yorkley - it was in staging-FR and staging-UK. That bugsnag would match :+1:

Are we 100% sure this wasn't already in the last release? :grimacing:

I'm not 100% sure... I double checked staging-AU which (according to Semaphore) has 8672969 and it's not occurring there.

I just had a crash-course with @sauloperez on Ansiable and deploying previous releases to staging servers, but I have not tried these superpowers just yet :smile:

So... we just confirmed that reverting https://github.com/openfoodfoundation/openfoodnetwork/pull/7562 fixes this issue. We'll need to take a look at it. It's already in production.

Was this page helpful?
0 / 5 - 0 ratings