Sam
Sam

Reputation: 1230

iOS In-App-Purchase Sandbox restoring consumable purchase

My app contains only consumable IAPs. I am attempting to buy the same consumable IAP second time in a row in a sandbox environment, but 3 seconds after the transaction a screen pops up saying that the purchase has been already bought and will be restored for free.

Since the IAP is defined as consumable in iTunes Connect, I don't see how app store wants to restore it. Is this just a sandbox bug and will work when submitted?

Upvotes: 1

Views: 1353

Answers (2)

k06a
k06a

Reputation: 18755

You need to finish transaction wherever it is SKPaymentTransactionStatePurchased or SKPaymentTransactionStateFailed:

[[SKPaymentQueue defaultQueue] finishTransaction:transaction];

Upvotes: 0

nachshon fertel
nachshon fertel

Reputation: 85

Make sure the IAP is marked as consumable in Itunes Connect. This should solve the problem...

https://i.sstatic.net/Mhrll.png

Upvotes: 0

Related Questions