Closed
Bug 924693
Opened 11 years ago
Closed 11 years ago
payment callbacks do not appear on Android
Categories
(Firefox for Android Graveyard :: Web Apps (PWAs), defect)
Tracking
(fennec+)
VERIFIED
FIXED
Firefox 28
Tracking | Status | |
---|---|---|
fennec | + | --- |
People
(Reporter: kumar, Assigned: wesj)
References
Details
Attachments
(2 files, 1 obsolete file)
(deleted),
text/plain
|
Details | |
(deleted),
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
callbacks such as mozPaymentProvider.paymentSuccess() and mozPaymentProvider.paymentFailed() do not exist on Firefox for Android. These are required to fulfill a payment. Details here: https://wiki.mozilla.org/WebAPI/WebPaymentProvider#API
STR:
- Install Firefox Nightly on an Android device
- Install the in-app payment tester from http://apploa.de/3b25a (manifest: http://inapp-pay-test.paas.allizom.org/manifest.webapp)
- Open the tester app from the Android home screen
- Edit the JWT textarea to make a simulation. Add {"simulate": {"result": "postback"}} to the request object so it looks something like:
{
"iss": "323d34dc-b5cf-4822-8e47-6a4515dc74db",
"aud": "marketplace.firefox.com",
...
"request": {
...
"simulate": {"result": "postback"}
}
}
- Scroll out of the textarea and tap Pay
- When prompted to continue the simulation, tap continue
Expected: The payment window should call paymentSuccess() in the background, close, and return to the tester app. The tester app should say "postback received"
Actual: The payment window gets stuck because the paymentSuccess() function is undefined.
When making a real payment from the browser the same problem occurs. I added the STR with the tester only because it is an easier way to reproduce the error. In either case, it's serious because the user is charged money before the install fails.
Reporter | ||
Updated•11 years ago
|
Version: unspecified → Trunk
Reporter | ||
Comment 1•11 years ago
|
||
I was using today's Nightly Firefox
Updated•11 years ago
|
tracking-fennec: --- → ?
Updated•11 years ago
|
Assignee: nobody → wjohnston
tracking-fennec: ? → +
Assignee | ||
Comment 2•11 years ago
|
||
Looks like this spec changed under us :( Updatin
Reporter | ||
Comment 3•11 years ago
|
||
Our code is compatible with the old spec -- it will try to find the first available callback but in this case it found neither. Let me know if you need any further info on the failure I ran into while testing.
Assignee | ||
Comment 4•11 years ago
|
||
Can you point me to the marketplace source code so I can see what they're doing? The simple provider here:
http://ferjm.github.io/simplepayprovider/page1.html
seems to work fine (with this patch). This patch just wraps our callback in a mozPaymentProvider object, which is consistent with what's done here [1] and here [2].
[1] http://mxr.mozilla.org/mozilla-central/source/webapprt/PaymentUIGlue.js#117
[2] http://mxr.mozilla.org/mozilla-central/source/b2g/chrome/content/payment.js#318
Attachment #819937 -
Flags: review?(mark.finkle)
Reporter | ||
Comment 5•11 years ago
|
||
The Marketplace payment code is a bit ugly (it tries to work around bugs in older clients) but here are examples:
https://github.com/mozilla/webpay/blob/master/media/js/pay/pay.js#L217
https://github.com/mozilla/webpay/blob/master/media/js/pay/cancel.js#L20
Is that what you were looking for?
Do the steps to reproduce in comment #0 help you test your patch? You can add this to cover the paymentFailed() code:
"simulate": {"result": "chargeback", "reason": "refund"}
Comment 6•11 years ago
|
||
Comment on attachment 819937 [details] [diff] [review]
Use mozPaymentProvider
Is this really a patch?
Comment 7•11 years ago
|
||
Comment on attachment 819937 [details] [diff] [review]
Use mozPaymentProvider
not a patch
Attachment #819937 -
Flags: review?(mark.finkle) → review-
Reporter | ||
Comment 8•11 years ago
|
||
Wes said on IRC that the patch isn't yet working, he's still looking at it
Assignee | ||
Comment 9•11 years ago
|
||
Apparently we need to add these slightly earlier? Doing this in the capture phase fixes the problem for me.
Attachment #819937 -
Attachment is obsolete: true
Attachment #829636 -
Flags: review?
Assignee | ||
Updated•11 years ago
|
Attachment #829636 -
Flags: review? → review?(mark.finkle)
Updated•11 years ago
|
Attachment #829636 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 10•11 years ago
|
||
Reporter | ||
Comment 11•11 years ago
|
||
Thanks, Wes. Any ideas when this patch will be available in Fennec Nightly?
Comment 12•11 years ago
|
||
(In reply to Kumar McMillan [:kumar] from comment #11)
> Thanks, Wes. Any ideas when this patch will be available in Fennec Nightly?
This patch has not been merged to mozilla-central yet. When it does, this bug will be closed. The next Nightly after the merge to mozilla-central will have the fix.
ETA: Look for it in the Nov 12th Nightly
Comment 13•11 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #12)
> ETA: Look for it in the Nov 12th Nightly
Ugh. I mean Nov 13th.
Comment 14•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 28
Reporter | ||
Comment 15•11 years ago
|
||
Thanks. I tested both a postback and chargeback in today's Nightly. The callbacks are closing the window as expected. However, they are not passing callback arguments to the DOMRequest properly. I opened bug 938304 for that.
Status: RESOLVED → VERIFIED
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•