Closed
Bug 891000
Opened 13 years ago
Closed 12 years ago
Return a different status code for "already purchased"
Categories
(Marketplace Graveyard :: Payments/Refunds, defect, P4)
Tracking
(Not tracked)
VERIFIED
FIXED
2013-07-25
People
(Reporter: andy+bugzilla, Assigned: davidbgk)
Details
If an app has already been purchased and you hit the payments flow again, we get a 403 response back. That's not really descriptive for the front end and we aren't forbidding the request... we are just saying you shouldn't be calling this API.
Perhaps a 409 would be better and more descriptive.
| Reporter | ||
Comment 1•12 years ago
|
||
Note: this is in zamboni, the has_purchased decorator is used:
https://github.com/mozilla/zamboni/blob/master/apps/addons/decorators.py#L64
When this API is hit:
https://github.com/mozilla/zamboni/blob/master/mkt/webpay/resources.py#L35
Please ensure you update the docs for API to reflect this:
http://firefox-marketplace-api.readthedocs.org/en/latest/topics/payment.html#preparing-payment
Assignee: nobody → david
| Assignee | ||
Comment 2•12 years ago
|
||
To me the issue is related to the `has_not_purchased` decorator:
https://github.com/mozilla/zamboni/blob/master/apps/addons/decorators.py#L93
which decorates the `_prepare_pay` function related to the previously mentioned resource:
https://github.com/mozilla/zamboni/blob/master/mkt/purchase/webpay.py#L73
Am I missing something?
| Reporter | ||
Comment 3•12 years ago
|
||
(In reply to David Larlet [:davidbgk] from comment #2)
> To me the issue is related to the `has_not_purchased` decorator:
No, you are correct, sorry about that.
| Assignee | ||
Comment 4•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Target Milestone: --- → 2013-07-25
Comment 5•12 years ago
|
||
David,can you please add some specific STRs for this bug or mark it as [qa-] ?
Flags: needinfo?(david)
| Assignee | ||
Updated•12 years ago
|
Flags: needinfo?(david)
Whiteboard: qa-
Comment 6•12 years ago
|
||
trying to reinstall a previously purchased app now returns a 409 and triggers an install.
marketplace.allizom.org -> POST /api/v1/webpay/prepare/?_user=blahblah&carrier=telefonica&dev=firefoxos&device=firefoxos&lang=en-US&pro=fbff7fdc.32.1®ion=co)
I/PRLog ( 109): 2013-08-05 19:53:53.977168 UTC - 1130944[40404470]: http response [
I/PRLog ( 109): 2013-08-05 19:53:53.977259 UTC - 1130944[40404470]: HTTP/1.1 409 CONFLICT
Status: RESOLVED → VERIFIED
Whiteboard: qa-
You need to log in
before you can comment on or make changes to this bug.
Description
•