wupengfei há 2 anos atrás
pai
commit
6bd036f5d5
2 ficheiros alterados com 22 adições e 16 exclusões
  1. 3 1
      .idea/workspace.xml
  2. 19 15
      application/api/controller/CloudWallet.php

+ 3 - 1
.idea/workspace.xml

@@ -219,7 +219,9 @@
       <workItem from="1665621143495" duration="2513000" />
       <workItem from="1665708328289" duration="8744000" />
       <workItem from="1665794611802" duration="1412000" />
-      <workItem from="1665967743750" duration="10167000" />
+      <workItem from="1665967743750" duration="10802000" />
+      <workItem from="1666054299511" duration="1287000" />
+      <workItem from="1666140530691" duration="2614000" />
     </task>
     <task id="LOCAL-00001" summary=".">
       <created>1663731279977</created>

+ 19 - 15
application/api/controller/CloudWallet.php

@@ -19,7 +19,7 @@ require_once env('root_path').'application/common/library/llp/src/client/LLianPa
 class CloudWallet extends Base
 {
 
-    protected $env = 0; //  0 测试环境 1正式环境
+    protected $env = 1; //  0 测试环境 1正式环境
     protected $prefix = 'xl_';
     protected static $domain_name = 'test';
     protected $cloud_url = [
@@ -69,8 +69,9 @@ class CloudWallet extends Base
         ],
     ];
     public function initialize(){
+        $this->uid = input('user_id');
         parent::initialize();
-        parent::check_login();
+        // parent::check_login();
         if(!checkAuth($this->uid))$this->error('暂未开放.....');
     }
 
@@ -115,16 +116,18 @@ class CloudWallet extends Base
                 'occupation' =>18,
             ],
             'accountInfo' => [
-                'account_type' => 'PERSONAL_PAYMENT_ACCOUNT'
+                'account_type' => 'PERSONAL_PAYMENT_ACCOUNT',
+                'account_need_level' => 'V3'
             ],
             'linkedAcctInfo'=>[
                 //'linked_accttype'=> 'LEGALREPT_BANK_CARD',
                 //'linked_acctno'=> $user_info['bank_num'] ,
             ],
         ];
+        //var_dump( json_encode($params,JSON_UNESCAPED_UNICODE));
         $url = $this->cloud_url['apply'][$this->env];
         $result = LLianPayClient::sendRequest($url, json_encode($params,JSON_UNESCAPED_UNICODE));
-        $this->success('ok',json_decode($result,true));
+        $this->success('请求成功',json_decode($result,true));
     }
 
     /**
@@ -172,7 +175,7 @@ class CloudWallet extends Base
         ];
         $url = $this->cloud_url['activate'][$this->env];
         $result = LLianPayClient::sendRequest($url, json_encode($params,JSON_UNESCAPED_UNICODE));
-        $this->success('ok',json_decode($result,true));
+        $this->success('请求成功',json_decode($result,true));
     }
 
     /**
@@ -200,7 +203,7 @@ class CloudWallet extends Base
         $pkg_name = input('get.pkg_name');
         $app_name = input('get.app_name');
         $res =  self::getRandomKey($this->prefix.$user_id, $this->cloud_url['random'][$this->env],$flag_chnl,$pkg_name,$app_name);
-        $this->success('ok',$res);
+        $this->success('请求成功',$res);
     }
     // 获取随机因子
     public static function getRandomKey($user_id,$url,$flag_chnl,$pkg_name,$app_name)
@@ -246,9 +249,9 @@ class CloudWallet extends Base
         ];
         $url =  $url = $this->cloud_url['userinfo'][$this->env];
         $result = LLianPayClient::sendRequest($url, json_encode($params,JSON_UNESCAPED_UNICODE));
-        $res = LianLianPay::userLevel($this->uid);
+        //$res = LianLianPay::userLevel($this->uid);
         // var_dump($res);
-        $this->success('ok',json_decode($result,true));
+        $this->success('请求成功',json_decode($result,true));
     }
 
     /**
@@ -298,7 +301,7 @@ class CloudWallet extends Base
         $res['total_money'] =  !empty($total_money) ? $total_money : 0;
         $res['total_balaval'] =  !empty($total_balaval) ? $total_balaval : 0;
         $res['total_balfrz'] =  !empty($total_balfrz) ? $total_balfrz : 0;
-        $this->success('ok',$res);
+        $this->success('请求成功',$res);
     }
 
     /**
@@ -337,10 +340,9 @@ class CloudWallet extends Base
         ];
         $url = $this->cloud_url['validation'][$this->env];
         $result = LLianPayClient::sendRequest($url, json_encode($params,JSON_UNESCAPED_UNICODE));
-        $this->success('ok',json_decode($result,true));
+        $this->success('请求成功',json_decode($result,true));
     }
 
-
     /**
      * @title 获取钱包流水
      * @desc 获取钱包流水
@@ -364,7 +366,8 @@ class CloudWallet extends Base
      * @return name:total_num type:int default:0 desc:总条数
      * @return name:acctbal_list type:array default:0 desc:列表
      * @return name:acctbal_list.txn_time type:string default:0 desc:商户系统交易时间
-     * @return name:acctbal_list.amt type:float default:0 desc:交易后余额。单位:元
+     * @return name:acctbal_list.amt type:float default:0 desc:出入账金额。单位:元
+     * @return name:acctbal_list.amt_bal type:float default:0 desc:交易后余额。单位:元
      * @return name:acctbal_list.memo type:string default:0 desc:资金流水备注
      * @return name:acctbal_list.txn_type type:string default:0 desc:交易类型[用户充值:USER_TOPUP,手续费收取:SERVICE_FEE,普通消费:GENERAL_CONSUME,手续费应收应付核销:CAPITAL_CANCEL]
      * @return name:acctbal_list.flag_dc type:string default:0 desc:账户出入账标识[DEBIT:出账,CREDIT:入账]
@@ -400,7 +403,7 @@ class CloudWallet extends Base
                 $v['date_time'] = date('Y-m-d H:i:s',strtotime($v['txn_time']));
             }
         }
-        $this->success('ok',$result);
+        $this->success('请求成功',$result);
     }
 
 
@@ -408,6 +411,7 @@ class CloudWallet extends Base
 
 
 
+
     /**
      * @title 收银台支付测试【测试用不对接】
      * @desc 收银台支付测试
@@ -431,7 +435,7 @@ class CloudWallet extends Base
             'payee_type' => 'MERCHANT',
             'payee_amount' => $money,
         ]],$risk_item);
-        $this->success('ok',$res);
+        $this->success('请求成功',$res);
     }
 
     /**
@@ -486,7 +490,7 @@ class CloudWallet extends Base
         ];
         $url =  $url = $this->cloud_url['withdrawal'][$this->env];
         $result = LLianPayClient::sendRequest($url, json_encode($params,JSON_UNESCAPED_UNICODE));
-        $this->success('ok',json_decode($result,true));
+        $this->success('请求成功',json_decode($result,true));
     }