update: 添加日志
parent
7dd2215f29
commit
ad5b1d3149
|
|
@ -584,7 +584,7 @@ namespace Guru
|
||||||
|
|
||||||
if (_validator == null)
|
if (_validator == null)
|
||||||
{
|
{
|
||||||
LogE("[IAP] --- Validator is null. Report Order failed.");
|
LogE($"{Tag} --- Validator is null. Report Order failed.");
|
||||||
Crashlytics.LogException(new Exception($"IAPService can not report order because Validator is null!"));
|
Crashlytics.LogException(new Exception($"IAPService can not report order because Validator is null!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -600,12 +600,15 @@ namespace Guru
|
||||||
var result = _validator.Validate(args.purchasedProduct.receipt);
|
var result = _validator.Validate(args.purchasedProduct.receipt);
|
||||||
string productID = orderType == 0 ? args.purchasedProduct.definition.id : "";
|
string productID = orderType == 0 ? args.purchasedProduct.definition.id : "";
|
||||||
string subscriptionID = orderType == 1 ? args.purchasedProduct.definition.id : "";
|
string subscriptionID = orderType == 1 ? args.purchasedProduct.definition.id : "";
|
||||||
|
|
||||||
|
LogI($"{Tag} --- Report Android IAP Order -> orderType:{orderType} productID:{productID} blevel:{blevel}");
|
||||||
|
|
||||||
foreach (var productReceipt in result)
|
foreach (var productReceipt in result)
|
||||||
{
|
{
|
||||||
if (productReceipt is GooglePlayReceipt google)
|
if (productReceipt is GooglePlayReceipt google)
|
||||||
{
|
{
|
||||||
new GoogleOrderRequest(orderType, productID, subscriptionID, google.purchaseToken, blevel)
|
Debug.Log($"{Tag} --- Report Android IAP Order -> orderType:{orderType} productID:{productID} blevel:{blevel}");
|
||||||
.SetTimeOut(3).Send();
|
new GoogleOrderRequest(orderType, productID, subscriptionID, google.purchaseToken, blevel).Send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif UNITY_IOS
|
#elif UNITY_IOS
|
||||||
|
|
@ -619,6 +622,7 @@ namespace Guru
|
||||||
}
|
}
|
||||||
AddReceipt(receipt);
|
AddReceipt(receipt);
|
||||||
new AppleOrderRequest(orderType, args.purchasedProduct.definition.id, receipt,blevel).Send();
|
new AppleOrderRequest(orderType, args.purchasedProduct.definition.id, receipt,blevel).Send();
|
||||||
|
Debug.Log($"{Tag} --- Report iOS IAP Order -> orderType:{orderType} productID:{args.purchasedProduct.definition.id} blevel:{blevel}");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue