Skip to content
Mohammad Naghavi edited this page Jun 30, 2014 · 9 revisions

The installation process consists of two steps:

  • Plugin installation
  • Adding your license key

Plugin installation

when using any of the two automatic methods, you do not need to add any JS tag to your HTML file, it will be injected automatically.

PhoneGap/Cordova >= 3.0

For PhoneGap >= 3.0 this plugin can be installed with a single command:

phonegap local plugin add git://github.com/mohamnag/InAppBilling.git

And that's for Cordova:

cordova plugin add git://github.com/mohamnag/InAppBilling.git

PhoneGap <= 2.9 using Plugman

plugman install --platform ios android --project <path to project> --plugin git://github.com/mohamnag/InAppBilling.git

See Cordova Plugman.

NOTE: If you plan on using the cordova-cli to build your project, copy the cordova_plugins.js file in the root of the www directory to merges/<platform> directory at the root of the solution folder otherwise the cordova_plugins.js will be overwritten.

cp ./cordova_plugins.js ../../../merges/ios/cordova_plugins.js
cp ./cordova_plugins.js ../../../merges/android/cordova_plugins.js

See Cordova Cli.

Manually

No tested method here, feel free to contribute it!

Add your license key

As android uses a public key for verification of purchase data consistency, you have to put the public key of your application inside the config.xml file under a preference tag like this:

<preference name="android-iabplugin-license-key"    value="yourpublickey" />

You can find your public key inside Google Developer Console under SERVICES & APIS tab of the specific application.

  • Installation
  • [Stores setup](Stores setup)
  • [Purchase verification](Purchase verification)
  • [Testing plugin](Automatic tests)
  • [API documentation](API documentation)
  • Debugging

Philosophy

  • Roadmap
  • [Compatibility issues](Compatibility issues)

API

Clone this wiki locally