瀏覽代碼

会员升级

Kirin 1 年之前
父節點
當前提交
13857550ad
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      crmeb/services/WithdrawService.php

+ 3 - 3
crmeb/services/WithdrawService.php

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