什么是买了两次,在认购的情况下,RESTORE_TRANSACTIONS反应? [英] What is the response for RESTORE_TRANSACTIONS in case of subscription bought twice?

查看:445
本文介绍了什么是买了两次,在认购的情况下,RESTORE_TRANSACTIONS反应?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能在此测试自己,因为没有办法完全终止订阅,显然。

所以,我想测试以下用例:用户购买订阅,取消的它(或到期),比用户购买相同的订阅

我会得到什么用RESTORE_TRANSACTIONS回应?我将获得两个项目具有相同的项目ID,不同的购买令牌和不同的状态?或purchaseToken将保持不变?恐怕会有只有一个不同的订单ID和购买令牌,将失去在previous订阅信息订阅,但现在我不能确认。此外,将与ORDERID订阅内每购买经常被改变?

为什么我需要这个 - 订阅将每天提供新内容的用户,所以当用户取消申购(认购A),后来买一个新的(订阅B)我需要显示的时间框架内发布的用户内容认购A ,而在订阅乙的时间框架的内容,而不是内容在发布期间使用不有积极认购。


解决方案

  

注意:您应该只在您的应用程序安装的第一次一个设备或者当你的应用程序对 RESTORE_TRANSACTIONS 请求类型从设备被删除并重新安装。


  
  

使用 RESTORE_TRANSACTIONS 定期不推荐,因为性能的影响。


直接从Android开发者 http://developer.android.com拍摄/guide/google/play/billing/billing_overview.html

虽然我明白你的订阅结算的关注。谷歌是pretty好他们的API,以及如何你应该购买的交互。

当您发送 RESTORE_TRANSACTIONS 请您将得到两个广播回来。 A RESPONSE_ code PURCHASE_STATE_CHANGED 。下面是来自谷歌,说明你能接受不同值的表。

现在回到你的问题关于购买两个订阅:你应该检查,如果用户已经购买使用 GET_PURCHASE_INFORMATION 要求订阅,如果订阅列表检查认购的购买国,看看你是否应该购买继续。

至于如果能买两个相同的订阅,你会得到什么,它(我想说的是不可能的)可能性不大......但你会得到两个订单交易。

只要你总是知道用户交易对你的一部分,谷歌的API将做休息。祝你好运!

I can't test this myself, because there is no way to completely terminate subscription, apparently.

So, I want to test the following use case: user buys subscription, cancel's it (or it expires), than user buys same subscription.

What will I get with RESTORE_TRANSACTIONS response? Will I get two items with same item id, different purchase tokens and different state? Or purchaseToken will remain the same? I'm afraid that there will be only one subscription with different order ID and purchase token, and the information on previous subscriptions will be lost, but I can't confirm it right now. Also, will orderId be changed with every recurring purchase inside a subscription?

Why I need this - subscription will supply user with new content daily, so when user cancel subscription (subscription A) and later buys a new one (subscription B) I need to show to user content released during time-frame of subscription A,and content in a time-frame of subscription B, but not the content released in period used didn't had active subscription.

解决方案

Note: You should use the RESTORE_TRANSACTIONS request type only when your application is installed for the first time on a device or when your application has been removed from a device and reinstalled.

Using RESTORE_TRANSACTIONS on a regular basis is not recommended because of performance impacts.

Taken right from Android Developers http://developer.android.com/guide/google/play/billing/billing_overview.html

Although I do understand your concern for the Subscription Billing. Google is pretty good about their API and how you should interact with purchases.

When you send a RESTORE_TRANSACTIONS request you will get two broadcast back. A RESPONSE_CODE and a PURCHASE_STATE_CHANGED. Here's the table from Google stating the different values you could receive.

Coming back to your question about buying two subscriptions: you should check to see if the user has bought a subscription with the GET_PURCHASE_INFORMATION request, if the Subscription is in the list check the Purchase State of the Subscription to see if you should continue with the purchase.

As for what you would get if you "Could" buy two of the same subscriptions, its (I want to say impossible) unlikely... But you will get two order transactions.

As long as you're always aware of the user transactions on your part, Google's API will do the rest. Good luck!

这篇关于什么是买了两次,在认购的情况下,RESTORE_TRANSACTIONS反应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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