AlexDisler / cordova-plugin-inapppurchase

A lightweight cordova plugin for in app purchases on iOS/Android
316 stars 192 forks source link

Unable to initialize billing: IabResult: Error checking for billing v3 support. #289

Open ghost opened 4 years ago

ghost commented 4 years ago

ionic version: 5.4.2 cordova android platform: 8.1.0

"{\"code\":-2,\"message\":\"Unable to initialize billing: IabResult: Error checking for billing v3 support. (response: 3:Billing Unavailable)\",\"text\":\"Error checking for billing v3 support. (response: 3:Billing Unavailable)\",\"response\":3,\"errorCode\":-2}"

Hi im having this error when someone trying to purchase non consumable on android. I've also pasted the android billing key to manifest.json under play_store_key

ionViewDidLoad() { this.productId = this.plat.is('ios') ? 'secret' : 'secret'; this.plat.ready().then(() => { if (this.plat.is('cordova')) { let loading = this.loadingCtrl.create({ content: 'Please wait...' }); loading.present(); this.iap.getProducts([this.productId]) .then((products) => { loading.dismiss(); console.log(products); this.products = products; // this.iap.restorePurchases().then(function (data) { // // this.removeAds(1); // // this.sendlog(data); // }) // .catch((err) => { // // this.showAlert(err.errorMessage ? err.errorMessage : err.message, 0); // // this.sendlog(err); // console.log(err); // }); }) .catch((err) => { loading.dismiss(); console.log(err); }); // }); } }); console.log('ionViewDidLoad PurchasePage'); }

GustaveD commented 4 years ago

Hello, You need to put your manifest.json in platform_www in android folder