woocommerce-ios icon indicating copy to clipboard operation
woocommerce-ios copied to clipboard

[IAP] Don't ignore `transaction_reason_invalid` errors from MobilePay any more

Open joshheald opened this issue 1 year ago • 0 comments

Description

Previously, we ignored transaction_reason_invalid errors from the MobilePay API. We ignored them because usually they were the result of submitting a RENEWAL transaction to the /iap/orders endpoint, when notified of a renewal on app launch, via the Transaction.updates queue.

In #10247, we stopped sending RENEWAL transactions to that endpoint, when received on the updates queue, so we no longer need to ignore these errors. If we get this error now, it's unexpected and we should show it.

In particular, if this happens during an actual purchase flow, as happened in {p1691055587490409-slack-C025A8VV728}, we risk showing an "Upgrade successful" screen even though it actually wasn't, which is a poor experience.

Repro

I don't have repro steps for the example above – it happened because of something going wrong with my sandboxed Apple ID, and Apple sending a RENEWAL transaction when I actually made a purchase. I can't repro it now, so testing this is limited to the happy path.

joshheald avatar Aug 03 '23 11:08 joshheald