I have a problem purchasing subsciption items with the new InAppBilling V3
Here's my IABHelper's handleActivityResult method:
public boolean handleActivityResult(int requestCode, int resultCode, Intent data) {
IabResult result;
if (requestCode != mRequestCode)
return false;
checkSetupDone("handleActivityResult");
// end of async purchase operation
flagEndAsync();
if (data == null) {
Log.e(TAG + "Null data in IAB activity result.");
result = new IabResult(IABHELPER_BAD_RESPONSE, "Null data in IAB result");
if (mPurchaseListener != null)
mPurchaseListener.onIabPurchaseFinished(result, null);
return true;
}
int responseCode = getResponseCodeFromIntent(data);
String purchaseData = data.getStringExtra(RESPONSE_INAPP_PURCHASE_DATA);
String dataSignature = data.getStringExtra(RESPONSE_INAPP_SIGNATURE);\
...
purchaseData and dataSignature are null after that code, and as a result, the purchase flow can't be completed.
When Im trying to purchase in-app items, all works well. purchaseData and dataSignature aren't null.
This guy seem to had the same problem:
Google Play In-App Purchase returns error code -1008: null puchaseData or dataSignature
but it doesn't work for me, Im still getting null for the both fields.
What am I doing wrong? thanks in advance!
I only solved this problem, testing in REAL case. I published the app and sign with one test account, and get valid responses.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With