| @@ 490-508 (lines=19) @@ | ||
| 487 | $this->checkResponseSign($request, $signData, $resp, $respObject); |
|
| 488 | ||
| 489 | // 解密 |
|
| 490 | if (method_exists($request,"getNeedEncrypt") &&$request->getNeedEncrypt()){ |
|
| 491 | ||
| 492 | if ("json" == $this->format) { |
|
| 493 | ||
| 494 | ||
| 495 | $resp = $this->encryptJSONSignSource($request, $resp); |
|
| 496 | ||
| 497 | // 将返回结果转换本地文件编码 |
|
| 498 | $r = iconv($this->postCharset, $this->fileCharset . "//IGNORE", $resp); |
|
| 499 | $respObject = json_decode($r); |
|
| 500 | }else{ |
|
| 501 | ||
| 502 | $resp = $this->encryptXMLSignSource($request, $resp); |
|
| 503 | ||
| 504 | $r = iconv($this->postCharset, $this->fileCharset . "//IGNORE", $resp); |
|
| 505 | $respObject = @ simplexml_load_string($r); |
|
| 506 | ||
| 507 | } |
|
| 508 | } |
|
| 509 | ||
| 510 | return $respObject; |
|
| 511 | } |
|
| @@ 148-161 (lines=14) @@ | ||
| 145 | $this->checkResponseSign($request, $signData, $response, $respObject); |
|
| 146 | ||
| 147 | // 解密 |
|
| 148 | if (method_exists($request, "getNeedEncrypt") && $request->getNeedEncrypt()) { |
|
| 149 | if ("json" == $this->format) { |
|
| 150 | $resp = $this->encryptJSONSignSource($request, $response); |
|
| 151 | ||
| 152 | // 将返回结果转换本地文件编码 |
|
| 153 | $r = iconv($this->postCharset, $this->fileCharset . "//IGNORE", $resp); |
|
| 154 | $respObject = json_decode($r); |
|
| 155 | } else { |
|
| 156 | $resp = $this->encryptXMLSignSource($request, $response); |
|
| 157 | ||
| 158 | $r = iconv($this->postCharset, $this->fileCharset . "//IGNORE", $resp); |
|
| 159 | $respObject = @ simplexml_load_string($r); |
|
| 160 | } |
|
| 161 | } |
|
| 162 | ||
| 163 | return $respObject; |
|
| 164 | } |
|