3

I'm trying to use the billing library 5 https://developer.android.com/google/play/billing/integrate#java, for in app purchases, however I'm encounter the error below when I try to make a purchase:

Error retrieving information from server. DF-DFERH-01

The error appears on the mobile device instead of showing the valid purchase flow. The purchase flow code is shown below:

ImmutableList productDetailsParamsList = ImmutableList.of(
                        BillingFlowParams.ProductDetailsParams.newBuilder()
                        .setProductDetails(skuDetails)
                        .setOfferToken(skuDetails.getOneTimePurchaseOfferDetails().toString())
                        .build()
                );

                BillingFlowParams billingFlowParams = BillingFlowParams.newBuilder()
                        .setProductDetailsParamsList(productDetailsParamsList)
                        .build();

                BillingResult billingResult = billingClient.launchBillingFlow(activity, billingFlowParams);
                System.out.println(billingResult.getDebugMessage());
                System.out.println(billingResult.getResponseCode());

As you can see I figure if there is an error then there should be a debug message or at least a response code. However, there is no debug message and the getResponseCode() shows a 0.

Looking at:

  1. https://developer.android.com/reference/com/android/billingclient/api/BillingResult#getResponseCode()
  2. https://developer.android.com/reference/com/android/billingclient/api/BillingClient.BillingResponseCode

A response code of 0 means success. So how can that be? It's showing an error yet it's successful? Obviously that's not the case.

Also I've already tried below: Google Play error "Error while retrieving information from server [DF-DFERH-01]"

What am I missing here?

Mark
  • 3,138
  • 5
  • 19
  • 36
  • I asked another question, the answer I provided there helped with this question.https://stackoverflow.com/questions/73027160/how-to-pass-token-of-a-one-time-purchase-product-to-google-play-billing-library/73028003#73028003 – Mark Jul 18 '22 at 20:05
  • Thank you, your question helped me to get on the right track while solving a similar issue with subscriptions - the API was returning success but dialog was showing errors. Turns out I have mixed up the subscription purchase tokens. Would've been nice if we got an error when we make a mistake, wouldn't it? :D – NoHarmDan Aug 16 '22 at 13:08

1 Answers1

0

Here are few sceanrio's where this error could come.

  1. You have not added your email under license testing (play console)
  2. Mismatch in the email registered and email configured in google play store.
  3. Clear you cache from the google play store account.
  4. Google api not responding properly.

These are based on my experience, there could be other scenario as well.

Arpit
  • 1,259
  • 11
  • 21