...
|
...
|
@@ -212,7 +212,16 @@ class Yohobuy |
|
|
unset($data['private_key']);
|
|
|
}
|
|
|
if (!empty($data)) {
|
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
|
|
// 新加支持application/x-www-form-urlencoded调用方式
|
|
|
$str = '';
|
|
|
foreach ($data as $key => $val) {
|
|
|
$str .= $key . '=' . $val . '&';
|
|
|
}
|
|
|
|
|
|
$str = rtrim($str, '&');
|
|
|
|
|
|
// curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $str);
|
|
|
}
|
|
|
$result = curl_exec($ch);
|
|
|
if (!$returnJson && !empty($result)) {
|
...
|
...
|
|