Chuyển tới nội dung chính

Multi-Purchase

Mô tả: Khi bấm vào để mua, hệ thống tự động chọn mua IAP hoặc mua Dzovi.

LoạiTên tham sốLoạiMô tả
Đầu vàoskustringStock Keeping Unit của vật phẩm này.
Ví dụ: "skutest_20k_vnd"
itemIDstringID của vật phẩm trong game.
Ví dụ: "sword01"
roleIDstringUserID trong game.
Ví dụ: "User123456"
gameTransactionstringMã đặt hàng, giao dịch từ game.
Ví dụ: "10938093890130192830"
  • Sau khi nhận PurchaseType từ máy chủ, SDK Client sẽ tự động gọi phương thức thanh toán.

  • Gọi DZOSDKCoreKit với tiến trình MultiPayment:

	[[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);
// Thành công
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);
}
}];