android - 使用 Android 测试应用内订阅的正确预留产品 ID 是什么?

标签 android testing google-play subscriptions

根据 Google's documentation on 'Testing In-app Billing' ,有四个保留的产品 ID 用于计费和订阅服务的应用内测试:

  • android.test.purchased
  • android.test.canceled
  • android.test.refunded
  • android.test.item_unavailable

谷歌上周推出的可用于端到端测试应用内订阅的预留产品 ID 是什么? android.test.purchased 仅适用于“inapp”产品类型,不适用于“subs”产品类型。

最佳答案

我可以通过创建仅在调试版本中显示的廉价测试订阅来测试应用内订阅(但在所有其他方面都是 Google Play 上的有效产品)。 By using a test account described here我能够购买订阅产品并进行端到端测试。

这是关于测试帐户的内容:

To test your in-app billing implementation with actual in-app purchases, you will need to register at least one test account on the Google Play publisher site. You cannot use your developer account to test the complete in-app purchase process because Google Wallet does not let you buy items from yourself. If you have not set up test accounts before, see Setting up test accounts.

Also, a test account can purchase an item in your product list only if the item is published. The application does not need to be published, but the item does need to be published.

When you use a test account to purchase items, the test account is billed through Google Wallet and your Google Wallet Merchant account receives a payout for the purchase. Therefore, you may want to refund purchases that are made with test accounts, otherwise the purchases will show up as actual payouts to your merchant account.

关于android - 使用 Android 测试应用内订阅的正确预留产品 ID 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10764076/

相关文章:

Python 计时 - 一定有更好的方法!

android - OkHttp 忽略日志记录拦截器

java - Gradle 任务构建不包括 android 类的 Jar

android - Android 上的 Asx 流

android - 如何在 Google Play 开发者控制台中取消测试订阅

android - 在谷歌播放应用程序登录期间出现错误 "no key for alias"

android - 有没有办法限制应用程序在 Play 商店的下载量?

android - CertPathValidatorException : Trust anchor for certification path not found

c# - 在不将 WPF 控件添加到窗口的情况下测试它

c# - VS2010 Test Professional/Team Server 的替代品?