I am trying to test my auto-renewable subscription using the sandbox. So I am getting the local receipt from mainBundle.appStoreReceiptURL?.path, and sending that to my server which then sends it on to the App Store. I then parse the response from the app store. So far so good. My subscription renewal server code works.
I have two iTunes testing accounts verified, and i have successfully purchased and renewed my auto-renewable subscription products for both accounts. The problem is, sometimes i get a receipt back from the app store that does not match that of the current logged in iTunes account but of the previous and vice versa. I know the receipt is related to the other test iTunes account becuase the 'original_transaction_id' is different, and the recipts do not contain a record of the transactions executed by the current logged in user.
Please can someone advise?