Parcourir la source

椰子快充:蝉联快充1号-游来(含),蝉联快充2号-趣(含)

lowkeyman il y a 2 mois
Parent
commit
26efb3de24

+ 92 - 0
data/config/xyz/phone.ini.php

@@ -4057,6 +4057,96 @@ $kachong70_phone = [
         ]
     ]
 ];
+$chanlian_phone = [
+    'name' => 'chanlian', 'store_id' => 432, 'qualitys' => '2', 'official_sn' => true, 'refill_type' => 'api',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 9410, 'price' => 10, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9410, 'price' => 10, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9410, 'price' => 10, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 9411, 'price' => 20, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9411, 'price' => 20, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9411, 'price' => 20, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
+//        30 => [
+//            ['goods_id' => 9412, 'price' => 30, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9412, 'price' => 30, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9412, 'price' => 30, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
+        50 => [
+//            ['goods_id' => 9413, 'price' => 50, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9413, 'price' => 51.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9413, 'price' => 50, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 9414, 'price' => 103.6, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9414, 'price' => 103.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9414, 'price' => 103.6, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 9415, 'price' => 207.2, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9415, 'price' => 207.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9415, 'price' => 207.2, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 9416, 'price' => 310.8, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9416, 'price' => 310.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9416, 'price' => 310.8, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 9417, 'price' => 518, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9417, 'price' => 500, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9417, 'price' => 518, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ]
+    ]
+];
+$chanlian_sec_phone = [
+    'name' => 'chanlian_sec', 'store_id' => 433, 'qualitys' => '2', 'official_sn' => true, 'refill_type' => 'api',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 9418, 'price' => 10, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9418, 'price' => 10, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9418, 'price' => 10, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 9419, 'price' => 20, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9419, 'price' => 20, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9419, 'price' => 20, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
+//        30 => [
+//            ['goods_id' => 9420, 'price' => 30, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9420, 'price' => 30, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9420, 'price' => 30, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
+        50 => [
+//            ['goods_id' => 9421, 'price' => 50, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9421, 'price' => 51.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9421, 'price' => 50, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 9422, 'price' => 103.6, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9422, 'price' => 103.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9422, 'price' => 103.6, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 9423, 'price' => 207.2, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9423, 'price' => 207.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9423, 'price' => 207.2, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 9424, 'price' => 310.8, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9424, 'price' => 310.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9424, 'price' => 310.8, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 9425, 'price' => 518, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9425, 'price' => 500, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9425, 'price' => 518, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ]
+    ]
+];
 
 $phone_providers = [
 	[ 'name' => 'xunyin', 'cfg' => $xunyin_phone ],
@@ -4176,4 +4266,6 @@ $phone_providers = [
     [ 'name' => 'qingyu_sec', 'cfg' => $qingyu_sec_phone ],
     [ 'name' => 'jietaiyu', 'cfg' => $jietaiyu_phone ],
     [ 'name' => 'kachong70', 'cfg' => $kachong70_phone ],
+    [ 'name' => 'chanlian', 'cfg' => $chanlian_phone ],
+    [ 'name' => 'chanlian_sec', 'cfg' => $chanlian_sec_phone ],
 	];

+ 16 - 0
helper/refill/api/xyz/chanlian/API.MD

@@ -0,0 +1,16 @@
+## 蝉联快充1号-游来(含)
+### 对接信息
+- 下单接口: http://cl.whale123.com/api/do
+- 主动查询: http://cl.whale123.com/api/queryorder
+- 余额查询: http://cl.whale123.com/api/querybalance
+- CPID: 69535
+- CPKEY:2f86ed2977d0def38
+
+- 后台查单:http://cl.whale123.com/
+- 帐号: ylqg
+- 密码: 666666
+- 接口文档: http://api.whale123.com/doc/jsoft.pdf
+
+### 店铺信息
+- chanlian
+- chanlian67890

+ 42 - 0
helper/refill/api/xyz/chanlian/RefillCallBack.php

@@ -0,0 +1,42 @@
+<?php
+namespace refill\chanlian;
+
+require_once(BASE_HELPER_RAPI_PATH . '/chanlian/config.php');
+
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $input = $params;
+        unset($input['sign']);
+        $sign = config::sign($input);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    public function notify($params)
+    {
+        $order_sn = $params['ret_para'];
+        $order_info = Model('vr_order')->getOrderInfoForNotify(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false, false, ''];
+        }
+
+        $order_id = $order_info['order_id'];
+        $status = $params['status'];
+        if ($status === 'success') {
+            $official_sn = strtolower($params['sz_order_no']) == 'null' ? '' : $params['sz_order_no'];
+            $data['official_sn'] = $official_sn;
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true, $official_sn];
+        } elseif ($status === 'failed') {
+            return [$order_id, false, true, true, ''];
+        } else {
+            return [$order_id, false, false, false, ''];
+        }
+    }
+}

+ 132 - 0
helper/refill/api/xyz/chanlian/RefillPhone.php

@@ -0,0 +1,132 @@
+<?php
+namespace refill\chanlian;
+
+require_once(BASE_HELPER_RAPI_PATH . '/chanlian/config.php');
+
+use refill;
+use Log;
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $card_type, int $amount, string $order_sn)
+    {
+        $params['cpid'] = config::CP_ID;
+        $params['create_time'] = date("YmdHis");
+        $params['mobile'] = $phone;
+        $params['type'] = 1;
+        $params['product_id'] = config::Product[$card_type][$amount];
+        $params['amount'] = $amount;
+        $params['op'] = config::operator[$card_type];
+        $params['ret_para'] = $order_sn;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $input, &$net_errno = 0)
+    {
+        $params = $this->req_params($card_no, $card_type, $amount, $input['order_sn']);
+        $params['sign'] = config::sign($params);
+
+        $resp = http_request(config::ORDER_URL, $params, 'GET', false, [], $net_errno);
+
+        if (empty($resp)) {
+            return [false, '系统错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            $status = $resp['status'];
+
+            if (empty($resp)) {
+                return [false, '系统错误', true];
+            } elseif ($status === '0') {
+                return [true, $resp['order_no'], false];
+            } elseif (in_array($status, config::ERR_STATUS, true)){
+                return [false, $resp['msg'], false];
+            } elseif (in_array($status, config::NET_ERR_STATUS, true)) {
+                $net_errno = "HTTP-{$status}";
+                return [false, '查-' . $resp['msg'], true];
+            } else {
+                $err = 998;
+                $net_errno = "HTTP-{$err}";
+                return [false, $resp['msg'], true];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['cpid'] = config::CP_ID;
+        $params['order_no'] = $refill_info['order_sn'];
+        $params['mobile'] = $refill_info['card_no'];
+        $params['create_time'] = date("YmdHis");
+        $params['datetime'] = date("YmdHis", $refill_info['commit_time']);
+        $params['sign'] = config::sign($params);
+
+        $resp = http_request(config::QUERY_URL, $params);
+
+        if (empty($resp)) {
+            return [false, '系统错误', ''];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误', ''];
+            }
+            elseif($resp['status'] === '0')
+            {
+                $official_sn = '';
+
+                $status = $resp['data'];
+                if ($status === 'success') {
+                    $official_sn = $resp['operator_serial_number'];
+                    $updata['official_sn'] = $official_sn;
+                    Model('refill_order')->edit($refill_info['order_id'], $updata);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($status === 'failed') {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif ($status === 'untreated') {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $status, ''];
+                }
+                return [true, $order_state, $official_sn];
+            }
+            else
+            {
+                return [false, $resp['msg'], ''];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['cpid'] = config::CP_ID;
+        $params['create_time'] = date("YmdHis");
+        $params['sign'] = config::sign($params);
+
+        $resp = http_request(config::BALANCE_URL, $params);
+
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            } elseif ($resp['status'] === '0') {
+                return [true, $resp['balance']];
+            } else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+}

+ 63 - 0
helper/refill/api/xyz/chanlian/config.php

@@ -0,0 +1,63 @@
+<?php
+namespace refill\chanlian;
+
+use mtopcard;
+class config
+{
+    //回调地址需 上游配置
+    const ORDER_URL = 'http://cl.whale123.com/api/do';
+    const QUERY_URL = 'http://cl.whale123.com/api/queryorder';
+    const BALANCE_URL = 'http://cl.whale123.com/api/querybalance';
+
+    const CP_ID = '69535';
+    const CP_KEY = '2f86ed2977d0def38';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_chanlian.php";
+    const operator = [
+        mtopcard\ChinaMobileCard  => 1,
+        mtopcard\ChinaUnicomCard  => 2,
+        mtopcard\ChinaTelecomCard => 3
+    ];
+    const Product = [
+        mtopcard\ChinaMobileCard => [
+            100 => 20005,
+            200 => 20006,
+            300 => 20007,
+            500 => 20008
+        ],
+        mtopcard\ChinaUnicomCard => [
+            50  => 20012,
+            100 => 20013,
+            200 => 20014,
+            300 => 20015,
+        ],
+        mtopcard\ChinaTelecomCard => [
+            100 => 20021,
+            200 => 20022,
+            300 => 20023,
+            500 => 20024
+        ],
+    ];
+    const ERR_STATUS = ['-10001', '-10002', '-10003', '-10004', '-10013', '-10005', '-10006', '-10007', '-10008', '-10009', '-10011', '-10012', '-10015', '-10016'];
+    const NET_ERR_STATUS = ['-10010', '-10000', '-999'];
+
+    public static function sign($params)
+    {
+        ksort($params);
+        $content = '';
+        foreach ($params as $key => $value) {
+            $content .= "{$key}{$value}";
+        }
+        $content .= config::CP_KEY;
+        return md5($content);
+    }
+
+    public static function check_empty($value)
+    {
+        if (!isset($value))
+            return true;
+        if (trim($value) === "")
+            return true;
+
+        return false;
+    }
+}

BIN
helper/refill/api/xyz/chanlian/jsoft.pdf


+ 16 - 0
helper/refill/api/xyz/chanlian_sec/API.MD

@@ -0,0 +1,16 @@
+## 蝉联快充2号-趣(含)
+### 对接信息
+- 下单接口: http://cl.whale123.com/api/do
+- 主动查询: http://cl.whale123.com/api/queryorder
+- 余额查询: http://cl.whale123.com/api/querybalance
+- CPID: 85486
+- CPKEY:991a0c24254deef16
+
+- 后台查单:http://cl.whale123.com/
+- 帐号: qdwqg
+- 密码: 666666
+- 接口文档: http://api.whale123.com/doc/jsoft.pdf
+
+### 店铺信息
+- chanlian_sec
+- chanlian_sec67890

+ 42 - 0
helper/refill/api/xyz/chanlian_sec/RefillCallBack.php

@@ -0,0 +1,42 @@
+<?php
+namespace refill\chanlian_sec;
+
+require_once(BASE_HELPER_RAPI_PATH . '/chanlian_sec/config.php');
+
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $input = $params;
+        unset($input['sign']);
+        $sign = config::sign($input);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    public function notify($params)
+    {
+        $order_sn = $params['ret_para'];
+        $order_info = Model('vr_order')->getOrderInfoForNotify(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false, false, ''];
+        }
+
+        $order_id = $order_info['order_id'];
+        $status = $params['status'];
+        if ($status === 'success') {
+            $official_sn = strtolower($params['sz_order_no']) == 'null' ? '' : $params['sz_order_no'];
+            $data['official_sn'] = $official_sn;
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true, $official_sn];
+        } elseif ($status === 'failed') {
+            return [$order_id, false, true, true, ''];
+        } else {
+            return [$order_id, false, false, false, ''];
+        }
+    }
+}

+ 132 - 0
helper/refill/api/xyz/chanlian_sec/RefillPhone.php

@@ -0,0 +1,132 @@
+<?php
+namespace refill\chanlian_sec;
+
+require_once(BASE_HELPER_RAPI_PATH . '/chanlian_sec/config.php');
+
+use refill;
+use Log;
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $card_type, int $amount, string $order_sn)
+    {
+        $params['cpid'] = config::CP_ID;
+        $params['create_time'] = date("YmdHis");
+        $params['mobile'] = $phone;
+        $params['type'] = 1;
+        $params['product_id'] = config::Product[$card_type][$amount];
+        $params['amount'] = $amount;
+        $params['op'] = config::operator[$card_type];
+        $params['ret_para'] = $order_sn;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $input, &$net_errno = 0)
+    {
+        $params = $this->req_params($card_no, $card_type, $amount, $input['order_sn']);
+        $params['sign'] = config::sign($params);
+
+        $resp = http_request(config::ORDER_URL, $params, 'GET', false, [], $net_errno);
+
+        if (empty($resp)) {
+            return [false, '系统错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            $status = $resp['status'];
+
+            if (empty($resp)) {
+                return [false, '系统错误', true];
+            } elseif ($status === '0') {
+                return [true, $resp['order_no'], false];
+            } elseif (in_array($status, config::ERR_STATUS, true)){
+                return [false, $resp['msg'], false];
+            } elseif (in_array($status, config::NET_ERR_STATUS, true)) {
+                $net_errno = "HTTP-{$status}";
+                return [false, '查-' . $resp['msg'], true];
+            } else {
+                $err = 998;
+                $net_errno = "HTTP-{$err}";
+                return [false, $resp['msg'], true];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['cpid'] = config::CP_ID;
+        $params['order_no'] = $refill_info['order_sn'];
+        $params['mobile'] = $refill_info['card_no'];
+        $params['create_time'] = date("YmdHis");
+        $params['datetime'] = date("YmdHis", $refill_info['commit_time']);
+        $params['sign'] = config::sign($params);
+
+        $resp = http_request(config::QUERY_URL, $params);
+
+        if (empty($resp)) {
+            return [false, '系统错误', ''];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误', ''];
+            }
+            elseif($resp['status'] === '0')
+            {
+                $official_sn = '';
+
+                $status = $resp['data'];
+                if ($status === 'success') {
+                    $official_sn = $resp['operator_serial_number'];
+                    $updata['official_sn'] = $official_sn;
+                    Model('refill_order')->edit($refill_info['order_id'], $updata);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($status === 'failed') {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif ($status === 'untreated') {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $status, ''];
+                }
+                return [true, $order_state, $official_sn];
+            }
+            else
+            {
+                return [false, $resp['msg'], ''];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['cpid'] = config::CP_ID;
+        $params['create_time'] = date("YmdHis");
+        $params['sign'] = config::sign($params);
+
+        $resp = http_request(config::BALANCE_URL, $params);
+
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            } elseif ($resp['status'] === '0') {
+                return [true, $resp['balance']];
+            } else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+}

+ 63 - 0
helper/refill/api/xyz/chanlian_sec/config.php

@@ -0,0 +1,63 @@
+<?php
+namespace refill\chanlian_sec;
+
+use mtopcard;
+class config
+{
+    //回调地址需 上游配置
+    const ORDER_URL = 'http://cl.whale123.com/api/do';
+    const QUERY_URL = 'http://cl.whale123.com/api/queryorder';
+    const BALANCE_URL = 'http://cl.whale123.com/api/querybalance';
+
+    const CP_ID = '85486';
+    const CP_KEY = '991a0c24254deef16';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_chanlian_sec.php";
+    const operator = [
+        mtopcard\ChinaMobileCard  => 1,
+        mtopcard\ChinaUnicomCard  => 2,
+        mtopcard\ChinaTelecomCard => 3
+    ];
+    const Product = [
+        mtopcard\ChinaMobileCard => [
+            100 => 20005,
+            200 => 20006,
+            300 => 20007,
+            500 => 20008
+        ],
+        mtopcard\ChinaUnicomCard => [
+            50  => 20012,
+            100 => 20013,
+            200 => 20014,
+            300 => 20015,
+        ],
+        mtopcard\ChinaTelecomCard => [
+            100 => 20021,
+            200 => 20022,
+            300 => 20023,
+            500 => 20024
+        ],
+    ];
+    const ERR_STATUS = ['-10001', '-10002', '-10003', '-10004', '-10013', '-10005', '-10006', '-10007', '-10008', '-10009', '-10011', '-10012', '-10015', '-10016'];
+    const NET_ERR_STATUS = ['-10010', '-10000', '-999'];
+
+    public static function sign($params)
+    {
+        ksort($params);
+        $content = '';
+        foreach ($params as $key => $value) {
+            $content .= "{$key}{$value}";
+        }
+        $content .= config::CP_KEY;
+        return md5($content);
+    }
+
+    public static function check_empty($value)
+    {
+        if (!isset($value))
+            return true;
+        if (trim($value) === "")
+            return true;
+
+        return false;
+    }
+}

BIN
helper/refill/api/xyz/chanlian_sec/jsoft.pdf


+ 4 - 0
mobile/callback/refill_chanlian.php

@@ -0,0 +1,4 @@
+<?php
+
+refill\util::push_notify('chanlian',$_POST);
+echo json_encode(['status' => 'success']);

+ 4 - 0
mobile/callback/refill_chanlian_sec.php

@@ -0,0 +1,4 @@
+<?php
+
+refill\util::push_notify('chanlian_sec',$_POST);
+echo json_encode(['status' => 'success']);

+ 12 - 0
test/TestRefill.php

@@ -6467,6 +6467,18 @@ class TestRefill extends TestCase
         $provider = $this->getProvider('chaohe_sec');
         $resp = $provider->balance();
     }
+
+    public function testchanlian()
+    {
+        $provider = $this->getProvider('chanlian');
+        $resp = $provider->balance();
+    }
+
+    public function testchanlian_sec()
+    {
+        $provider = $this->getProvider('chanlian_sec');
+        $resp = $provider->balance();
+    }
 }