How to remove IAP test purchase from Android Google Play

I set up a beta account to test the IAP application for the Google application I'm working on, the problem is that after I purchased the one-time products (without a one-time payment) the test IAP, I can’t “delete it” as such that now, even when I uninstall the application and reinstall, it remembers the purchase, which is wonderful in the real world for the user, but not very good when trying to fix errors!

Is there a way (other than creating a ton of Gmail accounts for testing) to remove a purchase from an account?

+15
source share
7 answers

This is an old question, but if someone is still looking for a solution, follow the link:

There you can return / cancel test purchases. Then clear the purchase status with this command:

adb shell pm clear com.android.vending

+13
source

The only way I know is to force consume in your application. Then you can delete this code.

+5
source

cc.fovea.cordova.purchase IAP. , .

store.register({
      id: this.predatorID,
      alias: 'Predator Pack',
      type: store.CONSUMABLE //store.NON_CONSUMABLE
    });

, , , ( ). - https://developer.android.com/google/play/billing/billing_testing.html

+1
if (inventory.getPurchase(ITEM_SKU) != null ) {
                try {
                    mIabHelper.consumeAsync(premiumPurchase, new IabHelper.OnConsumeFinishedListener() {
                        @Override
                        public void onConsumeFinished(Purchase purchase, IabResult result) {
                            Toast.makeText(MainActivity.this, "Consumed the test purchase successfully", Toast.LENGTH_SHORT).show();
                        }
                    });
                } catch (IabHelper.IabAsyncInProgressException e) {
                    e.printStackTrace();
                }
             }

refund() revoke() , takeAsync().

+1

. , , , WebView, , Javascript, , . orderId, , . "" . . , , , , . , .

. - " " . - , IAB , IAB.

Google .

0

:

Purchase unlockedPurchase = inventory.getPurchase(SKU_UNLOCKED);
// Log unlockedPurchase.getOrderId();

Google Play " ", ( " ", ).

0

Google Play Google .

https://wallet.google.com

When subscribing, go to the "Transactions" section on the left. Test purchases can be canceled from there.

-1
source

Source: https://habr.com/ru/post/1569354/


All Articles