Closed Bug 943471 Opened 11 years ago Closed 11 years ago

Getting Payment Cancelled (500 from API /api/v1/webpay/prepare) trying to buy an app

Categories

(Marketplace Graveyard :: API, defect, P1)

Avenir
x86
macOS
defect

Tracking

(Not tracked)

VERIFIED FIXED
2013-12-03

People

(Reporter: scolville, Assigned: mat)

Details

(Keywords: regression)

Looks like changes in https://github.com/mozilla/zamboni/commit/a4a74199f48792faaa5995a803f3751e3aba7525 have broken payments.

I see the following in logcat output:

E/GeckoConsole( 3916): Content JS LOG at http://mp.mozilla.dev/media/js/log.js:51 in anonymous: [req] POSTing http://mp.mozilla.dev/api/v1/webpay/prepare/<redacted>
E/GeckoConsole( 3916): Content JS LOG at http://mp.mozilla.dev/media/js/log.js:51 in anonymous: [req] Request failed: POST 500
E/GeckoConsole( 3916): Content JS LOG at http://mp.mozilla.dev/media/js/log.js:51 in anonymous: [req] Error message:  'NoneType' object has no attribute 'pk'
E/GeckoConsole( 3916): Content JS ERROR at http://mp.mozilla.dev/media/js/log.js:51 in anonymous: [payments] Error fetching JWT from API:  INTERNAL SERVER ERROR 500
E/GeckoConsole( 3916): Content JS LOG at http://mp.mozilla.dev/media/js/log.js:51 in anonymous: [buttons] Purchase flow rejected for Test App (bison9550)
E/GeckoConsole( 3916): Content JS LOG at http://mp.mozilla.dev/media/js/log.js:51 in anonymous: [buttons] Unsuccessful install for Test App (bison9550)

When directly posting with curl I see the following error message:

{"app":["This field is required."]}
Additional STR:

With a phone pointing at a local dev env attempt to buy an app. (Note: This might happen in -dev too, I've just not got certs installed presently to try it.)

What happens:

 * You immediately see "Payment cancelled"
 
What should happen:

 * You should start the payment flow.
Summary: Getting 500 trying to buy an app → Getting Payment Cancelled (500 from API /api/v1/webpay/prepare) trying to buy an app
This happens on dev as well.
Keywords: regression
Assignee: nobody → mpillard
Priority: -- → P1
Pull request with the fix up for review : https://github.com/mozilla/zamboni/pull/1454
Status: NEW → ASSIGNED
Target Milestone: --- → 2013-12-03
Fixed in https://github.com/mozilla/zamboni/commit/6a97b4e2d2fa6384fb5068cc076c1273c0c3eb16
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Mathieu, can you please help me to correctly understand the STRs for this bug?
After discussing with Mathieu on IRC, I tested the bug by purchasing an app on Stage starting logged in in and then logged out. 

Verified as fixed
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.