简体   繁体   中英

GooglePlay Billing Static Responses. Authentication is required. You need to sign into your Google Account

I'm testing static response of Google Play In App Purchase.

As document( https://developer.android.com/google/play/billing/billing_testing.html ) said, static response testing should work without apk uploading. But the authentication error keep occurring.

Authentication is required. You need to sign into your Google Account

I'm testing with my developer account, and it is opted-in beta test user list also.

Here is my purchase flow code. Does anyone have similar problem?

        Bundle buyIntentBundle  = mService.getBuyIntent(3, mActivity.getPackageName(), _item, "inapp", "test");
        PendingIntent pendingIntent = buyIntentBundle.getParcelable("BUY_INTENT");

        if (pendingIntent != null)
        {
            mHelper.launchPurchaseFlow(mActivity, mActivity.getPackageName(), REQUEST_CODE, mPurchaseFinishedListener, "test");
        }
        else
        {
            // Cannot purchase
            Toast.makeText(mActivity, "purchase failed", Toast.LENGTH_SHORT).show();
        }

Where did you get the exampe code?

mHelper.launchPurchaseFlow() takes second argument for product code NOT package name.

Your code must be change like this:

mHelper.launchPurchaseFlow(this, SKU_GAS, 10001, mPurchaseFinishedListener, "bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ"); https://developer.android.com/training/in-app-billing/purchase-iab-products.html

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