I've implemented Unity IAP. I have succesfully implemented it before and all went well.
Now at the moment, everything goes well except for 1 consumable. When I try to purchase it, i get the PurchaseFailureReason
with value DuplicateTransaction.
After some googling, I found out that it probably is because the transaction was cleared by Google, but the callback was never invoked inside the app. So somehow and somewhere, a flag is set indicating that this transaction is still pending or something? (The purchase on the - now not working consumable - had also indeed been made before and the callback was NOT called, so this seems to be correct.)
All other consumables work fine. They are configured exactly the same, just with another reward on the callback. (Same method, different parameter. I'm 100% sure this has nothing to do with the bug).
So now I want to try and fix this product.
- I tried reverting the purchase (even though it is a test purchase) inside Google Play.
- I tried manually adding a restore button and clicking it.
Some info:
I am using Unity Codeless API.
Game is only available on android as of yet.
The bug originates from when I tried making a purchase, but (due to bad wifi) i managed to navigate to another screen before the GooglePlay popup came. This disrupted the callback somehow and probably flagged the purchase as "purchased but not completed" or something.
I store receipts from the products in my database so I can compare/ provide support for clients when purchases go sour. The purchase in question never arrived in my database. All corresponding purchases on the same product ID now fail with reason
DuplicateTransaction
Consumable products are configured in Google play, online unity monetization console, in editor iap catalog. All are configured exactly the same 100%
The game is still in Alpha, soon going to Beta (once I fix this :)).