Unity IAP ProcessPurchase called even if purchase was not completed

I am encountering a bug, seemingly in Unity IAP system, where consumable purchases that were cancelled by the user or that failed for other reasons are still sent through and ProcessPurchase gets called anyway at the next startup of the app, allowing for fake purchases to take place.

This, however, happens only for the first purchase after deleting the app data or installing, but the bug happens again each time data is deleted.

Steps for reproducing are below.

I am mostly using the standard Unity IAP implementation (with code) on Android as per the tutorial.

I have tried checking the receipts but all cancelled/failed orders show correct receipts, also I have tried on accounts that were not on the testers list to see if it was a problem with test credit cards but still it wasn’t working.

I have also noticed that when OnInitialized gets called no product appears to be on the StoreController, so no pending transactions could be found and marked for deletion, but ProcessPurchase will get called regardless.

Steps for reproducing:

  1. Delete app data from phone or reinstall app.
  2. Start a purchase and cancel it or leave it in the IAP UI.
  3. Close the app.
  4. Open the app again. ProcessPurchase is called as if the first purchase was completed.
  5. Try again steps 2-4, ProcessPurchase is not called this time.

Same is happening to us on android.
Once Google play store window is open, pause the game, kill the game.
The next app startup ProcessPurchase is called.

Did you manage to figure it out?
Thanks.

Happens to me too… Any solutions? ,Happens to me too. I think it only happens after a user purchased that item. deleted the app . pressed the item in the store ( but did not buy ) restart game and the money is there ( even tho its a consumable and should not return )

This only happens if u bought the item successfully. then delete the app. download again. click on buy button but dont buy → restart app → ull get the item , even tho its a consumable and u deleted the app.
Anyone else had this bug? when is it going to be fixed