【发布时间】:2018-12-08 08:20:06
【问题描述】:
我知道我可以像这样在用户设备上获取购买信息
https://developers.google.com/android-publisher/api-ref/purchases/products/get
但这里我需要购买令牌,它只在设备上可用。
有没有办法只使用 orderID (GPA.1234-1234-124) 来获取订单信息?
【问题讨论】:
标签: android google-play
我知道我可以像这样在用户设备上获取购买信息
https://developers.google.com/android-publisher/api-ref/purchases/products/get
但这里我需要购买令牌,它只在设备上可用。
有没有办法只使用 orderID (GPA.1234-1234-124) 来获取订单信息?
【问题讨论】:
标签: android google-play
GP order-id 无法直接获取购买信息,但可以通过 purchase-token 获取信息。
有一个地方可以找到purchase-token,打开google play console - order management - order detail by order-id,在页面顶部,你可以找到获取purchase-token的按钮。
使用web-apihttps://developers.google.com/android-publisher/api-ref/purchases/products/get可以获取详细信息。
【讨论】:
该 api 似乎仅适用于应用内购买,不适用于付费应用。
【讨论】:
不,因为这是一个糟糕的主意。此 API 旨在提供服务器端工具,您可以使用这些工具在您自己的安全基础架构中验证购买。如果您将其放入应用程序中,它将很容易受到攻击者和欺诈。
如果您想查看用户在应用中的购买情况,use the normal Billing API。
【讨论】: