Seems like most (almost all of the IAPs) are working well. But sometimes they don’t. Two people contacted me recently with this problem. The game takes money but content in the game is not purchased.
Then, after 3 days, money refunded, players buy the item again and it works.
I don’t really know where to look, because Unity does everything automatically.
Does anyone have the same problem?
I’m also having trouble with many purchases going into refund.
Do you mean that if I use ConfirmPendingPurchase I won’t have this problem?
Is this going to be fixed in the next version of Unity IAP 2.2.1?
Also, please try with IAP 2.2.7 (Asset version) and In App Purchasing library 2.2.2 (Package Manager). We addressed the issue of auto-refunds (hopefully!)
Please provide the device logs. Place Debug.Log statements in all the IAP callbacks and purchasing methods that you are using so we can debug the issue. The logs will contain the Debug.Log statements (and will confirm the IAP version)
I’ve been getting a similar issue also where the purchase is completed but then it is getting refunded by google. In the code for IAPListener it shows:
My IAP is a non-consumable so I have ‘consumePurchase’ set to false. In which case it only responds with Pending rather than complete… which I’m assuming may be my problem. Maybe I am misunderstanding the ‘consumePurchase’ toggle and should be using true for that?
Correct. That toggle will likely be removed in the future. It’s not related to product type, but product status. If you leave a product in Pending, it will eventually be refunded.
Hey Jeff! If I understand correctly, I always must return PurchaseProcessingResult.Complete inside function ProcessPurchase?
No matter if I have consumable or non-consumable items? It wont consume item then? So old logic changed?
My old code had similar toggle, and it worked before. But now I get refunded purchases after 3 days with non-consumable items.
Hmm, I spent some time and re-checked IAP demo and other stuff…
Its really weird. For non-consumable purchases I returned Pending status. and on next app launch IAP automatically invoke ProcessPurchase for that items and I successfully “restored” purchased items in that way.
This stuff worked great in last year and I had no issues with it.
This year I updated IAP libraries because I was needed Google Play Billing library v3 and seems, now my old logic is not correct.
So, sorry for dumb question:
To remember what player purchased, now I have to locally store some stuff and on app restart retrieve it and “refresh” purchased things?
I dont have any server side integration.