2016年6月20日后取消Google Play IAB测试订单 [英] Cancelling orders on Google Play IAB test purchases after June 20, 2016

查看:116
本文介绍了2016年6月20日后取消Google Play IAB测试订单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很长一段时间都在使用Google Play应用内购买(IAP),但最近(2016年6月20日)他们更新了Payments Merchant Center,以便测试购买不再显示。我引用了最近给开发人员的一封电子邮件:
$ b 以前,一次性IAP的测试购买会生成订单ID。从2016年6月20日开始,一次性IAP不会生成订单ID并且不会出现在Merchant Center中。



我没有在链接中找到有关购买(不是订阅)的信息:
https://developer.android.com/google/play/billing/billing_testing.html
The我的问题是,如果他们没有出现在Payments Merchant中,我可以在哪里取消测试购买?中心?



更新 - Google支持部门的正式答复:

感谢您与Google Play开发者支持部门联系。
我检查了它并且Play开发者控制台目前不支持取消测试IAP。唯一的方法是消耗IAP或等待14天的消耗时间。


更新2-由于Mike的回答,我插入了下面的代码:

 购买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,测试购买已消耗。);
}
});
}

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

解决方案

取消应用程序内购买的最简单方法是使用它。如果您使用Google提供的 IabHelper ,您可以调用consumeAsync并通过购买。我保留一个函数来消费所有应用程序的应用程序内产品;这实际上是一个用于测试的帐单重置功能。<​​/ p>

I been using Google Play in-app purchases (IAPs) for a long time, but recently (June 20, 2016) They updated the Payments Merchant Center so that test purchases are not shown anymore. I quote a recent email to developers:

"Previously, test purchases for one-time IAPs generated order IDs. Starting June 20, 2016, one-time IAPs will not generate order IDs and will not appear in the Merchant Center."

I have found no information regarding purchases (not subscriptions) in the link: https://developer.android.com/google/play/billing/billing_testing.html The page has a "Canceling completed test purchases" that only comments on subscriptions.

My question is, where do I cancel a test purchase, if they do not appear in Payments Merchant Center?

UPDATE- Official answer from Google Support:

Thanks for contacting Google Play Developer Support. I checked into it and the Play Developer Console doesn’t currently support cancelation of test IAP. The only ways is to either consume the IAP or wait the 14 days consumption time.

UPDATE 2- Thanks to the answer below from Mike, I inserted the code below:

            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.");
                    }
                });
            }

I only run this code to cancel the test purchase, and debug the complete purchase flow again.

解决方案

The easiest way to cancel an in-app purchase is to consume it. If you use the Google provided IabHelper you can just call consumeAsync and pass in the Purchase. I maintain a function to consume all the app's in-app products; this is essentially a billing reset function for testing.

这篇关于2016年6月20日后取消Google Play IAB测试订单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆