如何使用非消耗性产品在应用程序计费中测试Android [英] How do you test Android in app billing with non-consumable products

查看:97
本文介绍了如何使用非消耗性产品在应用程序计费中测试Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我正在构建一个使用免费增值"功能的Android应用.货币化模型.我可以使用测试卡,始终批准"进行购买, 溢价"的升级非消耗性产品就可以了.我遇到的问题是,一旦我购买了该产品,就再也无法测试购买相同的非消耗性产品. 我在这里遵循了测试建议: https://developer.android.com/google /play/billing/test .我已经取消/退款了以下所述的测试购买费用: https://support .google.com/googleplay/android-developer/answer/2741495 .我从Google收到一封确认电子邮件,内容是与测试卡相关联的电子邮件地址上有关订单取消的信息.订单管理下的Google Play控制台确认测试购买已退款.但是,BillingClient.launchBillingFlow()现在现在始终返回BillingClient.BillingResponseCode.ITEM_ALREADY_OWNED.我已经在与同一个测试卡google帐户相关联的多个Android设备上进行了尝试. 我确实有适当的代码可以在PurchasesUpdatedListener.onPurchasesUpdated()中使用BillingClient.acknowledgePurchase()确认购买,因此我相信我在应用程序中的购买代码是完整的,明智的.我真的很想在发布之前做更多的测试,而这个问题无疑使这变得更加困难.有没有办法撤销产品的拥有权?谷歌在其文档中提供的订单/退款取消程序显然无效.我宁愿避免无缘无故地创建多个Google帐户,而不必仅使用每个帐户一次就可以进行测试购买.有什么想法吗?

So I'm building an Android app that uses the "freemium" monetization model. I'm able to make purchases with a "test card, always approves" of the "premium" upgrade non consumable product just fine. The problem I'm having is once I make that purchase, I can never test purchase the same non consumable product again. I've followed the testing recommendations here: https://developer.android.com/google/play/billing/test. I've cancelled/refunded the test purchase as outlined here: https://support.google.com/googleplay/android-developer/answer/2741495. I got a confirmation e-mail from google about the order cancellation on the e-mail address associated with the test card. The google play console under order management confirms the test purchase is refunded. However, BillingClient.launchBillingFlow() now consistently returns BillingClient.BillingResponseCode.ITEM_ALREADY_OWNED now. I've tried this on multiple Android devices associated with the same test card google account. I do have code in place to acknowledge a purchase with BillingClient.acknowledgePurchase() in PurchasesUpdatedListener.onPurchasesUpdated(), so I believe my in app purchasing code is complete, flow wise. I'd really like to do more testing before release and this problem is certainly making that harder. Is there a way to revoke the product's owned status? The order/refund cancel procedure google provides in their documentation apparently doesn't work. I'd rather avoid having to make many google accounts for no other reason that using each one just once to make a test purchase. Any thoughts?

谢谢, 欧姆里

推荐答案

如果您正在谈论订阅,则只需携带购买了该产品的电子邮件转到Play商店,然后在订阅"部分下,通过提供任何原因.哇,你完成了.现在,您可以再次购买相同的产品.

If you are talking about subscription, then you can simply go to Play store with your email that purchased the product and under subscriptions section cancel the purchased subscription by giving any reason. Woila you are done. Now you can again purchase same product.

这篇关于如何使用非消耗性产品在应用程序计费中测试Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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