Created
January 23, 2019 18:58
-
-
Save akahnn/f9513af6cb79d2e8fab035ef4c1ccfcd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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