Please Select Your Location

Thailand
Australia
Österreich
België
Canada
Canada - Français
中国
Česká republika
Denmark
Deutschland
France
HongKong
Iceland
India
Ireland
Italia
日本
Korea
Latvija
Lietuva
Lëtzebuerg
Malaysia
Malta
Mexico
Nederland
New Zealand
Norge
Polska
Portugal
Russia
Saudi Arabia
Singapore
Southeast Asia
España
Suisse
Suomi
Sverige
台灣
Ukraine
United Kingdom
United States
Việt Nam
المملكة العربية السعودية (Arabic)

Callback: IAPurchaseListener

IAPurchaseListener listens to callbacks for the IAP, and contains the following functions.

OnSuccess()

void OnSuccess(string pchCurrencyName)
Name Type Description
string pchCurrencyName Currency used by end user

Callback function for when IsReady() successfully completes. It retrieves the end-user currency setting. Keep in mind that prices must be set in each billable currency. Developers are responsible for managing their own exchange rates.

Location Currency name Minimum price Min unit
AE AED 3.67 0.01
AT EUR 0.84 0.01
AU AUD 1.31 0.01
BE EUR 0.84 0.01
CA CAD 1.24 0.01
CH CHF 0.97 0.01
CN CNY 6 1
CZ CZK 21.67 0.01
DE EUR 0.84 0.01
DK DKK 6.26 0.01
ES EUR 0.84 0.01
FI EUR 0.84 0.01
FR EUR 0.84 0.01
GB GBP 0.75 0.01
HK HKD 7.7 0.1
IE EUR 0.84 0.01
IN INR 64.13 0.01
IS ISK 104.44 1
IT EUR 0.84 0.01
JP JPY 111 1
KR KRW 1120 1
MO HKD 7.7 0.1
NL EUR 0.84 0.01
NO NOK 7.83 0.01
NZ NZD 1.38 0.01
PL PLN 3.56 0.01
RU RUB 56.7 0.01
SA SAR 3.71 0.01
SE SEK 8.03 0.01
SG SGD 1.34 0.01
TW TWD 30 1
US USD 0.99 0.01
VN VND 22488 1
LA LAK 8227.65 0.01
KH KHR 4006.99 0.01
MM MMK 1351.19 0.01
PH PHP 50.58 0.01
ID IDR 13355.57 0.01
BN BND 1.34 0.01
TL USD 0.99 0.01
GU USD 0.99 0.01
PE PEN 3.21 0.01
BR BRL 3.14 0.01
AR ARS 17.15 0.01
UY UYU 29.13 0.01
BG BGN 1.64 0.01
GR EUR 0.84 0.01
LU EUR 0.84 0.01
SK EUR 0.84 0.01
MT EUR 0.84 0.01
HR HRK 6.31 0.01
CY EUR 0.84 0.01
EE EUR 0.84 0.01
HU HUF 258.71 0.01
LV EUR 0.84 0.01
LT EUR 0.84 0.01
PT EUR 0.84 0.01
RO RON 3.85 0.01
SI EUR 0.84 0.01
MY MYR 4.18 0.01
TH THB 32.76 0.01

OnRequestSuccess()

void OnRequestSuccess(string pchPurchaseId)
Name Type Description
pchPurchaseId string Purchase ID

Generates a purchase ID on successful completion of Request() [NEW] . The purchase ID is effectively an order number, used for calling Purchase() .

OnPurchaseSuccess()

void OnPurchaseSuccess(string pchPurchaseId)
Name Type Description
pchPurchaseId string Purchase ID

Callback function for successful completion of Purchase() . The purchase ID can be used for later queries.

OnQuerySuccess()

void OnQuerySuccess(QueryResponse response)
Name Type Description
response QueryResponse Query result

Callback function for successful completion of Query() . Provides the purchase ID for later query via IaPurchase.QueryResponse.string purchase_id .

OnQuerySuccess(QueryListResponse)

void OnQuerySuccess(QueryListResponse response)
Name Type Description
response QueryListResponse Query result as a list

Callback function for successful completion of Request()[NEW] . QueryListReponse contains List < QueryResponse2 > purchaseList which contains a list of purchases.

OnBalanceSuccess()

void OnBalanceSuccess(string pchBalance)
Name Type Description
pchBalance string Balance

Callback function for successful completion of GetBalance() . Balance is available as IaPurchase.QueryResponse.string pchBalance .

OnRequestSubscriptionSuccess()

void OnRequestSubscriptionSuccess(string pchPurchaseId)
Name Type Description
pchSubscriptionId string Subscription ID

Callback function for successful completion of RequestSubscription() . The subscription ID is used for Subscribe() .

OnRequestSubscriptionWithPlanIDSuccess()

void OnRequestSubscriptionWithPlanIDSuccess(string pchSubscriptionId)
Name Type Description
pchSubscriptionId string Subscription ID

Callback function for successful completion of RequestSubscriptionWithPlanID() . The subscription ID is used for Subscribe() .

OnSubscribeSuccess(string pchSubscriptionId)

void OnSubscribeSuccess(string pchSubscriptionId)
Name Type Description
pchSubscriptionId string Subscription ID

Callback function for successful completion of Subscribe() . pchSubscriptionId can be used to query or cancel the subscription.

OnQuerySubscriptionSuccess()

void OnQuerySubscriptionSuccess(IAPurchase.Subscription[] subscriptionlist)
Name Type Description
subscriptionlist Subscription [] Subscription list as an array

Callback function for successful completion of QuerySubscription() . End user subscriptions will be retrieved as array IaPurchase.Subscription[] subscriptionlist . If only one subscription has been requested, the array will only have 1 item.

OnQuerySubscriptionListSuccess()

void OnQuerySuccess(QueryResponse response)
Name Type Description
subscriptionlist Subscription [] Subscription list as an array

Callback function for successful completion of QuerySubscriptionList() . End user subscriptions will be retrieved as array IaPurchase.Subscription[] subscriptionlist .

OnCancelSubscriptionSuccess(bool bCanceled)

void OnCancelSubscriptionSuccess(bool bCanceled)
Name Type Description
bCanceled bool Cancellation status

Callback function for successful completion of CancelSubscription() . When cancellation succeeds, bool bCanceled will be TRUE .

OnFailure()

void OnFailure(int nCode, string pchMessage)
Name Type Description
nCode int Error code
pchMessage string Error message

Callback function for failures in any IAP API function. It retrieves an error code and error message. See Error codes for a list.