-
-
Save amandeepmittal/01fe42d07b59d44aea08813b57e88665 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
import InAppBilling from "react-native-billing"; | |
async purchase() { | |
try { | |
await InAppBilling.open(); | |
const details = await InAppBilling.purchase("android.test.purchased"); | |
console.log("You purchased: ", details); | |
} catch (err) { | |
console.log(err); | |
} finally { | |
await InAppBilling.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment