Openfoodnetwork: Multiple successful stripe payments captured for the same order

Created on 30 Jun 2020  路  11Comments  路  Source: openfoodfoundation/openfoodnetwork

Description

Most of us are not convinced that #5663 fixed #5662 so I think we need this issue to track the problem in Katuma.

I believe #5703 is a new attempt at fixing this problem. Right @Matt-Yorkley

Expected Behavior

Actual Behaviour

Steps to Reproduce




1.
2.
3.
4.

Animated Gif/Screenshot


Workaround

Severity

Your Environment

  • Version used:
  • Browser name and version:
  • Operating System and version (desktop or mobile):

Possible Fix

bug-s1 prod-test v3-regression

Most helpful comment

I think we can close this one yes.
Re the new issue for idempotent requests, yes we can create a tech debt issue.

All 11 comments

Yes :+1:

If you look very carefully through the erorrs here: https://app.bugsnag.com/katuma/katuma/errors/5ef235fc2dfe230018a3c3b8?filters[event.since][0][type]=eq&filters[event.since][0][value]=7d&filters[error.status][0][type]=eq&filters[error.status][0][value]=open it's obvious there are some very serious problems, and multiple checkout submissions _per request_ seems to be one of them. I haven't quite figured out why that is happening, but I think the messy transaction rollback is the crux of it.

For the record, Eugeni successfully placed an order with the affected hub but all the timestamps are there. You migh want to check it out @Matt-Yorkley . It's the number R443016306.

See here the options he selected

photo6041840391067644865

With the "save default shipping address" option, did they have a default address saved on that account before placing this order?

Maybe removing the timestamp constraints was alleviating the worse bits of the problem?

With the "save default shipping address" option, did they have a default address saved on that account before placing this order?

We'll need to ask Eugeni

Maybe removing the timestamp constraints was alleviating the worse bits of the problem?

I assume so

Could the Stripe/ActiveMerchant idempotency_key option help here too when capturing payments?

Looks like this is fixed by #5703 but we can keep an eye on it.

Thanks @cillian for that. I think that's a great idea. We have a strategy in place already in #5703 and also #5678 but that is definetely something we should consider if we bump into this issue again.
https://stripe.com/docs/api/idempotent_requests
ping @sauloperez fyi

Yep, thanks a lot @cillian . Sorry, I said nothing but I kept that comment on my things to review. The name alone sounds pretty good. Do you have any experience with it?

Maybe we can make a new issue to look at idempotent requests with Stripe, and close this one? It seems like this issue is resolved...

I think we can close this one yes.
Re the new issue for idempotent requests, yes we can create a tech debt issue.

@sauloperez no problem. A bit, so I could try do a spike on it at some point maybe.

Was this page helpful?
0 / 5 - 0 ratings