简体   繁体   中英

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

I am 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.

in-app purchase error

Here is the code I use to create BillingProcessor.

    bp = new BillingProcessor(getApplicationContext(), 
 getString(R.string.google_licence_key), this);
    bp.initialize(); // binds
    boolean isAvailable = BillingProcessor.isIabServiceAvailable(this);
    if (!isAvailable) {
        // continue
        Toast.makeText(getApplicationContext(), "YESSSSSSSSs", Toast.LENGTH_LONG).show();
    }

    btn_bill.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Toast.makeText(getApplicationContext(), "CLICKED", 
            Toast.LENGTH_LONG).show();
            // bp.purchase(BillingActivity.this,android.test.purchased");
            bp.subscribe(BillingActivity.this, "xyz"); //, "DEVELOPER PAYLOAD HERE"
        }
    });

The possibility of error,

  • Need to upload app on the app store for the beta, alpha or live version at least once.
  • Uploaded app on play store app version and testing app version should be same,
  • Please verify created product id and requesting product id same or not,
  • Also finally verify product are active or Inactive, If Inactive then active it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM