Google Play Billing Library 5 purchase flow fails but response code indicates success

Viewed 250

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?

0 Answers
Related