[traceback] Error handler: Could not record Bango success (webpay transaction expired)

RESOLVED WONTFIX

Status

Marketplace
Payments/Refunds
P2
normal
RESOLVED WONTFIX
5 years ago
5 years ago

People

(Reporter: krupa, Assigned: Andy McKay)

Tracking

All
Gonk (Firefox OS)
Points:
---

Details

(Reporter)

Description

5 years ago
I hit this traceback in my Firefox OS while making a (carrier billing) purchase using T-mobile SIM from POland. Isaw it only on the first purchase. All other future purchases worked fine.

sentry: http://sentry.dmz.phx1.mozilla.com/addons/marketplace-dev-webpay/group/14404/
caused by:

May 29 12:43:51 localhost6.localdomain: [None] w.bango:INFO Bango payment notice for transaction uuid u'webpay:37d26392-7cd8-4ceb-9c8d-b2f27ba146bc' failed: Client Error 400: https://payments-dev.allizom.org/bango/notification/#012Content: {'moz_transaction': ['Transaction expired: webpay:37d26392-7cd8-4ceb-9c8d-b2f27ba146bc']}#012 :/data/www/marketplace-dev.allizom.org-webpay/webpay/webpay/bango/views.py:46
Component: Consumer Pages → Payments/Refunds
Summary: [traceback] Error handler: Could not record Bango success → [traceback] Error handler: Could not record Bango success (webpay transaction expired)
(Assignee)

Comment 2

5 years ago
That makes sense if the transaction takes a long time. Solitude has a timeout of 30 mins for a transaction, after that you can't complete it. Perhaps we should up that to something like a few hours. After all if Bango says the transaction is completed, who are we to argue?
(Assignee)

Updated

5 years ago
Assignee: nobody → amckay
Priority: -- → P2
Target Milestone: --- → 2013-06-06
(Assignee)

Comment 3

5 years ago
It looks like this transaction took over one hour to complete:

    >>> Transaction.objects.filter(uuid='webpay:37d26392-7cd8-4ceb-9c8d-b2f27ba146bc')[0].created
    datetime.datetime(2013, 5, 29, 11, 29, 14)

Interestingly the payment flow sets BILLING_CONFIGURATION_TIME_OUT at 120 seconds:

https://github.com/mozilla/solitude/blob/master/lib/bango/resources/billing.py#L79

So I'm not sure how this would happen. Keir, does this configuration do what I think, cause the billing configuration to timeout after 120 seconds?
Flags: needinfo?(keir)
Target Milestone: 2013-06-06 → 2013-06-13
(Assignee)

Comment 4

5 years ago
Waiting for feedback.
Target Milestone: 2013-06-13 → 2013-06-20
(Assignee)

Updated

5 years ago
Target Milestone: 2013-06-20 → ---

Comment 5

5 years ago
Sorry missed this - now the BILLING_CONFIGURATION_TIME_OUT is honoured, was disabled due for testing
Flags: needinfo?(keir)
The Bango transaction timeout is now sync with Solitude's timeout, see bug 887053

I think the next thing to do here is to show an explanation to the user in webpay that a transaction has timed out on the success page, right? There is no way to avoid that scenario.
I think this is problematic because when a valid Bango transaction arrives at Mozilla's success handler, the user has paid for goods so we should deliver them (not throw an error).
(Assignee)

Comment 8

5 years ago
Yes, but hopefully the server event will come through and tell us that the transaction has been completed successfully and we can recover from all this. Making sure that we recover gracefully from this (and other similar scenarios) could be another bug.
This kind of transaction timeout protects against certain attacks (see bug 887345) -- when we have a better way to address them we could remove the expiration check here. Until then I think we need to live with the chance of this error happening in production.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.