![]() If you just want to simulate payments, you can easily grab a testing key and secret. In order to use payments, you’ll need use the app key and secret generated for you by the Marketplace. It’s up to you to handle the rest of the workflow: updating the app when an item is successfully purchased, linking purchases to accounts, etc. ![]() The previous Hacks article on payments goes into the lower-level mechanics and reasons for payments more thoroughly. The user will be taken to a built-in payments workflow, and when finished, your server will be notified. The server creates JWT tokens, passes them to your app, and your app calls navigator.mozPay with the token. You need a server to generate the payments requests, because otherwise a hacker could easily change the prices to 0. The MDN page for in-app payments has a good overview of the process, but here’s an even quicker overview. For the rest of this article, we will assume the Firefox OS environment. We are working on enabling them across other platforms, even desktop Firefox, but that is a ways off. Payments are only enabled on Firefox OS devices for now. ![]() In-app payments is a different workflow, and allows you to charge the customer for specific items within your app. Payments are different than simply being a paid app, which charges the user once on the initial purchase. This also includes a few updates, such as real payments being live in the Firefox Marketplace. We’ve talked about in-app payments before in navigator.mozPay() For Web Payments, but this is an overview from an app developer’s standpoint. It also gives us the chance to offer deeper platform integration, allowing things like carrier billing in addition to credit/debit cards. We think it is important that developers have an easy way to monetize their apps. At Mozilla, we have been working on bringing payments to the web.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |