Open gtebbutt opened 6 years ago
An update for those who might find this later: it seems that the callback to InAppUtils.purchaseProduct
still receives a deprecated iOS 6 style transactionRecipt
(Apple docs) but the InAppUtils.receiptData
function will give the newer iOS 7 style appStoreReceipt
(Apple docs).
My short term solution is to ensure that InAppUtils.receiptData
is called from my JS code after every purchase, and the response stored accordingly in the DB. That said, I think it would be beneficial to update the library to use the appStoreReceipt
consistently - especially since transactionReceipt
has been deprecated for several iOS versions now.
@gtebbutt thanks for figuring out the problem. Can you send a PR with a fix for this?
Instead of making a breaking change, we can continue to support both i guess. Along with transactionReceipt
we can return receiptData
in the purchaseProduct response.
I'm having a bit of trouble with Apple's own documentation on this, so apologies in advance if I've missed something obvious!
As far as I can tell,
transactionReceipt
returns an "iOS 6 style" receipt (regardless of actual iOS version) - which, in turn, will only give me the latest single subscription transaction when validated with Apple. I'm trying to retrieve full payment history for a given subscription, which appears to need an iOS 7 style receipt.Is there a flag in the library to switch the receipt style, and/or a method to use the data already provided in order to get that full history from the Apple API?