2016年6月20日之后取消Google Play IAB测试购买的订单

Ant*_*nio 30 android in-app-purchase google-play

我长期使用Google Play应用内购买(IAP),但最近(2016年6月20日)他们更新了Payments Merchant Center,以便不再显示测试购买.我引用最近发给开发者的电子邮件:

"以前,测试购买一次性IAP会生成订单ID.从2016年6月20日开始,一次性IAP将不会生成订单ID,也不会出现在Merchant Center中."

我在链接中找不到有关购买(非订阅)的信息:https: //developer.android.com/google/play/billing/billing_testing.html 该页面有一个"取消已完成的测试购买",仅对订阅进行评论.

我的问题是,如果他们没有出现在Payments Merchant Center中,我在哪里取消测试购买?

更新 - Google支持的官方回答:

感谢您与Google Play开发者支持小组联系.我检查了它,Play Developer Console目前不支持取消测试IAP.唯一的方法是消费IAP或等待14天的消费时间.

更新2-感谢Mike的答案,我插入了以下代码:

            Purchase premiumPurchase = inventory.getPurchase(Constants.SKU_PRO);
            if (premiumPurchase != null) {
                App.mHelper.consumeAsync(premiumPurchase, new IabHelper.OnConsumeFinishedListener() {
                    @Override
                    public void onConsumeFinished(Purchase purchase, IabResult result) {
                        Log.d(TAG, "Test purchase is consumed.");
                    }
                });
            }
Run Code Online (Sandbox Code Playgroud)

我只运行此代码取消测试购买,并再次调试完整的购买流程.

Mik*_*ike 12

取消应用内购买的最简单方法是使用它.如果您使用谷歌提供的IabHelper,您只需调用consumeAsync并传递购买.我维护一个功能来消费所有应用程序的应用程序内产品; 这基本上是用于测试的计费重置功能.