6

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!

Community
  • 1
  • 1
dor506
  • 5,246
  • 9
  • 44
  • 79
  • 1
    I got the same invalid null result, though i pass the correct item type "subs". Did you found a solution for your problem? – 0xPixelfrost Jul 22 '13 at 11:12

1 Answers1

1

I only solved this problem, testing in REAL case. I published the app and sign with one test account, and get valid responses.

Felipe FMMobile
  • 1,641
  • 20
  • 17