Skip to content

Instantly share code, notes, and snippets.

@furkanaydgn
Created October 14, 2022 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save furkanaydgn/4582cb4eaf12c6ac42a740f2a05d10ed to your computer and use it in GitHub Desktop.
Save furkanaydgn/4582cb4eaf12c6ac42a740f2a05d10ed to your computer and use it in GitHub Desktop.
checkEnvironmentReady
const checkEnvironmentReady = async () => {
try {
let message = await HMSInAppPurchases.isEnvReady(true);
console.log(message);
let sandbox = await HMSInAppPurchases.isSandboxActivated();
console.log(sandbox);
getProductsInformation();
// alert("Success(HMSInAppPurchases.isEnvReady):" + JSON.stringify(message, null, 4));
} catch (errMsg) {
console.log(errMsg);
alert("Error(HMSInAppPurchases.isEnvReady): " + errMsg + + JSON.stringify(errMsg, null, 4));
checkEnvironmentReady();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment