Multi-Purchase
Description: When clicking to buy, the system automatically selects the type of IAP method rule or Dzovi Purchase.
Type | Parameter Name | Type | Description |
---|---|---|---|
Input | sku | string | Stock Keeping Unit of this item. Ex: "skutest_20k_vnd" |
itemID | string | ID of Item in your game. Ex: "sword01" | |
roleID | string | UserID in game. Ex: "User123456" | |
gameTransaction | string | Order code, transaction from the game. Ex: "10938093890130192830" |
-
After receiving the PurchaseType from the server, the SDK Client will automatically call the payment method.
-
Call DZOSDKCoreKit with MultiPayment Process:
[[DZOSDKCoreKit sharedInstance] MultiPayment:_sku ItemID:_itemID GameTransaction:_gameTransaction RoleID:_roleID handler:^(SDKResult_MultiPayment *result, NSError *error) {
if (error == nil) {
NSLog(@"MultiPayment result: [%@], [%@]", result.status, result.message);
// success
if ([result.status isEqual:@0]) {
NSLog(@"MultiPayment result: [%@] [%@] [%@] [%@] [%@] [%@] [%@]", result.status, result.message, result.transactionID, result.money, result.balance, result.sku, result.gameTransaction);
} else {
NSLog(@"MultiPayment error: [%@] [%@]",result.status, result.message);
}
} else {
NSLog(@"MultiPayment error: %@", error);
}
}];