-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
Load local receipt at startup to see my owned products are #1529
Comments
I'm noticing a similar issue. This happens both with/without using a custom validator. If the validator is removed, and validation is done only on the device, the The docs also show an example set of code to check for owned products, and it also never returns Example code: store.when().receiptUpdated(localReceipt => {
localReceipt.transactions.forEach(transaction => {
transaction.products.forEach(product => {
if (store.owned(product)) {
console.log('You own product: ' + product.id);
}
});
});
}); I'm happy to help get this resolved, whatever way I can, but it does appear to be an issue on version |
I am experiencing the same issue. I am using iOS and testing on Sandbox, purchasing an auto-renewable subscription. The receipt that gets loaded at startup, only has one transaction which is for the app itself, the transaction with ID appstore.application. But it does not have any transaction for the subscription itself. If I call store.restorePurchases() afterwards, the transactions show up. If the subscription happens to be automatically renewed when the app is open (every 5 minutes with apple sandbox monthly), the app also recognizes this ok and verifies it ok. But if I close the app, and open it again, the app receipt will only have the transaction with ID appstore.application. I had not noticed this with version 11, could be because the old store.refresh() called restorePurchases? |
I have the same problem. When I do a store.get(productId, CdvPurchase.Platform.APPLE_APPSTORE) and check if the user owns the product - product.owned is never set for the auto renewing subscription. It works fine on Android. |
I have tried something that worked.
|
Same problem. Upon app starting - all receipts and events show product is not owned. Calling |
It seems that after I made a purchase and restart the app it will not load my receipt and the transactions. Only the call
store.restorePurchases()
will fix that. But from what I read in the issues this call should be avoided as the transactions should be loaded at startup.As stated here https://github.com/j3k0/cordova-plugin-purchase/wiki/HOWTO:-Migrate-to-v13#product-ownership the receipt is loaded, but it seems not in my case.
So my question here is, why it is not loaded my purchased subscriptions and only load them when I call
store.restorePurchases()
My code:
The text was updated successfully, but these errors were encountered: