【发布时间】:2017-03-06 18:28:53
【问题描述】:
我正在使用以下 api:http://apidocs.mifinity.com/#/doc/2 但它不起作用??
我的 API 密钥
$data = array(
'key' => "1234567777"
);
$url = 'https://demo.mifinitypay.com/';
$ch = curl_init($url);
$postString = http_build_query($data, '', '&');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postString);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);
【问题讨论】:
-
不以什么方式工作?你有错误吗?你检查过你的错误日志吗?
-
它什么也没返回
-
你检查过你的错误日志吗?
-
是的,我做到了,不会出现任何错误。
-
我可以通过使用 PHP 的 HttpRequest() 类而不是 CURl 来解决这个问题。