payments
payments copied to clipboard
`transactionReceipt` in `Order` on iOS deprecated
I think the plugin uses the long ago deprecated transactionReceipt property on SKPaymentTransaction. It is actually deprecated since iOS 7.0 and can not be validated trough Apple Servers anymore for newer OS versions. I suggest the following implementation to obtain the receipt on iOS:
get transactionReceipt(): string {
const receiptData = NSData.dataWithContentsOfURL(NSBundle.mainBundle.appStoreReceiptURL);
if (receiptData) {
return receiptData.base64EncodedStringWithOptions(0);
}
return null;
}
Thanks for sharing this! If I saved the apple store receipt ID when someone subscribes, can I still access that somewhere in a way similar to this?
Hey, we have the same problem which keeps us using a different plugin instead of this one. Sadly, this is a deal-breaker for our company when iOS is not supported..
I submitted a PR for this issue, can be tracked here: https://github.com/NativeScript/payments/pull/38