Closed Bug 865612 Opened 11 years ago Closed 11 years ago

App is paid twice if user is receiving a phone call during purchase.


(Marketplace Graveyard :: Payments/Refunds, defect, P2)

Gonk (Firefox OS)


(Not tracked)



(Reporter: vcarciu, Assigned: kumar)




(2 files)

steps to reproduce:
1. Start the app purchase for a paid app
2. Enter PIN and press BUY button 
3. From another device, make a phone call during purchase process
4. Open again the app from step1 and buy it again

Expected results:
App is purchased only one time 

Actual result:
According to BANGO transactions list, app was paid twice
To clarify: step #3 is the Bango screen with the blue spinner when it says "processing payment"
I think what happened is the Bango payment completed but it could not redirect to the Mozilla success/error page because the Dialer app had focus. The redirect most likely was aborted. We would need server notifications (bug 866939) to make sure this can't happen.
Depends on: 866939
Priority: -- → P1
Assignee: nobody → amckay
Target Milestone: --- → 2013-06-20
Can't tell if the log is coming through due to bug 884058 at this point.
Target Milestone: 2013-06-20 → ---
Depends on: 884058
Now I'm blocked on making a payment by failing persona login on -dev. Sigh.
Depends on: 886433
Assignee: amckay → kumar.mcmillan
Target Milestone: --- → 2013-06-27
Target Milestone: 2013-06-27 → 2013-07-04
There are a couple things that can happen in this scenario.

In the best case, Bango receives the payment POST. I verified that in this scenario our server event notice (bug 866939) does the right thing:

Jun 27 09:38:03 localhost6.localdomain: [] s.bango:INFO Received notification for billing_config_id '362130': bango_response_code: 'OK'; bango_response_message: 'Success'; bango_trans_id: '1083304275'; moz_transacti
on: 'webpay:7b13a2c0-b314-43b8-b78b-43c857e5bff2' :/data/www/

The user will see "install failed" on Marketplace but the purchase button changes to "install" which they can click. They are not charged a second time.

There's a worse scenario (but unlikely one) where the phone call causes the Bango request to abort. I filed bug 887996 for that
Closed: 11 years ago
Resolution: --- → FIXED
I think you are looking at the wrong log. We've got multiple things called notification and event. lib/bango/ > NotificationResource is the success end point defined in webpay.

The server to server notification is lib/bango/ > EventResource. The best place to look is in webpay. If this is being hit:

Then its hitting our server and we are good.
Resolution: FIXED → ---
whoops, good catch. I do not see event notices coming through at all, opened bug 888954
Depends on: 888954
Flags: affects-moss+
To clarify a few things:
- comment #5 explains how the success redirect happens in the background if a phone call interrupts the payment
- if the final Bango pay request is aborted, bug 887996 will address it
- if the user taps the final pay button and the request doesn't appear to go through, re-submitting the payment will not cause a duplicate charge because of bug 845528
- I have not been able to reproduce the scenario where the payment goes through to Bango but the Mozilla redirect does not happen. If this theoretical case exists then we need Bango to address bug 888954 (server notices not working)
Target Milestone: 2013-07-04 → 2013-07-11
Flags: affects-seville+
Flags: affects-seahorse+
Flags: affects-durango+
Attached file ezboot log
Issue doesn't occur for region durango. User is not asked to purchase the app twice instead they can only install it or run/start the app.
time: 10:40pm CEST
phone number:787633833
test app:pricetier 4
This bug only affects the flow if the interruption is made at exactly the right point in the flow. I'm wondering if in comment 10 that occurred.
Dropping to P2, because its not a blocker and not much can be done till bug 888954 is done.
Priority: P1 → P2
Target Milestone: 2013-07-11 → ---
Depends on: 902230
Depends on: 901099, 903567
Version: 1.5 → 1.3
Version: 1.3 → 1.4
Version: 1.4 → 1.5
It looks like the notifications are working. This means we'll be updated when the notification comes through from Bango and know that the app is bought.

I think when a user clicks buy, they should get an error. I'm not sure how we can easily test this however, we might have to introduce a failure to be able to do this. Any ideas on how to test this?
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.