[Sandbox] Consumable products "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 I 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 removedTransactions SKPaymentQueueDelegate 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,
Aurélien.

Replies

We are encountering the same issue in all our builds. Can you confirm that this just happens in Sandbox environment? We are currently investigating if it is an issue with the new builds and if there is a possibility this happens once they are live as well.

Thanks.
We have the same issue. Yesterday our testers found out they can't buy the same in-app second time with message "This In-App purchase has already been bought. It will be restored for free." There was no changes in payment code in our application. We are using Unity Purchasing library version 2.2.7 from January. I tried TestFligh, development build and ad-hoc build which all uses sandbox payments and the bug is everywhere.

We have version of our app currently in production that has no issue but are afraid of release next version from TestFlight. We need confirmation from Apple that payments will be ok in production.

Thank you
Have same issue.
I have consumable products
  • 2_coins_for_1.99

  • 5_coins_for_4.99

  • and other consumables

I can purchase 2_coins_for_1.99 successfully first time successfully,
but when I try to purchase 2_coins_for_1.99 again I got

This in app purchase already been bought it will be restored for free

I'm testing in a sandbox
My team has also been experiencing the same issue since Thursday night. finishTransactions is no longer properly removing the transactions from the queue.

Code Block
NSArray<SKPaymentTransaction *> *transactions = [[SKPaymentQueue defaultQueue] transactions];
NSLog(@"BEFORE transactions = %@", transactions);
for (SKPaymentTransaction *txn in transactions) {
[[SKPaymentQueue defaultQueue] finishTransaction:txn];
}
transactions = [[SKPaymentQueue defaultQueue] transactions];
NSLog(@"AFTER transactions = %@", transactions);
// Output:
BEFORE transactions = (
"<SKPaymentTransaction: 0x2802c8b10>",
"<SKPaymentTransaction: 0x2802c8c60>",
"<SKPaymentTransaction: 0x2802c8c40>",
"<SKPaymentTransaction: 0x2802c8c20>",
"<SKPaymentTransaction: 0x2802c8b00>"
)
AFTER transactions = (
"<SKPaymentTransaction: 0x2802c8b10>",
"<SKPaymentTransaction: 0x2802c8c60>",
"<SKPaymentTransaction: 0x2802c8c40>",
"<SKPaymentTransaction: 0x2802c8c20>",
"<SKPaymentTransaction: 0x2802c8b00>"
)

ios15 bete2, i found that finishTransactions is no longer properly removing the transactions from the queue.

Guys,It should be a problem with Apple's system. Apple released StoreKit2, which may affect the current payment system. Wait for Apple to fix this problem.

This problem seems to have been fixed in iOS15 beta3. I confirmed that is working correctly.

We have the same problem even on iOS15.1 and iOS15.2 Beta. We're sure that we call finishTransaction. Does anyone know the workaround or something?

  • It seems this occurs only when using SANDBOX account.

Add a Comment