While testing purchases with an Apple sandbox user i somehow generated purchases which are present in the validated receipt but there is no corresponding transaction available in the payment queue.
So here is what i do:
1) On app start i register to the payment queue:
[[SKPaymentQueue defaultQueue] addTransactionObserver:self];
2) no transactions are report via
updatedTransactions:(NSArray *)transactions
3) when a new payment is added, everything works quite fine and a purchase with the state SKPaymentTransactionStatePurchasing
pops up in
updatedTransactions:(NSArray *)transactions
4) the the receipt is then sent to the server and successfully validated. But when i look into the parsed json receipt, i'll also get a few other purchases which were not finished back then (because of some debugging tests).
5) Normally these transactions should pop up in the SKPaymentQueue
when i restart the app and finish. This also works for me now. But there are no corresponding transactions for these few old ones. I only get the recently bought one with the correct state SKPaymentTransactionStatePurchased
Even if i do this, there are no transactions finished (because they are not in the queue):
for (SKPaymentTransaction *transaction in [[SKPaymentQueue defaultQueue] transactions]) {
[[SKPaymentQueue defaultQueue] finishTransaction:transaction];
}
How can i solve this tricky problem?