[Closed] Consumable - "This In-App Purchase has already been bought. It will be restored for free"

I’m using codeless IAP in version 1.15.0 I only have consumable items, and, until now, they have purchased without problems. Now, on my iPad, I get the above message. I suspect a conflict may have occurred when I clicked ‘Buy’ a second time, before the transaction completed.

Whatever caused this, I cannot get it cleared, even with new builds.

Thanks

@ZzappSizzler Please try clearing your Google Play cache Fix problems downloading apps with basic troubleshooting steps - Google Play Help

Thanks Jeff,

I’m on the Apple store. I looked up the procedure for clearing the cache on Apple and it worked!!

I have to say that since Codeless IAP is presented as a solution, but a simple click ‘Buy consumable’ while waiting for a consumable purchase to complete causes this problem, then it seems to me that codeless IAP is not yet complete as a solution.

Your suggestion did however fix my immediate problem.

Thank you.

@ZzappSizzler If you could, please provide specific steps to reproduce on a new IAP project, and we will look into it.

Thank you Jeff,

This problem is quite easy to reproduce:

  1. Click on “Buy” for a consumable purchase.
  2. Before the purchase has been completed, click on “Buy” again
  3. The first purchase will complete
  4. The second will appear to be processed as usual (“Do you want to buy xx”) etc
  5. But the message “This purchase has already been bought. It will be restored for free” will appear.
  6. From this point purchases are impossible, the “This purchase has already been bought” keeps appearing.
  7. Clearing the Appstore cache fixes the problem

I will investigate. However, you might consider disabling the button for a short time during the purchasing processing or similar, likely using a co-routine, to avoid this behavior.

Thanks. I will be researching workarounds today (Australia time).

@ZzappSizzler Sounds good. For additional customizations like this, you might want to go the code route instead of Codeless IAP. However, it this does turn out to be consistent behavior, we could consider this feature request as part of the codeless route too.

Jeff,
I have put the relevant normal IAP code in my game and removed the codeless IAP script. I can still reproduce the same problem by clicking the buy button a second time before a purchase has completed, but the message "This purchase has already been bought. It will be restored for free" will only appear once. I originally wanted to go the codeless route to save time, but have just discovered that the code for IAP is straightforward and only took a couple of hours to implement.

Thank you for your help.

So you disabled the button so users could not click on it while a purchase was in progress? Did you use a co-routine? That is why I suggested to go the code route

Jeff, what I discovered was that with the code route there is no need to disable the button, no need for a coroutine.

Code route: If the user clicks “Buy” a second time before the transaction has been processed, the message "This purchase has already been bought. It will be restored for free" will only appear once and then after that the user can buy as usual.

Codeless route: The user will be stuck with receiving that message until the store cache is reset. Purchases are impossible until they do.

@ZzappSizzler Thank you for the update. So the code route is working for you, but it sounds like we may have an issue with the Codeless IAP button?

I think there is an issue with the codeless IAP button. Clicking “Buy” a second time before a purchase has completed seems to lock up the purchase process with the message "This purchase has already been bought. It will be restored for free", appearing until the cache has been reset.

The code route seems to be working for me.

1 Like