Cancelling orders on Google Play IAB test purchases after June 20, 2016(在 2016 年 6 月 20 日之后取消 Google Play IAB 测试购买的订单)
问题描述
我一直在使用 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.我维护了一个功能来消费应用程序的所有应用程序内产品;这本质上是一个用于测试的计费重置功能.</p>
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 测试购买的订单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 2016 年 6 月 20 日之后取消 Google Play IAB 测试购买的订单
基础教程推荐
- Android:对话框关闭而不调用关闭 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01