|
@@ -59,10 +59,11 @@ class WithdrawService
|
|
|
$token = self::$token;
|
|
|
$res = json_decode(self::do_request(self::$url . $url, compact('data', 'token'), ['content-type:application/json'], true, true), true);
|
|
|
if ($res['code'] == 200) {
|
|
|
- var_dump($res);
|
|
|
- $res['data'] = self::decode($res['data']);
|
|
|
- $res['data'] = base64_decode($res['data']);
|
|
|
- return $res;
|
|
|
+ try {
|
|
|
+ return self::decode($res['data']);
|
|
|
+ } catch (\Exception $exception) {
|
|
|
+ throw new ApiException($exception->getMessage());
|
|
|
+ }
|
|
|
} else {
|
|
|
throw new ApiException($res['msg'] ?? '处理失败');
|
|
|
}
|
|
@@ -95,7 +96,7 @@ class WithdrawService
|
|
|
$aes = new \Crypt_AES(CRYPT_AES_MODE_ECB);
|
|
|
$aes->setKey(self::$aeskey);
|
|
|
$data = $aes->decrypt(base64_decode($businessBodyString));
|
|
|
- return $data;
|
|
|
+ return base64_decode($data);
|
|
|
}
|
|
|
|
|
|
|