Google Play应用内帐单订阅回调 [英] Google play in-app billing subscription callbacks
问题描述
所以我正在使用Google的InAppBillingService
,并且遇到了问题.
so i'm using InAppBillingService
from Google, and i've run into issue.
主要有两种操作类型:
-
购买,我没有遇到任何问题,现在有可用的Google Play开发者API,可让我们的服务器检查购买是否成功等等.
Purchase, with which i had no issue, there is Google Play Developer API avialible now, which allows our server to check if purchase was success and so on.
订阅,在这里我完全迷失了.首先,根本没有办法以编程方式取消客户订阅,第二件事是,购买和订阅的响应是相同的.但是我想通过回叫来知道,例如,客户是否取消了订阅,或者是否在正确的时间将钱转入了商户帐户.
Subscriptions, here i'm totally lost. First of all, by simply no way to cancel customer subscription programmaticaly, second thing is that responce for both purchase and subscription is the same. But i want to have a callback to know, for example, if customer cancelled subscription, or money was transfered to merchant account in correct time.
问题:通过阅读这篇文章 Android In-App计费订阅状态更改回调,我已经发布了有关回调的问题并没有真正解决,我希望实现方面有所变化,这使我可以跟踪每个周期的付款或通过回调取消批量订阅.任何帮助表示高度赞赏.
Question: by reading this post Android In-App Billing Subscription status change callbacks, i've released that question for callbacks wasn't really answered, i hope that there was changes in implementation, which allows me to track payments every period or bubscription cancelation by callbacks. Any help highly appreciated.
推荐答案
您说对了,目前应用内结算API不支持从购买应用内部以编程方式取消订阅.但是您可以使用 Google Play开发者API 取消订阅.在使用API之前,您需要按照此处.
You're right that currently the In-app Billing API does not provide support for programmatically canceling subscriptions from inside the purchasing app. But you can cancel subscription using Google Play Developer API. Before you can use the API, you will need to set up an APIs Console project, create a client ID and generate a refresh token as described here.
没有回调可知道何时取消或续订.您可以在应用启动时跟踪INAPP_PURCHASE_DATA
响应的 purchaseState .
There is no callback to know when a subscription is cancelled or renewed. You can track purchaseState of INAPP_PURCHASE_DATA
response at app launch.purchaseState
is the purchase state of the order. Possible values are 0 (purchased), 1 (canceled), or 2 (refunded). But due to local caching you might not immediately get the right response.
这篇关于Google Play应用内帐单订阅回调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!