Skip to content
Mohammad Naghavi edited this page Jun 30, 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:

consumeProductSuccessCallback(purchase)

This is the callback for module:InAppBilling#consumeProduct

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:

getLoadedProductsSuccessCallback(products)

The success callback for getLoadedProducts.

Parameters:
Name Type Description
products Array.<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(products)

The success callback for init.

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

initSuccessCallback()

The success callback for init.

Source:

loadProductDetailsSuccessCallback(product)

This is the success callback for loadProductDetails.

Parameters:
Name Type Description
product productDetails
Source:

loadProductDetailsSuccessCallback(products)

This is the success callback for loadProductDetails. 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:

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

Properties:
Name Type Description
id string

populated with orderId (when on PlayStore) or transactionIdentifier (when on iTunes)

originalId string

populated with originalTransaction.transactionIdentifier available only on iOS and only for restored transactions

productId string

the id of the bought product

expirationDate date

the date of expiration for this purchase, only if the product is of subscription type and only as long as this is not past.

verificationPayload string

this is populated with purchaseToken when on PlayStore and with application's receipt when on iTunes. Only set when this data is returned to buy or subscribe success callback.

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