Inapppurchases:获取api查询失败"代码":400,"消息":"无效值" "代码" 500"消息":空

时间:2014-03-18 06:26:33

标签: google-api in-app-purchase in-app-billing

我通过这种方式获得access_token:https://developers.google.com/android-publisher/authorization

1.使用Google帐户允许访问代码

2.使用代码获取refresh_token

3.use refresh_token get access_token

使用此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);

一些结算回报

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

一些结算回报

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

但某些结算可以成功返回

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

我认为access_token是对的,为什么有些结算失败了。有人可以帮助我吗?非常感谢。

有没有其他方法可以检查服务器上的帐单是否有效?

0 个答案:

没有答案