Skip to content

module InAppBilling.API

Mohammad Naghavi edited this page Jun 17, 2014 · 25 revisions

Class: module:InAppBilling

module:InAppBilling

new module:InAppBilling()

Source:

Members

ERROR_CODES_BASE

Error codes base.

all the codes bellow should be kept synchronized between: InAppPurchase.m InAppBillingPlugin.java android_iab.js ios_iab.js

Be carefull assiging new codes, these are meant to express the REASON of the error as exact as possible!

Source:

Methods

getPurchases(success, fail)

This will return the already boutgh items.

Parameters:
Name Type Description
success getPurchasesSuccess
fail errorCallback
Source:

init(success, fail, options, productIds)

This initiates the plugin, you can optionally pass in one or multiple product IDs for their details to be loaded during initialization.

Parameters:
Name Type Description
success initSuccess

the success callback

fail errorCallback

the failure callback

options Object

options for configuring the plugin

Properties
Name Type Argument Description
showLog Boolean <optional>

[true] wether to show logs or not, this is strongly recommended to be set to false for production

productIds Array.<String>

an optional list of product IDs to load after initialization was successful

Source:

log(msg)

This function accepts and outputs all the logs, both from native and from JS this is intended to make the debuging easier, you only need to have access to JS console output.

Parameters:
Name Type Description
msg String
Source:

Generated with wicked.
  • 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