"你已经拥有这个项目"但getPurchases是空的 [英] "You already own this item" but getPurchases is empty

查看:522
本文介绍了"你已经拥有这个项目"但getPurchases是空的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我昨日(不是管理​​产品未管理产品)购买了订阅测试,我自己的退,然后取消订阅。

I purchased a subscription (not a Managed Product or Unmanaged Product) yesterday to test, I refunded myself and then cancelled the subscription. After the refunding and cancelling, when I call:

m_billingService.getPurchases(3, m_context.getPackageName(), ITEM_TYPE_SUBS, null)

这将返回我的购买与 0 的购买状态(有效/ OK)。今天,当我调用相同的方法,将没有返回值。然而,当我尝试购买该项目,谷歌Play商店回应说,我已经拥有的项目。

It would return my purchase with a purchase state of 0 (valid/ok). Today when I call the same method, it returns nothing. Yet when I try to purchase the item, google play store responds that I already own the item.

我已经重新启动了Android设备,清除了谷歌play业务的高速缓存,并确保只有测试帐户是激活我的手机上(即,我删除了我的谷歌开发者帐号)。

I've already restarted the android device, cleared the google play services cache and ensured only the test account is activate on my phone (i.e., I removed my google developer account).

这个问题已经被问过,但总是下的产品,而不是订阅的背景。这些职位的答案似乎是消费的产品;订阅不食用。

The question has been asked before but always under the context of products and not subscriptions. The answer for those posts seem to be to "consume" the product; subscriptions are not consumed.

推荐答案

我相当肯定,你正在尝试做的是不可能的,你正在尝试做的方式。由于我不知道认购长度,有可能是谷歌向你的确还在认购的所有者,因为它即使你发起退款仍是剩余期限活跃。

I am fairly certain that what you are trying to do is not possible the way you are trying to do it. As I am not sure the subscription length, it is possible that to Google you are indeed still an owner of the subscription, because it remains active for the remaining period even if you initiate a refund.

这让用户获得从购买退款,但也仍然收到服务。这将是在应用所有者自由裁量权。这可以是一个很好的策略,如果你要处理与有效投诉用户也让他们保持访问,直到你能解决他们的问题或投诉。它还可以帮助减少收视率不佳的影响。

This allow users to get a refund from the purchase but also still receive the service. This would be at the app owners discretion. This can be a good strategy if you want to handle a user with a valid complaint but also allow them to maintain access until you can fix their issue or complaint. It could also help to minimize the effect of poor ratings.

为了做到你想要什么,你需要撤销认购,这将立即终止它。这个调用m_billingService.getPurchases()后,应该正常工作。

In order to do what you are wanting you need to revoke the subscription, and that will immediately terminate it. After this calling m_billingService.getPurchases() should work correctly.

文档

这篇关于"你已经拥有这个项目"但getPurchases是空的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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