测试 Android IAP/应用内购买订阅 [英] Testing Android IAP/In-App Purchase Subscriptions

查看:35
本文介绍了测试 Android IAP/应用内购买订阅的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实施几个要在 Google Play 上启动的 Android 应用程序,它们都使用 Google IAP 自动续订订阅产品类型进行订阅.

I am implementing several Android applications to be launched on Google Play and they all have subscriptions using the Google IAP auto-renewing subscription product type.

为了测试应用,我做了以下操作:

To test the app I have done the following:

  • 已将草稿二进制文件上传到 Google Play,但未发布.

  • Uploaded a draft binary to Google Play but not published it.

在开发者控制台中创建并发布了订阅产品.

Created and published the Subscription product in the developer console.

将我的 Google 帐户添加到开发者控制台的测试帐户列表中

Added my Google account to the list of test accounts in the developer console

从 Eclipse 导出我的 APK(与上传到 Google Play 的包名称和版本名称/代码相同)

Exported my APK from eclipse (with the same package name and version name/code as the one uploaded to Google Play)

在我使用测试帐户登录的测试设备上安装了这个导出的 APK.

Installed this exported APK on my test device which is logged in with the test account.

我现在能够成功测试我的购买并且一切正常.但是,据我所知,这次购买是真实的,而且订阅的有效期实际上是整整一个月.

I am now able to successfully test my purchase and every thing works. However, as far as I can see, this purchase is real and the subscription is actually valid for an entire month.

有没有办法进行任何类型的沙盒"测试,或者至少有办法提前取消此订阅?

Is there no way to do any kind of "sandbox" testing or at least a way to prematurely cancel this subscription?

如何测试我的订阅已过期而无需等待一个月的场景?!

How can I test the scenario where my subscription has expired without having to wait a month?!

非常感谢任何帮助!

推荐答案

不适用于订阅.新的 (v3) 应用内计费 API 已发布,但目前不支持订阅.当它发生时,它可能会带来一种更简单的测试方法(尽管似乎不太可能).完成测试后,您只需在商家控制台中取消订阅/购买即可.

Not for subscriptions. The new (v3) in-app billing API has been released, but it currently does not support subscriptions. When it does, it might bring an easier way to test (seems unlikely though). You just have to cancel subscriptions/purchases in the merchant console when you are done testing.

这篇关于测试 Android IAP/应用内购买订阅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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