Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GOOGLE PLAY] Billing API update my code doesn't work. #1555

Closed
ArbitaryMann opened this issue Apr 9, 2024 · 2 comments
Closed

[GOOGLE PLAY] Billing API update my code doesn't work. #1555

ArbitaryMann opened this issue Apr 9, 2024 · 2 comments

Comments

@ArbitaryMann
Copy link

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");
}
}

@j3k0
Copy link
Owner

j3k0 commented May 14, 2024

Have you figured it out? Please reopen if not.

@j3k0 j3k0 closed this as completed May 14, 2024
@ArbitaryMann
Copy link
Author

ArbitaryMann commented May 14, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants