简体   繁体   English

如何在服务器端消费Google In-App购买

[英]How to consume Google In-App purchases Server-side

I need to be able to consume a purchase without an Android client being connected using a backend server. 我需要能够消耗购买没有Android客户端使用后端服务器连接。 Is this possible? 这可能吗? If not, why? 如果没有,为什么? I am trying to make it possible to process a purchase entirely without a user being connected in the case of a disconnection. 我试图在不连接用户的情况下完全处理购买交易。

Do I need to send a message to my client from my server requesting consumption and then provide a response to the server when the purchase is consumed? 我是否需要从服务器向客户发送请求消费的消息,然后在消费被消费时向服务器提供响应? This is what I am trying to avoid. 这就是我要避免的事情。

I see various other similar questions but they are for the AIDL API which is now discontinued for google-in-app billing. 我看到了其他各种类似的问题,但它们是针对AIDL API的,现已不再适用于Google-in-app计费。

Relative API(s); 相对API;

https://mvnrepository.com/artifact/com.google.apis/google-api-services-androidpublisher/v3-rev103-1.25.0 https://mvnrepository.com/artifact/com.google.apis/google-api-services-androidpublisher/v3-rev103-1.25.0

SOLUTION: To my knowledge, at this current time, July 2019, it is not possible to consume a purchase from a server. 解决方案:据我所知,当前是2019年7月,目前无法从服务器上消费商品。 It is only possible from the android client. 这只能从android客户端上进行。

This means that the flow of the purchase depends on a request to a client and an response from the client, followed by a required GET to validate the purchase has actually been consumed. 这意味着购买流程取决于对客户的请求和来自客户的响应,然后是必需的GET,以确认购买已被实际消耗。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM