Skip to content

flyingsky/node-in-app-purchase-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-in-app-purchase-check

Why

PhoneGap purchase plugin cc.fovea.cordova.purchase is the best purchase plugin as I know, which supports iOS and Android google play.

To use it for auto-renewable subscription, you have to provide receipt verification. This code provides an easy way to setup your own service in nodejs.

How to use it

  1. You can deploy it to any nodejs platform, such as you can deploy it openshift, which is supported by our code without any change. If you don't know how to use openshift, see here: https://developers.openshift.com/en/node-js-getting-started.html

  2. After deploy, you can change your code like below. You can see more sample code from here:https://github.com/Fovea/cordova-plugin-purchase-demo

    // Strong suggest to keep your password on server side!!!
    var password = 'Your app shared secrect from iTunes Connect'
    var productId = 'your product id';
    var productAlias = 'your product alias';

    // Enable remote receipt validation, by default we validate on production environment, retry sandbox if fail
    // isAutoRenew=true means this is auto renew, false means non auto renew
    var queryString = '?password=' + password + '&isAutoRenew=true';
    store.validator = "http://{Your host here}/verify" + queryString;

TODO

  1. support Android google play
  2. support Amazon app store

NOTES:

  1. how to sync openshift and github code
  2. Opening this URL launches iTunes or iTunes Store, and then displays the Manage Subscription page, https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published