I am getting the following from the Google Play IAB API;
The item you requested is not available for purchase
I have however successfully tested against static responses, and in addition, the following code returns myProductId
in the list of available products;
ArrayList<String> skuList = new ArrayList<String> ();
skuList.add("myProductId");
Bundle querySkus = new Bundle();
querySkus.putStringArrayList("ITEM_ID_LIST", skuList);
Bundle skuDetails = service.getSkuDetails(3, activity.getPackageName(), "inapp", querySkus);
In addition I have;
The purchasing code I am using is;
Bundle buyIntentBundle = service.getBuyIntent(3, activity.getPackageName(), "myProductId", "inapp", "payload");
PendingIntent pendingIntent = buyIntentBundle.getParcelable("BUY_INTENT");
activity.startIntentSenderForResult(pendingIntent.getIntentSender(), 1001, new Intent(), Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(0));
Finally, logcat shows the following;
D/Finsky: [1] PurchaseFragment.onStateChange: Error: PurchaseError{type=3 subtype=0}
D/Finsky: [1] PurchaseFragment.onStateChange: Purchase failed: PurchaseError{type=3 subtype=0}
Whilst there are other questions related to this issue, none of them solve it for me;
android.test.purchased
If the app developer hasn't made the app available in your Google Play country, you can't make in-app purchases. If you move to a new country, you can change your Google Play country.
App must be installed from Playstore via opt-in URL. this will help the app to authorize from LICENSING & IN-APP BILLING
(Base64-encoded).
Edit : We can test the signed apk on device by installing using adb tool. and
1.The android:versionCode and android:versionName attributes values in the AndroidManifest.xml of the application that you are installing matches the values of your APK in the Developer Console.
2.Your application is signed with the same certificate that you used for the APK that you uploaded to the Developer Console, before installing it on your device.
http://developer.android.com/training/in-app-billing/test-iab-app.html
12 hours after my last test this was mysteriously working. The symptoms were:
What exactly fixed this i'm unsure. Prior to waiting 12 hours I;
IInAppBillingService
directly to using Google's IABHelper
. The immediate effect was still product unavailable for purchase, however the text was now displayed in red rather than black (what?) and the DFinsky error changed to subtype 4; PurchaseError{type=3 subtype=4}
. I also note that i was not using base64EncodedKey when using IInAppBillingService
directly.Even after all these changes, the issue was still occurring, so I went to bed, woke up this morning and with no further changes it just worked. FML.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With