I'm selling consumable products and using Apple's servers for receipt validation via a call from the app to my server.
Twice in past 24 hours, a situation has occurred where the transaction state has updated to SKPaymentTransactionStatePurchased causing the receipt to be sent for validation. However when the response comes back from Apple's server, "body.receipt.in_app" is empty and therefore the purchased product is not added to the user's account.
One of these customers told me that the transaction was showing as "Pending" and a few hours later they received an invoice by email. However the app did not fire another purchased transaction state, so I had to add the purchase manually.
So some questions:
1. Was this unexpected behaviour and likely to be a rare and temporary IAP processing problem?
2. If not, why is the state changing to SKPaymentTransactionStatePurchased if the payment didn't actually complete and is pending?
3. Currently the app is calling finishTransaction when a response is received from my server, but this is NOT dependent on the presence of any inapp purchases in the decoded receipt. I'm thinking that this could be a problem. If the transaction state has not actually completed, is calling finishTransaction going to block any further state changes from being sent to the app, even when that state change is a critically important one when the payment HAS actually been processed and the purchased product should be added to the user's account?