Skip to content

Instantly share code, notes, and snippets.

@akahnn
Created January 23, 2019 18:58
Show Gist options
  • Save akahnn/f9513af6cb79d2e8fab035ef4c1ccfcd to your computer and use it in GitHub Desktop.
Save akahnn/f9513af6cb79d2e8fab035ef4c1ccfcd to your computer and use it in GitHub Desktop.
try {
const x = await purchaseHandler.p(profile, receiptData)
if (x) {
res.status(200).send(profile.premium)
return
} else {
profile.updateAttributes({ premium: false })
}
} catch (ex) {
console.error('[PURCHASE] IOS SUB VERIFICATION ERROR', ex)
profile.updateAttributes({ premium: false })
}
res.status(400).send(false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment