I am using Codeless IAP in my game and my game is currently iOS only. I just got $70 of unverified revenue, and in iTunesConnect I got $0 revenue. I am wondering does Codeless IAP Button automatically verify receipt? If not, how should I avoid fraud like this using Codeless IAP?
Sorry if anyone posted this before, but I couldn’t find any answer to this. Thanks in advance!
We don’t automatically verify receipts with Codeless IAP. You could modify IAPButton.cs, and add logic to include the CrossPlatformValidator Unity - Manual: Receipt validation
If you didn’t want to modify the IAPButton file, you can also use the CrossPlatformValidator in the OnPurchaseComplete callback method, since the Product will be passed through to that method.
I have made a feature request with the IAP team to add this as a more automatic process.
Do you mean that using the product parameter in the callback function to replace e.purchasedProduct?
var result = validator.Validate(e.purchasedProduct.receipt);
=> var result = validator.Validate(product.receipt);
Something like this? (the line is copied from https://docs.unity3d.com/Manual/UnityIAPValidatingReceipts.html)
As I don’t want to buy product by real money for debugging, I just call it in Unity Editor and it fails the validation. Are there any ways to test for it?
Hi @kk3hi3123 ,
Buying a product in Editor will not offer a receipt, so it can’t pass the validation.
You can find sample code for local receipt validation in ‘Assets\Plugins\UnityPurchasing\script\IAPDemo.cs’.
Using a test account in Google Play or sandbox in iOS App Store will not charge real money.
Please find more information on these pages.