【发布时间】:2014-11-07 22:05:18
【问题描述】:
我一直在使用 Neteller 的 rest API。我一直在努力获得对身份验证密钥的正确响应,我希望有人能指出我正确的方向。
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_URL, "https://api.neteller.com/v1/oauth2/token?grant_type=client_credentials");
curl_setopt($curl, CURLOPT_USERPWD, "clientId:clientSecret");
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type:application/json", "Cache-Control:no-cache"));
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query("scope: default"));
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$serverOutput = curl_exec($curl);
echo $serverOutput;
我得到的响应是“invalid_client”。我已经检查了 clientId 和 secret,它们是正确的
谢谢 卡勒姆
【问题讨论】:
-
您的 IP 可能已被阻止。在这里查看我的答案:stackoverflow.com/a/28449235/2440
标签: php rest payment-gateway