Skip to content

kumar303/mozpay-catalog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mozpay-catalog

This is an experimental prototype of a product catalog server for navigator.mozPay().

If successful, this could let developers do in-app payments without hosting their own server. I.E. Mozilla would provide a server such as this one.

The exact developer API needs more work and should ultimately be an extension of navigator.mozPay(). See the discussion for gory details.

Run the server

You need to host the server on a public IP such as a Stackato PAAS or locally with a tunnel.

Let's get started!

npm install
cp settings-dist.js settings.js

Get an Application Key and Application Secret from the Firefox Marketplace Dev Hub. You probably want to start by getting a key for simulations. Edit settings.js and fill in the keys.

Run a local server:

npm start

Or upload to Stackato:

stackato push

Update the Stackato app with:

stackato update

Open up the app in a Firefox OS browser and purchase one of the items such as the Magic Cheese. You can see a test version of the app running here: http://mozpay-catalog.paas.allizom.org/.

Take a look at www/js/index.js to see the developer API.

About

A catalog of products for navigator.mozPay()

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published