Closed TerrorCards closed 1 month ago
Also tried this import
import "cordova-plugin-purchase/www/store";
and calling CdvPurchase from window
const { store, ProductType, Platform } = window.CdvPurchase;
Same thing, store.products is an empty array.
store.initialize([Platform.TEST]).then(() => {
store.ready(() => {
store.update().then(() => {
1st remark, calling "update" right after "initialize" is a mistake, the initial "update" is done by initialize (among other things).
Then, you error is that the "TEST" platform only accepts a set of predefined product IDs. Cf https://github.com/j3k0/cordova-plugin-purchase/wiki/v13-reference:-Test-Adapter
If you want to use an Apple or Android product, defined them on the store an initialize the appropriate platform.
For me the ready callback is never called and now products found. Running on Android emulator and I have logged into the Google Play Store.
Observed behavior
Installed version 13
Ran npx cap sync as well.
Imported into the app file
Code in called in the component Did Mount of react app
Tried to use
But the call back in react doesn't ever seem to be called.
Function pulls listed of coins available, and then registers the product for them. Store.registeredProducts shows the items, but Store.Products is an empty array.
registeredProducts has the items
Products is empty
Include logs with
CdvPurchase.store.verbosity = CdvPurchase.LogLevel.DEBUG
Expected behavior
Use to work when I installed awesome plugin, but when the appstores request an update to the billing apk, I upgraded to 13 and made the changes, now the store no longer works.
System Info
Output of
cordova info
.