Server side can do something similar to mobile side comsumeAsync() in Google Billing Library?

南楼画角 提交于 2019-12-24 07:55:07

问题


For consumable products, use consumeAsync(), found in the client API.

For products that aren't consumed, use acknowledgePurchase(), found in the client API.

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?

Billing library overview Reference


回答1:


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

This might be helpful. https://developers.google.com/android-publisher/api-ref/purchases/products/acknowledge



来源:https://stackoverflow.com/questions/58130582/server-side-can-do-something-similar-to-mobile-side-comsumeasync-in-google-bil

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!