0

I'm adding in-app billing in one of my application. I created a test account and added a credit card to it. I bought the product once and it all went fine. Now I want to test this same flow again. How do I do this?

The pendingIntent in the following code is always null whenever I try to buy an item.

Bundle buyIntentBundle = mService.getBuyIntent(3, getPackageName(),
                KEY_AD_FREE, "inapp", "");
PendingIntent pendingIntent = buyIntentBundle.getParcelable("BUY_INTENT");

Is it because I've bought the product already, or is there some other issue?

omerjerk
  • 4,090
  • 5
  • 40
  • 57
  • 1
    Check this [SO question](http://stackoverflow.com/questions/13896666/in-app-billing-test-android-test-purchased-already-owned?rq=1) if it can help you. – KENdi Aug 12 '16 at 09:23

1 Answers1

0

You can only buy Non-Consumable products once because Google Play remembers the purchase. You have to call yourIabHelperInstance.consumeAsync(purchase, mConsumeFinishedListener); so you sending a request to Google to delete its "notice". I'm also currently trying this but it dosent work for me. Please answer me if you can solve your problem ;) (all tutorials say that it have to work with consumeAsync...)

Nic
  • 27
  • 6