Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transactionReceipt in Order on iOS deprecated #15

Open
benedictstrube opened this issue Dec 9, 2021 · 2 comments
Open

transactionReceipt in Order on iOS deprecated #15

benedictstrube opened this issue Dec 9, 2021 · 2 comments

Comments

@benedictstrube
Copy link

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;
}
@jchavezberkeley
Copy link

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?

@PhilippS93
Copy link

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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants