Skip to main content

Multi-Purchase

Description: When clicking to buy, the system automatically selects the type of IAP method rule or Dzovi Purchase.

TypeParameter NameTypeDescription
InputskustringStock Keeping Unit of this item.
Ex: "skutest_20k_vnd"
itemIDstringID of Item in your game.
Ex: "sword01"
roleIDstringUserID in game.
Ex: "User123456"
gameTransactionstringOrder 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);
}
}];