Last Comment Bug 865498 - create a REST API to provide App test receipts (for use by Firefox OS Simulator)
: create a REST API to provide App test receipts (for use by Firefox OS Simulator)
Status: RESOLVED FIXED
:
Product: Marketplace
Classification: Server Software
Component: API (show other bugs)
: 1.5
: x86 Mac OS X
: P2 normal (vote)
: 2013-05-02
Assigned To: Andy McKay [:andym]
:
Mentors:
Depends on:
Blocks: 855912
  Show dependency treegraph
 
Reported: 2013-04-24 16:48 PDT by Bill Walker [:bwalker] [@wfwalker]
Modified: 2013-04-30 11:07 PDT (History)
4 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Bill Walker [:bwalker] [@wfwalker] 2013-04-24 16:48:26 PDT
We need a REST API for generating test app receipts. The Firefox OS Simulator will use this API to install a test receipt when an App is installed into the Simulator. This will allow developers of paid apps to perform end-to-end testing of receipt validation
Comment 1 Bill Walker [:bwalker] [@wfwalker] 2013-04-24 16:48:54 PDT
see https://github.com/mozilla/r2d2b2g/issues/427
Comment 3 Bill Walker [:bwalker] [@wfwalker] 2013-04-30 10:14:11 PDT
(In reply to Andy McKay [:andym] from comment #2)
> https://github.com/mozilla/zamboni/commit/cecae9
> 
> Docs:
> 
> http://firefox-marketplace-api.readthedocs.org/en/latest/topics/payment.
> html#test-receipts
> 
> Let me know if that works for you.


Andy, we need to make this work for packaged apps in the simulator.
Comment 4 (not reading bugmail) Nick Desaulniers [:\n] 2013-04-30 10:18:54 PDT
So the simulator creates:
- Hosted Apps
- Packaged Apps
- Generated Apps (give it a URL and it turns it into an unprivileged package app with that URL as the launch path)

So the API needs to support these three scenarios.
Comment 5 Andy McKay [:andym] 2013-04-30 10:28:21 PDT
This should work with any of those 3 apps. manifest_url is used to fill out the URL of the field:

https://wiki.mozilla.org/Apps/WebApplicationReceipt#the_product_field

Currently for packaged apps, the manifest_url is set to the marketplace URL. I'll make it optional and populate it with the marketplace URL if empty.
Comment 6 Andy McKay [:andym] 2013-04-30 10:35:54 PDT
Hmm not happy about that. We set this in bug 784447.

But the product URL is the only way to check that the receipt is actually for your app and not a different one. If they are all the marketplace, how do we distinguish them?
Comment 7 (not reading bugmail) Nick Desaulniers [:\n] 2013-04-30 10:44:45 PDT
Would it hurt to use the origin of the packaged app (app://uuid)?  Would that even make sense?
Comment 8 Andy McKay [:andym] 2013-04-30 11:07:35 PDT
This bug works as is, filed https://bugzilla.mozilla.org/show_bug.cgi?id=867265 for this issue.

Note You need to log in before you can comment on or make changes to this bug.