Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In-app purchase Error while retrieving information from server [DF-AA-20]

i'm trying to enable in app billing. I've created In-app-products on my google play console and got my License key. When i try to purchase product. I get this image error.

enter image description here

Here is the code i use to create BillingProcessor.

bp = new BillingProcessor(this, LICENSE_KEY, MERCHANT_ID, new BillingProcessor.IBillingHandler() {
        @Override
        public void onProductPurchased(@NonNull String productId, @Nullable TransactionDetails details) {
            showToast("onProductPurchased: " + productId);
            updateTextViews();
        }
        @Override
        public void onBillingError(int errorCode, @Nullable Throwable error) {
            showToast("onBillingError: " + Integer.toString(errorCode));
        }
        @Override
        public void onBillingInitialized() {
            showToast("onBillingInitialized");
            readyToPurchase = true;
            updateTextViews();
        }
        @Override
        public void onPurchaseHistoryRestored() {
            showToast("onPurchaseHistoryRestored");
            for(String sku : bp.listOwnedProducts())
                Log.d(LOG_TAG, "Owned Managed Product: " + sku);
            for(String sku : bp.listOwnedSubscriptions())
                Log.d(LOG_TAG, "Owned Subscription: " + sku);
            updateTextViews();
        }
    });

LICENSE_KEY is my license key from google play console, and MERCHANT_ID is null.

This is how i buy items.

bp.purchase(this,PRODUCT_ID);

Where PRODUCT_ID is product1 which i use in my google play console, here is the example of my in-app products.

enter image description here

Any idea how to fix this ? There is only one stackoverflow question with DF-AA-20 problem which has no answers. And there is no information on the internet about it. I have tried to use emulator and my android phone.

like image 884
Miljan Rakita Avatar asked Dec 12 '17 17:12

Miljan Rakita


People also ask

Why does my Play Store say error retrieving information from server DF dferh 01?

You might have to also check for Android Updates, not just the play store ones. For that, you will have to go to Settings and scroll down. You will find the About option and check for android updates there. If there are any, make sure to download them and see if this fixes the issue.

How to fix error retrieve information from server in Google Play?

6. Update your Android Device 1. Restart your Android device Restarting is the easiest and the oldest trick in the book. Most software glitches can be easily fixed by restarting the device. This can also solve, Error retrieving information from server problem in Google Play.

Why can't I retrieve information from server [DF-dferh-01]?

Google updates their apps regularly to keep them bug-free and the Play Store app on your mobile might not be updated to the latest build. If you have an outdated version, it could result in Error retrieving information from server [DF-DFERH-01] problem.

How to fix Google Play Store error DF-dferh-01?

To get rid of the Google Play Store error DF-DFERH-01, you can also have a try. Step 1: Go to Settings > Accounts > Google and you can see your Google Account. Step 2: Select it and tap on Remove Account. Step 3: Restart the Android device and add it back.

Why can’t I download any apps on my Android phone?

Tap Storage Clear Cache. Next, tap Clear data. Re-open the Play Store & try your download again. If you still can’t download after you clear the cache & data of the Play Store, restart your device. Press and hold the Power button until the menu pops up.


2 Answers

DF-AA-20 means your app is not published in any way on the Play store. This is normally because either:

  • you haven't published it yet. To test In-App Billing it must be pushed to at least alpha. See the testing IAB docs for more information
  • your app or developer account has been banned/suspended for abuse
  • you make some change to your package name/applicationId, so that in your apk it doesn't match the one on Play. Developers sometimes do this with build flavors
like image 80
Nick Fortescue Avatar answered Sep 28 '22 02:09

Nick Fortescue


Oh, I had this exception when I tested buys in my product with different sku.
Check your sku!
Sku must be not CAPS! Only [a-z][0-9]!

like image 23
xoxol_89 Avatar answered Sep 28 '22 02:09

xoxol_89