MLGAVirtureCurrency Class Reference

Inherits from NSObject
Declared in MLGameAnalytics.h

Overview

Track game virture currency events.

+ onChargeRequest:orderId:currencyAmount:currencyType:virtualCurrencyAmount:paySource:

Tracks the beginning of requesting iap purchase.

+ (void)onChargeRequest:(SKPaymentTransaction *)transaction orderId:(NSString *)orderId currencyAmount:(double)currencyAmount currencyType:(NSString *)currencyType virtualCurrencyAmount:(double)virtualCurrencyAmount paySource:(NSString *)paySource

Parameters

transaction

The transaction

orderId

The order id, managed by yourself

currencyAmount

The cost of this transaction

currencyType

The currency code, eg. USD

virtualCurrencyAmount

The virtual currency amount

paySource

The payment platform

Declared In

MLGameAnalytics.h

+ onChargeSuccess:orderId:

Tracks the success of iap purchase.

+ (void)onChargeSuccess:(SKPaymentTransaction *)transaction orderId:(NSString *)orderId

Parameters

transaction

The transaction

orderId

The order id, managed by yourself

Declared In

MLGameAnalytics.h

+ onChargeCancelled:orderId:

Tracks the cancellation of iap purchase.

+ (void)onChargeCancelled:(SKPaymentTransaction *)transaction orderId:(NSString *)orderId

Parameters

transaction

The transaction

orderId

The order id, managed by yourself

Declared In

MLGameAnalytics.h

+ onChargeFailed:orderId:

Tracks the failure of iap purchase.

+ (void)onChargeFailed:(SKPaymentTransaction *)transaction orderId:(NSString *)orderId

Parameters

transaction

The transaction

orderId

The order id, managed by yourself

Declared In

MLGameAnalytics.h

+ onReward:reason:

Tracks the occurrence of rewarding virtual currency.

+ (void)onReward:(double)virtualCurrencyAmount reason:(NSString *)reason

Parameters

virtualCurrencyAmount

The amount of rewarding virtual currency

reason

The reason why rewarding virtual currency

Declared In

MLGameAnalytics.h