The app is not configured for billing via Google Play

I am working on an Android project and I am trying to implement In App Billing V3.

I downloaded my app on Google Play and added IAP to the app. I can successfully get the IAP list that my application has along with its price, but when I actually try to make a purchase, my device receives the following error (there is no error in

This version of the application is not configured for Google billing. See the Help Center for more information.

Below is the code that retrieves the available IAP and makes a purchase

ArrayList skuList = new ArrayList(); skuList.add("mysqlmanager_pro"); Bundle querySkus = new Bundle(); querySkus.putStringArrayList("ITEM_ID_LIST", skuList); try { Bundle skuDetail = mService.getSkuDetails(3, getPackageName(), "inapp", querySkus); Log.d("Billing", "Response Received"); int billingResponse = skuDetail.getInt("RESPONSE_CODE"); if (billingResponse == 0) { //Get list of IAP to purcase - NOT NEEDED ArrayList responseList = skuDetail.getStringArrayList("DETAILS_LIST"); Log.d("Billing", "Response"); Bundle buyIntentBundle = mService.getBuyIntent(3, getPackageName(), "mysqlmanager_pro", "inapp", ""); PendingIntent pendingIntent = buyIntentBundle.getParcelable("BUY_INTENT"); startIntentSenderForResult(pendingIntent.getIntentSender(), Defines.IntentRequestCodes.IAP_PURCHASE_REQUEST, new Intent(), Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(0)); /*for (String thisResponse : responseList) { JSONObject object = new JSONObject(thisResponse); String sku = object.getString("productid"); String price = object.getString("price"); }*/ } } catch (Exception ex) { Log.e("Billing", ex.toString()); } 

My onCreate contains the following

 mServiceConn = new ServiceConnection() { @Override public void onServiceDisconnected(ComponentName name) { mService = null; } @Override public void onServiceConnected(ComponentName name, IBinder service) { mService = IInAppBillingService.Stub.asInterface(service); } }; bindService(new Intent("com.android.vending.billing.InAppBillingService.BIND"), mServiceConn, Context.BIND_AUTO_CREATE); 

Below is the manifest file

 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.BoardiesITSolutions.MysqlManager" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="18" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="com.android.vending.BILLING" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.BoardiesITSolutions.MysqlManager.Agreement" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".MainActivity" android:label="@string/app_name"> </activity> <activity android:name=".NewDBConnection" android:label="@string/new_mysql_connection"> </activity> <activity android:name=".ConnectionManager" android:label="@string/connection_manager"> <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity"/> </activity> <activity android:name=".EditDBConnections" android:label="@string/edit_database_connections"> </activity> <activity android:name=".ServerStatus" android:label="Server Status"> <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".ConnectionManager"/> </activity> <activity android:name=".ConnectedDBManagerHost" android:label="Connected to DB"> </activity> <receiver android:name="BillingReceiver"> <intent-filter> <action android:name="com.android.vending.billing.IN_APP_NOTIFY" /> <action android:name="com.android.vending.billing.RESPONSE_CODE" /> <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" /> </intent-filter> </receiver> </application> </manifest> 

Thanks for any help you can provide.

+7
android in-app-purchase
source share
1 answer

There are a few things here:

  • After uploading your apk to Google Play, you need to wait a while for the Google servers to update (similar to the way you publish Update). This may take an hour or two or more. So try again in a few hours.

  • Make sure that the version of the apk you downloaded is configured for IAP (through permissions), and then test only the IAP protocol with the signed APK. That is, export and sign your apk from Eclipse, and then install locally on your device. Otherwise, if you run the unsigned version of the application directly from the IDE, it will not work and you will see an error message.

    Note. You do not need to download a new apk every time you make small changes, if the correct permissions were configured in the current downloaded apk draft and you published your IAP elements in the dev console. The only annoying part is that you have to export and sign your application every time after making changes and run it on the local device.

  • Make sure the versionCode of your downloaded apk has the same versionCode as the local version of apk.

  • You cannot use your developer account to conduct test purchases, because Google Wallet does not allow you to buy items from yourself. Therefore, you need to set up some test accounts in the Developer Console and try to purchase items from the device on which the test account is running.

+39
source share

All Articles