问题
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