Openfoodnetwork: Stripe SCA Payments fail in the backoffice

Created on 12 Apr 2020  路  9Comments  路  Source: openfoodfoundation/openfoodnetwork

Description


New orders placed under /admin/orders/new fail, and display an error using Stripe as a payment method (pics below).

Expected Behavior

Stripe payments should work, also in the backoffice.

Actual Behaviour

Error messages are displayed with Stripe-SCA and Stripe-Connect (pics below)

Steps to Reproduce




  1. Login as admin to a shop or hub and go to /admin/orders/new
  2. Create a new order for a given customer. Make sure this customer/user allows charges on a credit card or add one, under the user's account, /account -> Credit Cards. Place a Check under Authorised Shops, for the respective shop.
  3. Fill the necessary details, and proceed to Payment Methods
  4. Select a Stripe payment method and add the respective credit card data, allowed by the user.
  5. Press Update -> The error messages (below) should be displayed.

Animated Gif/Screenshot



with Stripe-SCA:
image.png

with Stripe-Connect:
image.png

Workaround

  • Using other payment methods.
  • The user places the order himself in the shopfront, where Stripe works.

Severity

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

Your Environment

  • This was fist observed on FR-staging, with the release v2.9.2
  • Browser name and version: Firefox 75
  • Operating System and version (desktop or mobile): Ubuntu 18.04

Possible Fix


Perhaps worth checking this on another server other than FR-staging, with the release v2.9.2.

bug-s3

All 9 comments

We need to verify if this is actually broken or not...

Ok, apparently this is confirmed broken in v2.9.2, but it looks like we haven't been manually checking this case during release testing?

I can't see anywhere obvious that Stripe or admin orders has been touched in this release, so it might be useful to validate whether or not this issue is present in v2.9.1?

This case isn't covered by automated tests either, and apparently doesn't trigger an alert in Bugsnag! I think we need to prioritise #4639 soon

Hey @Matt-Yorkley,

I investigated this a bit further and staged this latest release v2.9.2, as well as v2.9.0 and v2.8.2 in Katuma. The issues above exist in previous releases and therefore are not caused by this last one, so good news.

Further observations:

  • Stripe-Connect: the second pic (above) shows the absence of the input fields, for the card's data, which does not really allow to manually test if this payment method works. This is a display issue. Deleting Stripe SCA payment method (one radio button less in the pics above) allows inserting the card data and yields a successful Stripe payments.
  • Stripe SCA: payments fail in the backoffice - as already confirmed in production.

So basically, Stripe SCA payments don't work in the backoffice but Stripe-Connect payments do. For that reason I've changed the title of the bug - I am pinging @lin-d-hop and @RachL who were following the the discussion on Slack.

I wonder if PR #4786 also has a positive impact on this issue @luisramos0. I feel I should prioritize this test and find out.

And you are right Matt, #4639 is of importance. Also relevant, as we once discussed, to automatize different card types #5014. I hope to be able to progress on this soon.

great testing Filipe!
For now, StripeSCA is beta, so we should separate the issues with StripeSCa and StripeConnect clearly.
No StripeSCA issue will be an S2 for now.
This was marked as S2 so, can we consider the scope of this issue to be StripeConnect?

I think it can still be an S2, right? I am not sure I understand what do you mean by "Changing Payment Methods configurations, namely the order in which they appear". Can you clarify?

Maybe we should create a separate issue for StripeSCA.

This is broken since #4757
I havent flagged that BO payments had to be tested there because I forgot about it.

We will need a small patch to adapt StripeSCA BO payments. Basically, the payments are done in two steps: authorize and confirm. The BO code is still not aware of that for StripeSCA payments.

Another case we need to test is when we cancel a StripeSCA payment in the Backoffice.

I didn't think of testing this in the BO either - this was @lin-d-hop's great release-testing catch :muscle:
Adding "cancelling stripe SCA payments in the BO" to our test suite, thanks for pointing this out @luisramos0

@lbwright22 this issue is about Stripe SCA the new stripe payment method that I believe you are not using yet.

Was this page helpful?
0 / 5 - 0 ratings