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
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.
(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.
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.
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.
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?
Would it hurt to use the origin of the packaged app (app://uuid)? Would that even make sense?
This bug works as is, filed https://bugzilla.mozilla.org/show_bug.cgi?id=867265 for this issue.