服务器端可以执行与Google Billing Library中的移动端comsumeAsync()类似的操作吗? [英] Server side can do something similar to mobile side comsumeAsync() in Google Billing Library?
问题描述
对于易耗品,请使用客户端API中的consumeAsync()
.
For consumable products, use consumeAsync()
, found in the client API.
对于未消费的产品,请使用客户端API中的acknowledgePurchase()
.
For products that aren't consumed, use acknowledgePurchase()
, found in the client API.
服务器API中还提供了新的accept()方法.
A new acknowledge() method is also available in the server API.
购买了易耗品后,有什么方法可以在我们的后端确认购买以允许第二次购买?
After purchase the consumable product, is there any way can acknowledge the purchase in our backend side to allow second purchase?
推荐答案
您可以使用类似的url(用于对应用内购买进行服务器端验证)来确认应用内购买.它是一种POST方法,而不是我们用于验证的GET方法.并且您需要在最后添加确认.
You can use similar url which is used for server-side verification of an in-app purchase to acknowledge an in-app purchase. Its a POST method instead of a GET we use for verification. And you need to add acknowledge at the end.
POST https://www.googleapis.com/androidpublisher/v3/applications/packageName/purchases/products/productId/tokens/token:acknowledge
这可能会有所帮助. https://developers.google.com/android-publisher/api-ref/purchases/products/acknowledge
This might be helpful. https://developers.google.com/android-publisher/api-ref/purchases/products/acknowledge
这篇关于服务器端可以执行与Google Billing Library中的移动端comsumeAsync()类似的操作吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!