Aurelien
Aurelien

Reputation: 159

in-app purchase consumable product "already bought"

My app only offers consumable in-app purchase products.

I can successfully purchase a product once but when I try to purchase it again, a popup "This In-App purchase has already been bought. It will be restored for free." appears and the first transaction is restored: the payment queue delegate is notified that a new transaction (with the same identifier as the successful transaction) is updated to the purchased state. I never get a purchased transaction with a new identifier and hence consider that the purchase failed.

Also, each time the app is put in foreground again or at startup, the payment queue delegate is notified that a transaction has been updated (as if it had never been finished). Even though the app properly finishes the transaction each time.

Side notes:

  1. I guarantee that all purchased or failed transactions are finished (confirmed by the SKPaymentQueueDelegate removedTransactions method being called each time). I even tried to call finishTransaction from the main thread with no success.
  2. Right before the subsequent purchase attempts, the transactions queue is empty.
  3. I'm also pretty sure I was able to purchase several times the same product last week, with no change in code (same app version from Testflight).
  4. I observe this behaviour when building the app with Xcode or when distributed via Testflight. It has not been published yet so I cannot check how it behaves in the Production environment.

Do you have any clue on what's going on? Could it be a side effect of using the Sandbox environment?

Thanks for your help,

Upvotes: 0

Views: 438

Answers (1)

Aurelien
Aurelien

Reputation: 159

The issue has disappeared yesterday, what other developers have confirmed.

It definitely was a Sandbox issue and it would have been nice if Apple engineers had confirmed it too...

Upvotes: 0

Related Questions