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

Global

Members

<private> 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:

Type Definitions

buySuccessCallback(purchase)

The success callback for buy and subscribe

Parameters:
Name Type Description
purchase purchase

the data of purchase

Source:

buySuccessCallback(purchase)

The success callback for restore. This is only available on iOS.

Parameters:
Name Type Description
purchase purchase

the data of purchase

Source:

buySuccessCallback(purchase)

The success callback for buy and subscribe

Parameters:
Name Type Description
purchase purchase

the data of purchase

Source:

consumePurchaseSuccessCallback(purchase)

This is the callback for module:InAppBilling#consumePurchase

Parameters:
Name Type Description
purchase purchase
Source:

errorCallback(error)

All the failure callbacks have the same signature as this.

Parameters:
Name Type Description
error Object

the information about the error

Properties
Name Type Description
errorCode int

one of the error codes defined with ERR_*

msg string

a textual message intended for developer in order to make debuging easier

nativeEvent Object

additional information mainly intended for debug process which will not be present if the source of error is not IAB

Properties
Name Type Description
IabResponse int

response code coming from IabHelper

IabMessage string

message text coming from IabHelper

Source:

errorCallback(error)

All the failure callbacks have the same signature as this.

Parameters:
Name Type Description
error Object

the information about the error

Properties
Name Type Description
errorCode int

one of the error codes defined with ERR_*

msg string

a textual message intended for developer in order to make debuging easier

nativeEvent Object

additional information mainly intended for debug process which will not be present if the source of error is not IAB

Properties
Name Type Description
IabResponse int

response code coming from IabHelper

IabMessage string

message text coming from IabHelper

Source:

getAvailableProductsSuccessCallback(productsList)

The success callback for getAvailableProducts.

Parameters:
Name Type Description
productsList Array.<ProductDetails>
Source:

getProductDetailsSuccessCallback(products)

This is the success callback for getProductDetails. This will be called when process is successfully finished and will receive a list of valid and loaded products.

Invalid products will not be on this list.

Parameters:
Name Type Description
products Array.<ProductDetails>
Source:

getProductDetailsSuccessCallback(product)

This is the success callback for getProductDetails.

Parameters:
Name Type Description
product productDetails
Source:

getPurchasesSuccessCallback(purchaseList)

The success callback for getPurchases

Parameters:
Name Type Description
purchaseList Array.<purchase>
Source:

getPurchasesSuccessCallback(purchaseList)

The success callback for getPurchases

Parameters:
Name Type Description
purchaseList Array.<purchase>
Source:

initSuccessCallback()

The success callback for init.

Source:

initSuccessCallback(result)

The success callback for init.

Parameters:
Name Type Description
result string

the result passed by cordova, should be always 'OK'

Source:

ProductDetails

Properties:
Name Type Description
id string

the product id

type string

type of product, possible values: inapp, subscription

price string

the formatted localized price

priceMicros int

the price in micro amount (2$ ~> 2000000)

currencyCode string

the currency code used for localized price

title string

humanreadable title of product

description string

description of product

Source:

productDetails

Source:

purchase

Type:
  • Object
Source:

purchase

Type:
  • Object
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