瀏覽代碼

会员升级

Kirin 1 年之前
父節點
當前提交
2cccae854e
共有 2 個文件被更改,包括 57 次插入2 次删除
  1. 5 2
      app/controller/api/v1/WithdrawController.php
  2. 52 0
      crmeb/services/WithdrawService.php

+ 5 - 2
app/controller/api/v1/WithdrawController.php

@@ -37,11 +37,14 @@ class WithdrawController extends BaseController
                     if ($data['return_code'] == 'SUCCESS') {
                         $info = WithdrawService::init()::decode($data['resoult']);
                         @file_put_contents('notify.txt', json_encode($info) . PHP_EOL, FILE_APPEND);
-
                     }
                     break;
+                default:
+                    $info = WithdrawService::init()::decode($data['resoult']);
+                    @file_put_contents('notify.txt', $data['type'] . json_encode($info) . PHP_EOL, FILE_APPEND);
+                    break;
             }
-
+            echo 'SUCCESS';
         } else {
             @file_put_contents('notify.txt', '签名校验失败' . PHP_EOL, FILE_APPEND);
             echo 'FAIL';

+ 52 - 0
crmeb/services/WithdrawService.php

@@ -118,6 +118,58 @@ class WithdrawService
         return self::postRequest(self::$url . $url, compact('data', 'token'));
     }
 
+    public static function getOrderList($status = 0, $page = 1, $limit = 10)
+    {
+        $url = '/Enterprise/getOrderList';
+        $data = [
+            'enterprise_order_sn' => '',
+            'states' => '',
+            'status' => $status,
+            'reason' => 1,
+            'check_time_start' => 1,
+            "check_time_end" => "",
+            "pagination" => ['page_start' => $page, 'page_size' => $limit],
+        ];
+        $token = self::$token;
+        return self::postRequest(self::$url . $url, compact('data', 'token'));
+    }
+
+    public static function getOrderExt($order_id, $page = 1, $limit = 10)
+    {
+        $url = '/Enterprise/getOrderExt';
+        $data = [
+            'enterprise_order_id' => $order_id,
+            "pagination" => ['page_start' => $page, 'page_size' => $limit],
+        ];
+        $token = self::$token;
+        return self::postRequest(self::$url . $url, compact('data', 'token'));
+    }
+
+
+    public static function getOrderTemplate($order_id)
+    {
+        $url = '/Enterprise/getOrderTemplate';
+        $data = [
+            'enterprise_order_id' => $order_id,
+        ];
+        $token = self::$token;
+        return self::postRequest(self::$url . $url, compact('data', 'token'));
+    }
+
+    public static function changeOrderStatus($order_id, $apply_img, $seal_img, $status = 1, $remarks = '')
+    {
+        $url = '/Enterprise/changeOrderStatus';
+        $data = [
+            'enterprise_order_id' => $order_id,
+            'status' => $status,
+            'remarks' => $remarks,
+            'apply_img' => $apply_img,
+            'seal_img' => $seal_img,
+        ];
+        $token = self::$token;
+        return self::postRequest(self::$url . $url, compact('data', 'token'));
+    }
+
 
     public static function fastIssuing($id, $link_id, $name, $id_card, $mobile, $bank_code, $money, $body)
     {