My app has been in production for over two years with no changes to the autorenewable IAP mechanism. Suddenly, the flow broke for production and sandbox. In my request, I make sure to include 'exclude-old-transactions'. Instead of going to SKPaymentTransactionStatePurchased when adding a new payment to queue, it goes straight to SKPaymentTransactionStateRestored despite the fact that the latest SANDBOX receipt has 'purchase_date' of February 5th, 2019. Sandbox purchases only last a few minutes! How is this possible? Interestingly, this latest receipt has 'original_purchase_date' set to today (June 12th).
The request returns status 0, and I assume this is why it goes straight to the restored state. The problem is; when I verify the receipt and check the expiration date, it is negative and thus the app is broken. Instead of allowing the purchase to go thru, it attempts a restore for an expired receipt and understandably fails.
PLEASE HELP!!!! THIS IS BROKEN IN PRODUCTION AND I NEED HELP ASAP. I have no idea what broke; this code has worked for two years.