xxxrrrdddd 2 éve
szülő
commit
5785691832

+ 4 - 2
application/admin/controller/DrawRecord.php

@@ -89,10 +89,12 @@ class DrawRecord extends Backend
         if($info['status'] != 0 )return json(['code'=>0,'msg'=>'当前提现已审核']);
         Db::startTrans();
         try {
-            DrawLogic::drawToUser($info);
+            if($info['type']==3) {
+                DrawLogic::drawToUser($info);
+            }
             $result = $this->model->where(['id'=>$ids])->update(['status'=>1]);
             if($result){
-                Db::commit();
+                //Db::commit();
                 return json(['code'=>1,'msg'=>'审核成功']);
             }else {
                 Db::rollback();

+ 6 - 1
application/common/library/shande/H5FastPay.php

@@ -61,7 +61,7 @@ class H5FastPay extends Common
         //--------------------------------------------1、基础参数配置------------------------------------------------
 
                 $api = 'https://caspay.sandpay.com.cn/agent-main/openapi/';
-                $publicKeyPath = ROOT_PATH.'/cert/sand.cer'; //!!! 公钥文件,这个不要改动
+                $publicKeyPath = ROOT_PATH.'/cert/shande/sand.cer'; //!!! 公钥文件,这个不要改动
                 $priKeyPath = $class->privateKeyPath;
             //const PUB_KEY_PATH = 'cert/SAND_PUBLIC_KEY.cer'; //公钥文件
             //const PRI_KEY_PATH_2 = 'cert/MID_RSA_PRIVATE_KEY.pfx'; //私钥文件
@@ -111,5 +111,10 @@ class H5FastPay extends Common
         } catch (\Exception $e) {
             throw $e;
         }
+        $json=json_decode($decryptPlainText,true);
+        if($json['respCode']!='0000'){
+            throw new \Exception($json['respDesc']);
+        }
+        return $json;
     }
 }

+ 4 - 1
extend/logicmodel/DrawLogic.php

@@ -125,12 +125,15 @@ class DrawLogic
         if($record['currency_id']!=1){
             throw new \Exception('币种有误');
         }
+         if($record['type']!=3){
+             throw new \Exception('只能提现到银行卡');
+         }
         switch ($type){
             case 'shande':
                 if(!$record['bank_no'] || !$record['real_name']){
                     throw new \Exception('银行卡不存在或姓名不存在');
                 }
-                H5FastPay::payToCard($record['bank_no'],$record['real_name'],$record['account'],$record['order_num'],$record['order_num']);
+                H5FastPay::payToCard($record['bank_no'],$record['real_name'],$record['reality_account'],$record['order_num'],$record['order_num']);
                 break;
         }
      }

+ 1 - 2
支付.html

@@ -1,2 +1 @@
-配置
-5265027318271716
+transCode=RTPM&accessPlatform=&merId=6888805044220&accessType=0&plId=&encryptKey=p8Smo62Kxv%2FdYKseYYIctvBHE9RHfsE6vqRFMvxoObCuqzDy1SaiAcaeWuDWHL3jPyA%2BsBVwxyeZ7K%2BoOnpmuZzX23DeWYHEhdySvnTji8VjMT6HRCtR66zokxSZ4XubkLgwI41wfbW1mWAgGeRkzwUv6E%2B0xXSAyDoTY7iuL8oL1XYcAPG1AQwDx5ysymhVqmlykMMPr4fk1xTcIcVHA3wJQEJZFBbdkMx7xBbwR2tlOzc3Tz4AycET7E5QMze0%2BR%2F98x%2FqTAelUG4ePKShb9ibBiix7A0VAD4%2BnHHW8%2BjcZx1AmllNDvKr1w0nA2MErBzFjN16OIFgVDd61d7uLg%3D%3D&encryptData=dY3jriv0sp9uZ9H4C%2FH6QSlCMziv9hQ0JLiM3nPWe%2FHPstPXU7hF1JwG%2FeUzLh%2Bf6Ed4mXN3WlL6SW76mJPOFUrBJ205ENb%2FJjAvKPy7WNo%3D&sign=OQr%2FbHf5C2%2BexP0qvWajfVZYXHBjBViiCvhHYf4xCGJHLPNvYP7QHnP1EQI0LXEW3dCJgDqJjJZaRQLfJV9Dkkre14sODQ4HvKtkWNbPtBL7yaEAIuBu5fql7xFVESCJUykdRjXGLHBeYN2YYJWXkDcBZnJKxEhwKNt5gnwA4lOMKxRdFeCB2wmaKRmM6mKw1Jp1Ig4UaCeeBrrI%2BiCLTiD%2BhXAGSmCQKg3nPYzoXZIO45BXGi36BXOyZOOOTj35joKlPTjo2M4yDfEWPXGcm%2FmQsdvIfFB3Xx0I6bbJ7UI3YdUjN40MLBv%2F4sAuuELyDdcoDZNeloRb6PvPE2P8Wg%3D%3D