this code.
public PurchaseProcessingResult ProcessPurchase (PurchaseEventArgs e)
{
bool validPurchase = true; // Presume valid for platforms with no R.V.
// Unity IAP's validation logic is only included on these platforms.
#if UNITY_ANDROID || UNITY_IOS || UNITY_STANDALONE_OSX
// Prepare the validator with the secrets we prepared in the Editor
// obfuscation window.
var validator = new CrossPlatformValidator(GooglePlayTangle.Data(),
AppleTangle.Data(), Application.identifier);
try {
// On Google Play, result has a single product ID.
// On Apple stores, receipts contain multiple products.
var result = validator.Validate(e.purchasedProduct.receipt);
// For informational purposes, we list the receipt(s)
Debug.Log("Receipt is valid. Contents:");
foreach (IPurchaseReceipt productReceipt in result) {
Debug.Log(productReceipt.productID);
Debug.Log(productReceipt.purchaseDate);
Debug.Log(productReceipt.transactionID);
}
} catch (IAPSecurityException) {
Debug.Log("Invalid receipt, not unlocking content");
validPurchase = false;
}
#endif
if (validPurchase) {
// Unlock the appropriate content here.
}
return PurchaseProcessingResult.Complete;
}
Not forund 2 Reference
GooglePlayTangle.Data()
AppleTangle..Data()
You can find it
Assets\Plugins\UnityPurchasing\generated
Copy & Paste Your Resource Folder
Done!
☆ if not found this
Unity iOS build- cocoa pods Environment Setup (0) | 2021.08.16 |
---|---|
Git Hub 계정 생성, Educaion 계정 만들기. (0) | 2021.04.02 |
스플레쉬 구현 (0) | 2020.12.22 |
Unity IAP Purcahse code (0) | 2020.12.18 |
Unity 슬로우모션 , FixedUpdate Controll via script (0) | 2020.12.14 |
Unity IAP Product Local price (0) | 2020.12.02 |