I am following the steps for testing interrupted in-app purchases, as outline in the Apple docs here under the header Test an Interrupted Purchase. My problem starts on step 6., which states:
"In your code, observe that the payment fails. The payment queue receives an updated transaction in the state SKPaymentTransactionState.failed."
This works for me, but the failed state triggers my UI to show an error alert saying that the payment failed, even though it's just gearing up to show the Terms & Conditions page.
Is there a way to detect when a transaction has actually failed, versus when it's just being put on pause to let some other action take place? I would have expected that the SKPaymentTransactionState state here be deferred
instead of failed
, as that would make it much easier to handle appropriately.