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

问题描述

我正在实施一些在Google Play上推出的Android应用程序,并且它们都使用Google IAP自动更新订阅产品类型进行订阅。



测试应用程序我完成了以下工作:


  • 将二进制草稿上传到Google Play,但未发布。

  • 添加我的Google帐户到开发人员控制台中的测试帐户列表
    从eclipse导出我的APK(使用与上载的软件包名称和版本名称/代码相同的软件包) Google Play)
  • 在我的测试设备上安装了这个导出的APK,该测试设备使用测试帐户登录。



我现在能够成功测试我的购买,并且每件事情都能正常工作。但是,据我所知,这次购买是真实的,订阅实际上在整个月内有效。



是否没有办法做任何类型的沙箱测试还是至少有一种方法来过早取消此订阅?



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



任何帮助非常感谢!

解决方案

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

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:

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

  • Created and published the Subscription product in the developer console.

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

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

  • 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?!

Any help is much appreciated!

解决方案

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 /应用内购买订阅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 19:39