Inapppurchases: get api query failed “code”:400,“message”:“Invalid Value” “code”:500,“message”:null

半城伤御伤魂 提交于 2019-12-24 03:39:12

问题


I get access_token by this way :https://developers.google.com/android-publisher/authorization

1.use google account allow acess get code

2.use code to get refresh_token

3.use refresh_token get access_token

when use this api

$url_purchase = "https://www.googleapis.com/androidpublisher/v1.1/applications".
                "/$packageName/inapp/$productId/purchases/$token?access_token=".
                $return_data->access_token;
$return_purchase = http_get($url_purchase);

some billing return

{"error":{"code":500,"message":null}}

some billing return

{"error":{"errors":[{"domain":"global","reason":"invalid","message":"Invalid Value"}],"code":400,"message":"Invalid Value"}}

but some billing can success return

{"kind":"androidpublisher#inappPurchase","purchaseTime":"1395035642794","purchaseState":0,"consumptionState":1}

I think the access_token is right, why some billing failed . someone can help me ?thanks very much.

Are there any other way to check billing valid on the server?

来源:https://stackoverflow.com/questions/22471836/inapppurchases-get-api-query-failed-code400-messageinvalid-value-code

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