我一直在使用 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开发者控制台目前不支持取消测试IAP.唯一的方法是消费 IAP 或等待 14 天的消费时间.
更新 2- 感谢 Mike 的以下回答,我插入了以下代码:
Purchase premiumPurchase = inventory.getPurchase(Constants.SKU_PRO);if (premiumPurchase != null) {App.mHelper.consumeAsync(premiumPurchase, new IabHelper.OnConsumeFinishedListener() {@覆盖public void onConsumeFinished(Purchase purchase, IabResult 结果) {Log.d(TAG, "测试购买已消耗.");}});}
我只运行此代码来取消测试购买并再次调试完整的购买流程.
取消应用内购买最简单的方法是消费它.如果您使用 Google 提供的 IabHelper 你可以调用 consumeAsync 并传入 Purchase.我维护了一个功能来消费应用程序的所有应用程序内产品;这本质上是一个用于测试的计费重置功能.
I have 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 the 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 the cancelation of test IAP. The only ways are 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 测试购买的订单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!