From e33b2ae02455650847d47b5da94851828d60409a Mon Sep 17 00:00:00 2001 From: huyufei Date: Tue, 21 May 2024 15:16:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DApple=20Receipt=20?= =?UTF-8?q?=E4=BC=A0=E5=85=A5=E5=80=BC,=20=E6=94=B9=E4=B8=BA=E5=8E=9F?= =?UTF-8?q?=E6=9D=A5=E7=9A=84=20payload=20=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyufei --- Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs b/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs index eb31728..32909b4 100644 --- a/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs +++ b/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs @@ -734,6 +734,7 @@ namespace Guru string scene = _curProductCategory ?? "Store"; bool isFree = false; if (orderType == 1) isFree = IsSubscriptionFreeTrailById(productId); + string appleReceiptString = ""; //---------------- All Report Information -------------------- LogI($"--- Report b_level:[{level}] with product id:{args.purchasedProduct.definition.id} "); @@ -747,7 +748,7 @@ namespace Guru try { -/* + #if UNITY_IOS // ---- iOS 订单验证, 上报打点信息 ---- var jsonData = JsonConvert.DeserializeObject(args.purchasedProduct.receipt); @@ -757,7 +758,7 @@ namespace Guru LogI($"--- [{productId}] iOS receipt: {appleReceiptString}"); } #endif -*/ + allReceipts = _validator.Validate(args.purchasedProduct.receipt); // ---- Android 订单验证, 上报打点信息 ---- @@ -783,7 +784,7 @@ namespace Guru { ReportAppleOrder(orderType, appleReceipt.productID, - args.purchasedProduct.receipt, + appleReceiptString, appleReceipt.transactionID, appleReceipt.purchaseDate, level,