Open razarahil opened 1 year ago
I have the exactly opposite situation, but for your case my workable code shows that maybe you're missing CdvPurchase.Platform.GOOGLE_PLAY
inside store.initialize
.
Also, make sure to keep your productId as myID
instead of com.mybrand.myproject.myID
I also don't see getOffer()
in your case, here's my commit which fixed IAP's btw: https://github.com/Doyban/FlyingPlane/commit/b42786fc3895b77a6f4023a835b3d335554124d4
I have the exactly opposite situation, but for your case my workable code shows that maybe you're missing
CdvPurchase.Platform.GOOGLE_PLAY
insidestore.initialize
.
Fixed in https://github.com/Doyban/FlyingPlane/commit/751f22aaad2b5aaa9f32bf54a3cca5242b589bde
Hello @razarahil, did you find any solution for it? Im facing the same issue on cordova-plugin-purchase v13.11.1.
Work Fine with ios Platform if (this.platform.is('ios')) { this.platform.ready().then(() => { this.store.verbosity = CdvPurchase.LogLevel.DEBUG;
NOT WORK IN ANDROID else if (this.platform.is('android')) { this.platform.ready().then(() => {
setListeners() {
}
DEBUG OUTPUT
[CdvPurchase.GooglePlay.Bridge] INFO: listener: {"type":"ready","data":{}} subscription-plans:6567 [CdvPurchase.GooglePlay] DEBUG: Ready subscription-plans:6567 [CdvPurchase.Adapters] INFO: GooglePlay initialized. subscription-plans:6567 [CdvPurchase.Adapters] INFO: GooglePlay products: [{"type":"consumable","id":"productId1","platform":"android-playstore"},{"type":"consumable","id":"productId2","platform":"android-playstore"}] subscription-plans:6567 [CdvPurchase.GooglePlay] DEBUG: Load: [{"type":"consumable","id":"productId1","platform":"android-playstore"},{"type":"consumable","id":"productId2","platform":"android-playstore"}] subscription-plans:6567 [CdvPurchase.GooglePlay] DEBUG: getAvailableProducts: ["productId1","cproductId2"] | [] subscription-plans:6567 [CdvPurchase.GooglePlay.Bridge] INFO: getAvailableProducts() subscription-plans:6567 [CdvPurchase.GooglePlay] DEBUG: Loaded: [] subscription-plans:6567 [CdvPurchase.GooglePlay] DEBUG: getPurchases subscription-plans:6567 [CdvPurchase.GooglePlay.Bridge] INFO: getPurchases() subscription-plans:6567 [CdvPurchase.GooglePlay.Bridge] INFO: listener: {"type":"setPurchases","data":{"purchases":[]}} subscription-plans:6567 [CdvPurchase.GooglePlay] DEBUG: onSetPurchases: [] subscription-plans:6567 [CdvPurchase.GooglePlay] DEBUG: onPurchaseUpdated: subscription-plans:6567 [CdvPurchase.AdapterListener] DEBUG: receiptsReady: android-playstore (1/0) subscription-plans:6567 [CdvPurchase.GooglePlay] DEBUG: getPurchases success subscription-plans:6567 [CdvPurchase.Adapters] INFO: GooglePlay products loaded: [{"isError":true,"code":6777012,"message":"Product with id productId1 not found.","platform":"android-playstore","productId":"productId1"},{"isError":true,"code":6777012,"message":"Product with id.productId2 not found.","platform":"android-playstore","productId":"productId2"}] subscription-plans:6567 [CdvPurchase.Adapters] INFO: GooglePlay receipts loaded: [] subscription-plans:6567 [CdvPurchase.AdapterListener] DEBUG: setSupportedPlatforms: android-playstore (1 have their receipts ready) subscription-plans:6567 [CdvPurchase.AdapterListener] DEBUG: triggering receiptsReady() subscription-plans:6567 [CdvPurchase] DEBUG: Calling callback: type=ready() name=#b59ce24a9a0dfb9fdcdcaa0604eeaff8 subscription-plans.component.ts:202 Store is ready subscription-plans.component.ts:204 undefined subscription-plans.component.ts:205 Products: [] subscription-plans:6567 [CdvPurchase] DEBUG: Calling callback: type=receiptsReady() name=#15659ee54654cd3de0a0225d90426d46 subscription-plans:6567 [CdvPurchase.ReceiptsMonitor] DEBUG: receiptsReady... subscription-plans:6567 [CdvPurchase.ReceiptsMonitor] DEBUG: check(0/0) subscription-plans:6567 [CdvPurchase.ReceiptsMonitor] INFO: receiptsVerified()
nothing fatched in product
Thank you in advance