Hi,
When I try to purchase some of my consumable IAP items I’m getting the “You already own this item” in Play Store and I have a log message “Already recorded transaction someTransctionCodexxxxxxx”.
I’ve initialized my IAP items with the consumable argument:
And in the ProcessPurchase(PurchaseEventArgs e) method I’m returning PurchaseProcessingResult.Complete.
Also I tried to manually consume these remaining items by adding m_Controller.ConfirmPendingPurchase(e.purchasedProduct) to the ProcessPurchase method but the same problem remains!
Tried to restart my device, clear Google Play cache/data, reinstall my game, and the problem still remains!
I’m using Unity 2019.4.15f1 and Unity IAP 2.2.2 and In App Purchasing 2.1.1
So some consumables work, and others don’t? Or does it happen every time for all your consumables. Please provide the device logs, and steps to reproduce How To - Capturing Device Logs on Android
I will look forward to your test with the sample project, I appreciate your help. It would be the same test I would run, but I’m booked full at the moment. I was able to purchase a consumable product multiple times just yesterday with this same sample app, and didn’t see the same issue you are seeing.
I think for some reason, after updating to Unity IAP 2.2.2, I got some exceptions and the ProcessPurchase(PurchaseEventArgs e) method wasn’t called and then the items wasn’t consumed!
That’s why I tried to consume these items manually by calling m_Controller.ConfirmPendingPurchase(e.purchasedProduct) into the ProcessPurchase method, but the issue remains, even after rbooting the device and reinstalling the app.
When I reinstall the app I see that the ProcessPurchase(PurchaseEventArgs e) method is called by itself to restore these purchases, and that call happens again each time I uninstall and reinstall the game.
I hope these information will help to investigate the issue.
You should not be using ConfirmPendingPurchase to work around another error. Please compare to the Sample project, then will both of us will have the same project to test with. You mentioned you “got some exceptions”, unfortunately I would not know which errors you might be referring to. Also, only non-consumable products would be expected to Restore, not consumables. Make sure that you don’t change the product type once you create them.
I just downgraded to Unity IAP v1.23.5 and the problem is resolved and I’m able to purchase the items again!
It seems a bug in the latest version of Unity IAP.
I’m not seeing this issue with IAP 2.2.3 when purchasing a consumable or non-consumable product when testing with the Sample IAP project Sample IAP Project
I would ask you to test locally with 2.2.3. It doesn’t require a new version to be uploaded to Google. I was able to add new products too, all while directly side-loading via USB.