Skip to content

transactionReceipt in Order on iOS deprecated #15

Open
@benedictstrube

Description

@benedictstrube

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions