do fixes bug to partner login bugs
Showing
1 changed file
with
2 additions
and
8 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,15 +211,10 @@ class Yohobuy | @@ -212,15 +211,10 @@ class Yohobuy | ||
212 | unset($data['private_key']); | 211 | unset($data['private_key']); |
213 | } | 212 | } |
214 | if (!empty($data)) { | 213 | if (!empty($data)) { |
214 | + $str = http_build_query($data, null, '&'); | ||
215 | // 新加支持application/x-www-form-urlencoded调用方式 | 215 | // 新加支持application/x-www-form-urlencoded调用方式 |
216 | - $str = ''; | ||
217 | - foreach ($data as $key => $val) { | ||
218 | - $str .= $key . '=' . $val . '&'; | ||
219 | - } | ||
220 | - | ||
221 | - $str = rtrim($str, '&'); | ||
222 | 216 | ||
223 | -// curl_setopt($ch, CURLOPT_POSTFIELDS, $data); | 217 | + //curl_setopt($ch, CURLOPT_POSTFIELDS, $data); |
224 | curl_setopt($ch, CURLOPT_POSTFIELDS, $str); | 218 | curl_setopt($ch, CURLOPT_POSTFIELDS, $str); |
225 | } | 219 | } |
226 | $result = curl_exec($ch); | 220 | $result = curl_exec($ch); |
-
Please register or login to post a comment