Confirmed users
324
edits
| Line 13: | Line 13: | ||
* User clicks a Buy button. | * User clicks a Buy button. | ||
* App does a POST to /mozpay/product/shiny-pony/buy | * App does a POST to /mozpay/product/shiny-pony/buy | ||
** That initiates a transaction on the server. | ** That initiates a transaction on the server. | ||
** Server contacts the marketplace to record start of the transaction. | ** Server contacts the marketplace to record start of the transaction. | ||
*** Is there an issue here with matching up Marketplace persona accounts? | *** Is there an issue here with matching up Marketplace persona accounts? (no, because we'll be using device receipts) | ||
** Creates the JWT and returns it to the client | ** Creates the JWT and returns it to the client | ||
** The client receives the JWT and passes it to mozPay. | ** The client receives the JWT and passes it to mozPay. | ||
* App polls the server waiting for a completed purchase... | * App polls the server waiting for a completed purchase... | ||
* When completed a receipt is returned to the client | * When completed a receipt is returned to the client | ||
** Client installs the receipt (bug https://bugzilla.mozilla.org/show_bug.cgi?id=757226) | ** Client installs the receipt probably with app.addReceipt() (bug https://bugzilla.mozilla.org/show_bug.cgi?id=757226) | ||
* App verifies the receipt is correct for that app. | * App verifies the receipt is correct for that app. | ||
** App verifies the receipt against the receipt verification. | ** App verifies the receipt against the receipt verification. | ||