I had a problem when the application loses its network after purchasing the application in the application, it finishTransactiondoes not work. I’m calling finishTransaction(still without an Internet connection), but the next time I launch the application and configure
[[SKPaymentQueue defaultQueue] addTransactionObserver:...];
The user is prompted to enter a password in the App Store. My problem here is that I don’t know what exactly he bought here. If he clicks cancel here, everything will be fine, but if the user enters a password, he will be billed and he will not receive anything. Therefore, I would prefer to cancel all pending transactions.
I already tried using
for (SKPaymentTransaction *transaction in [SKPaymentQueue defaultQueue].transactions) {
[[SKPaymentQueue defaultQueue] finishTransaction:transaction];
}
but [SKPaymentQueue defaultQueue].transactionshere is empty. Are there other options to prevent a user request, but to cancel all pending transactions?