Not Getting The Response From In-App Billing

北战南征 提交于 2019-12-11 00:46:10

问题


I am Implementing Android In-App Billing in my app But I am not getting Json Response from Google play.

    @Override
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
                 if (Consts.DEBUG) {
                        Log.d(TAG, "buying: " + mItemName + " sku: " + mSku);
                    }
                 mSku="android.test.purchased";
                    if (mManagedType != Managed.SUBSCRIPTION &&
                            !mBillingService.requestPurchase(mSku, Consts.ITEM_TYPE_INAPP, mPayloadContents)) {
                        showDialog(DIALOG_BILLING_NOT_SUPPORTED_ID);
                    } else if (!mBillingService.requestPurchase(mSku, Consts.ITEM_TYPE_SUBSCRIPTION, mPayloadContents)) {
                        // Note: mManagedType == Managed.SUBSCRIPTION
                        showDialog(DIALOG_SUBSCRIPTIONS_NOT_SUPPORTED_ID);
                    }

            }
        });

I m getting Screen where Google play Ask For card no. like "VISA XXX-FAKE" and Accept & Buy Button. After clicking on accept & buy i am not getting response.

I think something went wrong here while click on "OK" button to buy. I haven't changed anything in Sample code. Please help.

Thanks


回答1:


I believe that when using the "VISA XXX-FAKE" method you can only get signed responses if you pre-register your device ID under your developer account.



来源:https://stackoverflow.com/questions/12033363/not-getting-the-response-from-in-app-billing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!