title: IabHelper.OnIabPurchaseFinishedListener not calling in In-app purchase subscription v3
body: <p>I am trying to get back to the IabHelper.OnIabPurchaseFinishedListener when purchasing is over for my subscription , but the problem is Its not calling when purchase is done .</p>
  
  <p>I had tried with onactivity result but still its not working 
  here Is my code block
  I'm extending fragments as below</p>
  
  <pre><code>public class ConfirmationScreen extends Fragment {
  
  mHelper = new IabHelper(getActivity(), base64EncodedPublicKey);
  mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() {
      public void onIabSetupFinished(IabResult result) {
          Log.d(TAG, "Setup finished.");
  
          if (!result.isSuccess()) {
             // Oh noes, there was a problem.
             complain("Problem setting up in-app billing: " + result);
             return;
          }
  
          // Have we been disposed of in the meantime? If so, quit.
          if (mHelper == null) return;
  
          // IAB is fully set up. Now, let's get an inventory of stuff we own.
          Log.d(TAG, "Setup successful. Querying inventory.");
          //  mHelper.queryInventoryAsync(mGotInventoryListener);
      }
  });
  
  IabHelper.QueryInventoryFinishedListener mGotInventoryListener = new IabHelper.QueryInventoryFinishedListener() {
      public void onQueryInventoryFinished(IabResult result, Inventory inventory) {
          Log.d(TAG, "Query inventory finished.");
          // Have we been disposed of in the meantime? If so, quit.
          if (mHelper == null) return;
  
          // Is it a failure?
          if (result.isFailure()) {
              complain("Failed to query inventory: " + result);
              return;
          }
          Log.d(TAG, "Query inventory was successful.");
  
          /*
           * Check for items we own. Notice that for each purchase, we check
           * the developer payload to see if it's correct! See
           * verifyDeveloperPayload().
           */
  
          Purchase gasPurchase = inventory.getPurchase(SKU);
          if (gasPurchase != null &amp;&amp; verifyDeveloperPayload(gasPurchase)) {
              Log.d(TAG, "We have gas. Consuming it.");
              mHelper.consumeAsync(inventory.getPurchase(SKU), mConsumeFinishedListener);
              return;
          }
      }
  };
  
  //Callback for when a purchase is finished
  IabHelper.OnIabPurchaseFinishedListener mPurchaseFinishedListener = new IabHelper.OnIabPurchaseFinishedListener() {
      public void onIabPurchaseFinished(IabResult result, Purchase purchase) {
          Log.d(TAG, "Purchase finished: " + result + ", purchase: " + purchase);
          // if we were disposed of in the meantime, quit.
          if (mHelper == null) return;
          Log.d(TAG, "Purchase successful.");
          if (purchase.getSku().equals(SKU)) {
              //bought 1/4 tank of gas. So consume it.
              Log.d(TAG, "Purchase is gas. Starting gas consumption.");
          }
      }
  };
  </code></pre>
  
  <p>I have referred to <a href="https://stackoverflow.com/questions/14800286/oniabpurchasefinished-never-called">this</a> link</p>