Open ArbitaryMann opened 3 weeks ago
Here is my code i tryed couple times but never got it working.
function initStore() { CdvPurchase.store.verbosity = CdvPurchase.LogLevel.DEBUG; try{ setTimeout(() => { sendSubscriptionSuccessNotification(); }, 2500);
}catch{ } CdvPurchase.store.register([ { id: 'dayemmonth', type: CdvPurchase.ProductType.NON_CONSUMABLE, platform: CdvPurchase.Platform.GOOGLE_PLAY, } ]); CdvPurchase.store.initialize([CdvPurchase.Platform.GOOGLE_PLAY, CdvPurchase.ProductType.NON_CONSUMABLE]); CdvPurchase.store.update();
}
function purchaseAccess() { showLoader(6000); const productId = 'dayemmonth'; const product = CdvPurchase.store.get(productId, CdvPurchase.Platform.GOOGLE_PLAY); if (product) { product.order(); } else { alert("Product not found"); } }
Here is my code i tryed couple times but never got it working.
function initStore() { CdvPurchase.store.verbosity = CdvPurchase.LogLevel.DEBUG; try{ setTimeout(() => { sendSubscriptionSuccessNotification(); }, 2500);
}
function purchaseAccess() { showLoader(6000); const productId = 'dayemmonth'; const product = CdvPurchase.store.get(productId, CdvPurchase.Platform.GOOGLE_PLAY); if (product) { product.order(); } else { alert("Product not found"); } }