Allow users to restore receipts for in-app purchases

RESOLVED WONTFIX

Status

Marketplace
Payments/Refunds
P3
normal
RESOLVED WONTFIX
3 years ago
2 years ago

People

(Reporter: kumar, Unassigned)

Tracking

Avenir
x86
Mac OS X
Points:
---
Dependency tree / graph

Details

We need to solve this use case:

- user makes an in-app purchase with Happy Birds app
- user buys a newer Firefox OS phone (or loses their phone, re-flashes it, etc)
- user re-installs Happy Birds app
- all previously purchased in-app products are restored

Currently all device receipts are tied to a device and not restored anywhere else. We can't do it from the Marketplace because the app origin is wrong (see bug 944523). However, we can figure out which user owns what after bug 986614.
Blocks: 944480

Updated

3 years ago
Priority: -- → P3
It might be good if we wait until Firefox Accounts land before adding this feature. The app will need to somehow deal with user identity here.

Updated

3 years ago
Blocks: 1052190

Updated

3 years ago
No longer blocks: 944480
Blocks: 1058271
This is probably a higher priority now as we're wanting to get to the point of wanting to have fxpay as the recommended way to implment in-app.
This bug will probably turn into several smaller bugs but I'm assigning it to myself to at least start thinking about it ;)
Assignee: nobody → kumar.mcmillan
Here's a brain dump of how this might work:

- app has a button somewhere saying 'restore purchases'
- when tapped, app calls fxpay.restorePurchasedProducts().then(...)
- this opens a popup (iframe? web activity?) to a special page on the marketplace
- user logs in with their firefox account
- marketplace queries the db for their purchases
- marketplace generates new receipts and returns them via postMessage to the calling window
- fxpay acknowledges receipts and calls addReceipt() as it would normally
- app gets a callback with each restored product object
Postponing some work while I focus on Mozilla's new payments service
Assignee: kumar.mcmillan → nobody
> marketplace generates new receipts and returns them via postMessage to the calling window

correction: Marketplace should postMessage to the exact app domain matching the purchase records. This should prevent unauthorized apps from obtaining foreign purchase data.

Comment 7

2 years ago
Based on the recently announced future plans for the Marketplace to remove payments, closing these bugs.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.