My understanding is that this is designed behaviour: the App Store won’t allow a user to buy another consumable item until the first one has been “consumed” by your app. Unity seems to implement this consuming behaviour once a purchase is marked as Complete.
The purchase is marked as Complete by either returning PurchaseProcessingResult.Complete from the ProcessPurchase method of your IStoreListener (for synchronous handling) or by registering the purchase as confirmed with the IStoreController with ConfirmPendingPurchase (for asynchronous handling of purchases that returned PurchaseProcessingResult.Pending from IStoreListener.ProcessPurchase).
I still haven’t implemented the handling of “restored” purchases and mark them as complete, but I think it has something to do with the Apple Store Extension triggering ProcessPurchase again on the next initialisation of the Purchasing module.
As @matt_icejam said. If you don’t consume it, you can’t buy it again. The same thing happens on Android as well back when we tested it (don’t think it’s changed, but that was about a year ago). Unity has example code for their iap system and I believe it has a autoconsume part when the purchase is successful.
I have similar system of locking the interface, and the problem is I can’t unlock it till I get a callback from the store. I’d expect to get a OnPurchaseFailed or any other callback to know that we can continue with a game flow.
It shouldn’t be intentional cause the pending state is a legitimate state. It should call the OnPurchaseFailed method with one of the failure reasons while it calls nothing.
I have spent FOUR days trying to fix this. I sure have learned a lot about IAP and tried many fixes in my scripts, but nothing worked. I discovered that on iOS Unity throws a NullReferenceException when it starts and receives the unfinished transaction. I was told by Unity that shouldn’t be a problem, but IAP would not work, it would be stuck in the endless “This purchase has already been bought” loop. I tried new Sandbox testers, but, very soon, the problem would reappear. I uninstalled and reinstalled both 1.17 and 1.18 several times, but nothing worked.
Finally, I installed a plugin - Easy Mobile Pro. It is so much simpler to implement, why on earth Unity IAP has to be so hard to get under the hood I don’t know. Anyway, after a couple of hours changing my scripts, guess what? IAP on iOS is working! The plugin sits on top of Unity IAP, so why it works where the Unity Purchaser script didn’t, I don’t know. It sure simplifies putting IAP in my game. and IAP is now working, that’s all I know. And you can access the scripts, no dlls.