Browse Source

会员升级

Kirin 1 year ago
parent
commit
60e660ed2d
1 changed files with 15 additions and 13 deletions
  1. 15 13
      crmeb/services/WithdrawService.php

+ 15 - 13
crmeb/services/WithdrawService.php

@@ -22,6 +22,7 @@ class WithdrawService
     static $secret = '2a879ac637d65ced5ed5892e1bf82e4c';
     static $aeskey = '37d65ced5ed5892e';
     static $crowd_id = '12882';
+    static $resolve_id = '2999';
 
 
     public function __construct($token)
@@ -118,26 +119,27 @@ class WithdrawService
     }
 
 
-    public static function fastIssuing()
+    public static function fastIssuing($id, $name, $id_card, $mobile, $bank_code, $money, $body)
     {
         $url = '/Enterprise/fastIssuing';
         $data = [
-            'trade_number' => '',
+            'trade_number' => 'SYYX' . $id . date('YmdHis') . rand(10000, 99999),
             'crowd_id' => self::$crowd_id,
-            'issuing_data' => [
-                "professional_id" => '',
-                "name" => "李杭",
-                "cer_code" => "4307031*****9955X",
-                "mobile" => "1501****016",
-                "bank_code" => "6214467******212356",
-                "money" => "100",
-                "remark" => "业绩提成",
+            'issuing_data' => [[
+                "professional_id" => $id,
+                "name" => $name,
+                "cer_code" => $id_card,
+                "mobile" => $mobile,
+                "bank_code" => $bank_code,
+                "money" => $money,
+                "remark" => $body,
                 "request_no" => "A20201121033333332",
                 "professional_bank_id" => 0,
-                "resolve_id" => 1
-            ],
+                "resolve_id" => self::$resolve_id
+            ],]
         ];
-
+        $token = self::$token;
+        return self::postRequest(self::$url . $url, compact('data', 'token'));
     }
 
     public static function postRequest($url, $data)