|
@@ -199,7 +199,7 @@ class WithdrawService
|
|
$res = json_decode(self::do_request($url, $data, ['content-type:application/json'], true, true), true);
|
|
$res = json_decode(self::do_request($url, $data, ['content-type:application/json'], true, true), true);
|
|
if ($res['code'] == 200) {
|
|
if ($res['code'] == 200) {
|
|
try {
|
|
try {
|
|
- return self::decode($res['data']);
|
|
|
|
|
|
+ return self::decode($res['data'], $res['msg'] ?? '');
|
|
} catch (\Exception $exception) {
|
|
} catch (\Exception $exception) {
|
|
throw new ApiException($exception->getMessage());
|
|
throw new ApiException($exception->getMessage());
|
|
}
|
|
}
|
|
@@ -232,14 +232,14 @@ class WithdrawService
|
|
* @param $businessBodyString
|
|
* @param $businessBodyString
|
|
* @return mixed
|
|
* @return mixed
|
|
*/
|
|
*/
|
|
- public static function decode($businessBodyString)
|
|
|
|
|
|
+ public static function decode($businessBodyString, $msg)
|
|
{
|
|
{
|
|
//进行Aes解密
|
|
//进行Aes解密
|
|
include_once 'phpseclib/Crypt/AES.php';
|
|
include_once 'phpseclib/Crypt/AES.php';
|
|
$aes = new \Crypt_AES(CRYPT_AES_MODE_ECB);
|
|
$aes = new \Crypt_AES(CRYPT_AES_MODE_ECB);
|
|
$aes->setKey(self::$aeskey);
|
|
$aes->setKey(self::$aeskey);
|
|
$data = $aes->decrypt(base64_decode($businessBodyString));
|
|
$data = $aes->decrypt(base64_decode($businessBodyString));
|
|
- return json_decode(base64_decode($data), true);
|
|
|
|
|
|
+ return array_merge(json_decode(base64_decode($data), true), ['msg' => $msg]);
|
|
}
|
|
}
|
|
|
|
|
|
public static function checkSign($data, $sign)
|
|
public static function checkSign($data, $sign)
|