我正在尝试实现Payments Lite。
购买请求有效,没有任何问题。
与购买清单相同。它返回:
[
{
"purchase_token": "###",
"product_id": "###",
"app_id": "###",
"purchase_time": ###,
"payment_id": "######",
"consumed": false,
"signed_request": "###",
"payment_action_type": "charge"
}
]
但是,如果我尝试使用purchase_token
消费此购买,则请求将返回:
{
"error": {
"message": "(#100) Tried accessing nonexisting field (consume) on node type (GamesIAPOrder)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "CPjKLsTkf/G
"
}
}
我正在使用以下代码:
FB.API("/" + purchaseToken + "/consume", HttpMethod.GET, OnConsume, new Dictionary<string, string> {
{"access_token", accessToken}
});
我该如何解决?
答案 0 :(得分:1)
使用purchase_token
而不是HttpMethod.POST
来消耗HttpMethod.GET
https://developers.facebook.com/docs/games_payments/payments_lite#consuming