do fixes bug to partner login bugs
Showing
1 changed file
with
4 additions
and
10 deletions
@@ -35,7 +35,6 @@ class Yohobuy | @@ -35,7 +35,6 @@ class Yohobuy | ||
35 | * | 35 | * |
36 | * @var array | 36 | * @var array |
37 | */ | 37 | */ |
38 | - | ||
39 | private static $privateKeyList = array( | 38 | private static $privateKeyList = array( |
40 | 'android' => 'fd4ad5fcfa0de589ef238c0e7331b585', | 39 | 'android' => 'fd4ad5fcfa0de589ef238c0e7331b585', |
41 | 'iphone' => 'a85bb0674e08986c6b115d5e3a4884fa', | 40 | 'iphone' => 'a85bb0674e08986c6b115d5e3a4884fa', |
@@ -212,16 +211,11 @@ class Yohobuy | @@ -212,16 +211,11 @@ class Yohobuy | ||
212 | unset($data['private_key']); | 211 | unset($data['private_key']); |
213 | } | 212 | } |
214 | if (!empty($data)) { | 213 | if (!empty($data)) { |
215 | - // 新加支持application/x-www-form-urlencoded调用方式 | ||
216 | - $str = ''; | ||
217 | - foreach ($data as $key => $val) { | ||
218 | - $str .= $key . '=' . $val . '&'; | ||
219 | - } | ||
220 | - | ||
221 | - $str = rtrim($str, '&'); | 214 | + $str = http_build_query($data, null, '&'); |
215 | + // 新加支持application/x-www-form-urlencoded调用方式 | ||
222 | 216 | ||
223 | -// curl_setopt($ch, CURLOPT_POSTFIELDS, $data); | ||
224 | - curl_setopt($ch, CURLOPT_POSTFIELDS, $str); | 217 | + //curl_setopt($ch, CURLOPT_POSTFIELDS, $data); |
218 | + curl_setopt($ch, CURLOPT_POSTFIELDS, $str); | ||
225 | } | 219 | } |
226 | $result = curl_exec($ch); | 220 | $result = curl_exec($ch); |
227 | if (!$returnJson && !empty($result)) { | 221 | if (!$returnJson && !empty($result)) { |
-
Please register or login to post a comment