Ver código fonte

Merge branch 'rchannel' of 39.97.239.116:gyfl/xyzshop into dongdev

dong 1 ano atrás
pai
commit
e760f96f1a

+ 30 - 0
data/config/xyz/refill.ini.php

@@ -328,6 +328,35 @@ $xinma_oil = ['name' => 'xinma', 'store_id' => 339, 'qualitys' => '5',
     ],
     'period' => [], 'refill_type' => 'api'];
 
+$leyou_oil = ['name' => 'leyou', 'store_id' => 358, 'qualitys' => '5',
+    'amount' => [
+        50 => [
+            ['goods_id' => 8860, 'price' => 50.15, 'quality' => 5, 'card_type' => 'petrochina'],
+            ['goods_id' => 8860, 'price' => 10.12, 'quality' => 5, 'card_type' => 'sinopec'],
+        ],
+        100 => [
+            ['goods_id' => 8854, 'price' => 100.3, 'quality' => 5, 'card_type' => 'petrochina'],
+            ['goods_id' => 8854, 'price' => 100.6, 'quality' => 5, 'card_type' => 'sinopec'],
+        ],
+        200 => [
+            ['goods_id' => 8855, 'price' => 200.6, 'quality' => 5, 'card_type' => 'petrochina'],
+            ['goods_id' => 8855, 'price' => 201.2, 'quality' => 5, 'card_type' => 'sinopec'],
+        ],
+        500 => [
+            ['goods_id' => 8856, 'price' => 501.5, 'quality' => 5, 'card_type' => 'petrochina'],
+            ['goods_id' => 8856, 'price' => 502, 'quality' => 5, 'card_type' => 'sinopec'],
+        ],
+        1000 => [
+            ['goods_id' => 8857, 'price' => 1003, 'quality' => 5, 'card_type' => 'petrochina'],
+            ['goods_id' => 8857, 'price' => 1004, 'quality' => 5, 'card_type' => 'sinopec'],
+        ],
+        2000 => [
+            ['goods_id' => 8861, 'price' => 2006, 'quality' => 5, 'card_type' => 'petrochina'],
+            ['goods_id' => 8861, 'price' => 2008, 'quality' => 5, 'card_type' => 'sinopec'],
+        ],
+    ],
+    'period' => [], 'refill_type' => 'api'];
+
 $oil_providers = [
 //    ['name' => 'tianjt', 'cfg' => $tianjt_oil],
 //    ['name' => 'suhctm', 'cfg' => $suhctm_oil],
@@ -353,6 +382,7 @@ $oil_providers = [
     ['name' => 'zhongst_oil', 'cfg' => $zhongst_oil],
     ['name' => 'quanzhen', 'cfg' => $quanzhen_oil],
     ['name' => 'xinma', 'cfg' => $xinma_oil],
+    ['name' => 'leyou', 'cfg' => $leyou_oil],
 ];
 $config['oil_providers'] = $oil_providers;
 

+ 31 - 2
data/config/zy/refill.ini.php

@@ -2764,6 +2764,34 @@ $youlaifeiythree_phone = ['name' => 'youlaifeiythree', 'store_id' => 112, 'quali
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$shengtonghfy_phone = ['name' => 'shengtonghfy', 'store_id' => 115, 'qualitys' => '2',
+    'amount' => [
+        10 => [
+            ['goods_id' => 7218, 'price' => 10, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        20 => [
+            ['goods_id' => 7219, 'price' => 20, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        30 => [
+            ['goods_id' => 7220, 'price' => 30, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        50 => [
+            ['goods_id' => 7221, 'price' => 50, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        100 => [
+            ['goods_id' => 7222, 'price' => 100, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        200 => [
+            ['goods_id' => 7223, 'price' => 200, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        300 => [
+            ['goods_id' => 7224, 'price' => 300, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        500 => [
+            ['goods_id' => 7225, 'price' => 500, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
 
 
 
@@ -2857,6 +2885,7 @@ $phone_providers = [
     ['name' => 'wangcxdzjfeiy', 'cfg' => $wangcxdzjfeiy_phone],
     ['name' => 'fulunoy', 'cfg' => $fulunoy_phone],
     ['name' => 'youlaifeiythree', 'cfg' => $youlaifeiythree_phone],
+    ['name' => 'shengtonghfy', 'cfg' => $shengtonghfy_phone],
 
 ];
 
@@ -2960,7 +2989,7 @@ $baibaoquanyi = ['name' => 'baibaoquanyi', 'store_id' => 111, 'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$Ryuequanyi = ['name' => 'Ryuequanyi', 'store_id' => 114, 'qualitys' => '1',
+$ryuequanyi = ['name' => 'ryuequanyi', 'store_id' => 114, 'qualitys' => '1',
     'amount' => [
         100 => [['goods_id' => 7217, 'price' => 100, 'quality' => 1, 'card_type' => 'third']],
     ],
@@ -2983,7 +3012,7 @@ $third_providers = [
     ['name' => 'xinde_qy', 'cfg' => $xinde_qy],
     ['name' => 'weibian_qy', 'cfg' => $weibian_qy],
     ['name' => 'baibaoquanyi', 'cfg' => $baibaoquanyi],
-    ['name' => 'Ryuequanyi', 'cfg' => $Ryuequanyi],
+    ['name' => 'ryuequanyi', 'cfg' => $ryuequanyi],
 ];
 $config['third_providers'] = $third_providers;
 

+ 9 - 0
helper/refill/api/xyz/leyou/API信息.txt

@@ -0,0 +1,9 @@
+
+北京国研方略信息科学研究院
+
+https://lorp-web.shujubuy.com/lorp/manage.html#/login.html
+
+账号:guoyan
+密码:123456
+
+APPKEY: 550b3e8e00144ad0b823416cfd83f1ae

+ 50 - 0
helper/refill/api/xyz/leyou/RefillCallBack.php

@@ -0,0 +1,50 @@
+<?php
+namespace refill\leyou;
+
+require_once(BASE_HELPER_RAPI_PATH . '/leyou/config.php');
+
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $sign = $this->sign($params);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        $key = config::APP_KEY;
+        $user_name = config::USER_NAME;
+        $content = "{$user_name}{$params['sys_order_id']}{$params['user_order_id']}{$key}";
+        return md5($content);
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['status']);
+        $order_sn = $params['user_order_id'];
+        $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'];
+
+        if ($status === 200) {
+            $official_sn = strtolower($params['official_order_id']) == 'null' ? '' : $params['official_order_id'];
+            $data['official_sn'] = $official_sn;
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true, $official_sn];
+        }
+        elseif ($status === 202) {
+            return [$order_id, false, true, true, ''];
+        }
+        else {
+            return [$order_id, false, false, false, ''];
+        }
+    }
+}

+ 144 - 0
helper/refill/api/xyz/leyou/RefillOil.php

@@ -0,0 +1,144 @@
+<?php
+
+namespace refill\leyou;
+
+require_once(BASE_HELPER_RAPI_PATH . '/leyou/config.php');
+
+use refill;
+use Log;
+use mtopcard;
+
+class RefillOil extends refill\IRefillOil
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $card_no, int $amount, int $card_type, string $order_sn)
+    {
+        $cur_time = function () {
+            return date('Y-m-d H:i:s', time());
+        };
+
+        $params['username'] = config::USER_NAME;
+        $params['orderNumber'] = $order_sn;
+        $params['number'] = $card_no;
+        $params['productNo'] = config::product_code[$card_type][$amount];
+
+        $params['money'] = $amount;
+        $params['orderTime'] = $cur_time();
+        $params['notifyUrl'] = config::NOTIFY_URL;
+
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params, &$net_errno = 0)
+    {
+        $params = $this->req_params($card_no, $amount, $card_type, $params['order_sn']);
+
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, 'POST', false, config::ExtHeaders, $net_errno);
+
+        if (empty($resp)) {
+            return [false, '系统错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误', true];
+            }
+
+            $status = $resp['status'];
+            if ($status === 122600) { //success
+                return [true, '', false];
+            }
+            elseif (in_array($status,[122610,122616])) { //manual handle
+                $net_errno = "HTTP-$status";
+                return [false, $resp['data'], true];
+            }
+            else { //error
+                return [false, $resp['data'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['username'] = config::USER_NAME;
+        $params['orderNumber'] = $refill_info['order_sn'];
+        $params['sign'] = $this->sign($params);
+
+        $resp = http_request(config::QUERY_URL, $params, 'POST', false, config::ExtHeaders);
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            }
+
+            $status = $resp['status'];
+
+            if ($status === 122600) {
+                $order_state = ORDER_STATE_SUCCESS;
+            }
+            elseif ($status === 122617) {
+                $order_state = ORDER_STATE_NOEXIST;
+            }
+            else {
+                return [false, $status];
+            }
+            return [true, $order_state];
+
+        }
+    }
+
+    public function balance()
+    {
+        $params['username'] = config::USER_NAME;
+        $params['sign'] = $this->sign($params);
+
+        $s = config::ExtHeaders;
+        $resp = http_request(config::BALANCE_URL, $params, 'POST', false, config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            }
+            elseif ($resp['status'] === 122600) {
+                return [true, $resp['data']];
+            }
+            else {
+                return [false, $resp['desc']];
+            }
+        }
+    }
+
+    private function sign($param): string
+    {
+        $originalStr = '';
+        foreach (config::SIGN_KEY_SORT as $key)
+        {
+            if (isset($param[$key]) && !empty($param[$key])) {
+                $originalStr .= $param[$key];
+            }
+        }
+        $originalStr .= config::APP_KEY;
+        return md5($originalStr);
+    }
+}

+ 54 - 0
helper/refill/api/xyz/leyou/config.php

@@ -0,0 +1,54 @@
+<?php
+namespace refill\leyou;
+
+# 乐友(油费)
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://lorp-api.shujubuy.com/api/v1/submitOrder';
+    const QUERY_URL = 'http://lorp-api.shujubuy.com/api/v1/queryOrder';
+    const BALANCE_URL = 'http://lorp-api.shujubuy.com/api/v1/queryBalance';
+
+    const APP_KEY = '550b3e8e00144ad0b823416cfd83f1ae';
+    const USER_NAME = 'guoyan';
+
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_leyou.php";
+
+    const ExtHeaders = [
+        'Content-Type: application/x-www-form-urlencoded; charset=UTF-8',
+        'X-Submit-Username: ' . self::USER_NAME
+    ];
+
+    const operator = [
+        mtopcard\PetroChinaCard  => 2,
+        mtopcard\SinopecCard  => 1,
+    ];
+
+    const product_code = [
+        mtopcard\PetroChinaCard =>  [
+            50   => 200050,
+            100  => 200100,
+            200  => 200200,
+            500  => 200500,
+            1000 => 201000
+        ],
+        mtopcard\SinopecCard =>
+        [
+            50   => 100050,
+            100  => 100100,
+            200  => 100200,
+            500  => 100500,
+            1000 => 101000,
+            2000 => 102000
+        ],
+    ];
+
+    const SIGN_KEY_SORT = [
+        'username',
+        'orderNumber',
+        'number',
+        'productNo',
+        'money',
+        'orderTime'
+    ];
+}

BIN
helper/refill/api/xyz/leyou/help.docx


+ 0 - 1
helper/refill/api/xyz/lezhiyouqy/config.php

@@ -3,7 +3,6 @@
 
 namespace refill\lezhiyouqy;
 
-use mtopcard;
 # 乐之友(权益)
 class config
 {

+ 2 - 0
helper/refill/api/zy/renyueoil/RefillCallBack.php

@@ -2,7 +2,9 @@
 namespace refill\renyueoil;
 
 require_once(BASE_HELPER_RAPI_PATH . '/renyueoil/config.php');
+
 use refill;
+
 class RefillCallBack implements refill\IRefillCallBack
 {
     public function verify($params): bool

+ 2 - 2
helper/refill/api/zy/Ryuequanyi/RefillCallBack.php

@@ -1,7 +1,7 @@
 <?php
-namespace refill\Ryuequanyi;
+namespace refill\ryuequanyi;
 
-require_once(BASE_HELPER_RAPI_PATH . '/Ryuequanyi/config.php');
+require_once(BASE_HELPER_RAPI_PATH . '/ryuequanyi/config.php');
 
 use refill;
 class RefillCallBack implements refill\IRefillCallBack

+ 2 - 2
helper/refill/api/zy/Ryuequanyi/RefillPhone.php

@@ -1,8 +1,8 @@
 <?php
 
-namespace refill\Ryuequanyi;
+namespace refill\ryuequanyi;
 
-require_once(BASE_HELPER_RAPI_PATH . '/Ryuequanyi/config.php');
+require_once(BASE_HELPER_RAPI_PATH . '/ryuequanyi/config.php');
 
 use refill;
 use Log;

helper/refill/api/zy/Ryuequanyi/api.txt → helper/refill/api/zy/ryuequanyi/api.txt


+ 4 - 3
helper/refill/api/zy/Ryuequanyi/config.php

@@ -1,13 +1,14 @@
 <?php
 
-namespace refill\Ryuequanyi;
+namespace refill\ryuequanyi;
 
-# 百保(权益)
+# 仁跃(权益)
 class config
 {
+    #zy shengtonghfy -> 向叶子提单
     const MCH_ID = 10476;
     const KEY = 'cbae165ae6dc5c45219c6bf65d7e9ed9';
 
     const ORDER_URL  =  'https://www.xyzshops.cn/mobile/index.php';
-    const NOTIFY_URL = BASE_SITE_URL . '/mobile/callback/refill_Ryuequanyi.php';
+    const NOTIFY_URL = BASE_SITE_URL . '/mobile/callback/refill_ryuequanyi.php';
 }

+ 78 - 0
helper/refill/api/zy/shengtonghfy/RefillCallBack.php

@@ -0,0 +1,78 @@
+<?php
+namespace refill\shengtonghfy;
+
+require_once(BASE_HELPER_RAPI_PATH . '/shengtonghfy/config.php');
+
+use refill;
+
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $input = $params;
+        unset($input['sign']);
+        $sign = $this->sign($input);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    protected function check_empty($value)
+    {
+        if (!isset($value))
+            return true;
+        if ($value === null)
+            return true;
+        if (trim($value) === "")
+            return true;
+
+        return false;
+    }
+
+    private function sign($params)
+    {
+        ksort($params);
+
+        $body = "";
+        $i = 0;
+        foreach ($params as $k => $v) {
+            if (false === $this->check_empty($v) && "@" != substr($v, 0, 1)) {
+                if ($i == 0) {
+                    $body .= "{$k}" . "=" . urlencode($v);
+                } else {
+                    $body .= "&" . "{$k}" . "=" . urlencode($v);
+                }
+                $i++;
+            }
+        }
+
+        $body .= "&key=".config::KEY;
+        return md5($body);
+    }
+
+    public function notify($params)
+    {
+        $status = $params['state'];
+        $order_sn = $params['order_sn'];
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false,false];
+        }
+        $order_id = $order_info['order_id'];
+        if ($status === 'SUCCESS') {
+            $data['ch_trade_no'] = $params['trade_no'];
+            $data['official_sn'] = strtolower($params['official_sn']) == 'null' ? '' : $params['official_sn'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false,true];
+        }
+        elseif ($status === 'CANCEL') {
+            Model('refill_order')->edit($order_id, ['ch_trade_no' => $params['trade_no']]);
+            return [$order_id, false, true,true];
+        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

+ 161 - 0
helper/refill/api/zy/shengtonghfy/RefillPhone.php

@@ -0,0 +1,161 @@
+<?php
+
+namespace refill\shengtonghfy;
+
+require_once(BASE_HELPER_RAPI_PATH . '/shengtonghfy/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 $amount, string $order_sn)
+    {
+        $params['act'] = 'refill';
+        $params['op'] = 'add';
+        $params['mchid'] = config::MCH_ID;
+        $params['cardno'] = $phone;
+        $params['amount'] = $amount;
+        $params['order_sn'] = $order_sn;
+        $params['notifyurl'] = config::NOTIFY_URL;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $params = $this->req_params($card_no, $amount, $params['order_sn']);
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params , 'POST' , false , [] , $net_errno);
+
+        if (empty($resp)) {
+            return [false, '系统错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp ,true);
+            if (empty($resp)) {
+                return [false, '系统错误', true];
+            } elseif ($resp['code'] === 200) {
+                return [true, '', false];
+            } else {
+                return [false, $resp['message'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['act'] = 'refill';
+        $params['op'] = 'query';
+        $params['mchid'] = config::MCH_ID;
+        $params['order_sn'] = $refill_info['order_sn'];
+        $params['sign'] = $this->sign($params);
+
+        $resp = http_request(config::ORDER_URL, $params , 'POST');
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            }
+            elseif ($resp['code'] === 200)
+            {
+                $data = $resp['datas'];
+                if ($data['order_state'] == '40') {
+                    $save['ch_trade_no'] = $data['trade_no'];
+                    $save['official_sn'] = strtolower($resp['official_sn']) == 'null' ? '' : $resp['official_sn'];
+                    Model('refill_order')->edit($refill_info['order_id'], $save);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($data['order_state'] === '0') {
+                    Model('refill_order')->edit($refill_info['order_id'], ['ch_trade_no' => $data['trade_no']]);
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif (in_array($data['order_state'], ['10', '20', '30', '50'], true)) {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $resp['message']];
+                }
+                return [true, $order_state];
+            }
+            elseif ($resp['code'] === 202 && (time() - $refill_info['commit_time'] >= 600))
+            {
+                return [true, ORDER_STATE_NOEXIST];
+            }
+            else
+            {
+                return [false, $resp['message']];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['act'] = 'refill';
+        $params['op'] = 'balance';
+        $params['mchid'] = config::MCH_ID;
+        $params['sign'] = $this->sign($params);
+
+        $resp = http_request(config::ORDER_URL, $params , 'POST');
+
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            } elseif ($resp['code'] === 200) {
+                return [true, ncPriceFormat($resp['datas']['balance'])];
+            } else {
+                return [false, $resp['message']];
+            }
+        }
+    }
+
+    protected function check_empty($value)
+    {
+        if (!isset($value))
+            return true;
+        if ($value === null)
+            return true;
+        if (trim($value) === "")
+            return true;
+
+        return false;
+    }
+
+    private function sign($params)
+    {
+        ksort($params);
+
+        $body = "";
+        $i = 0;
+        foreach ($params as $k => $v) {
+            if (false === $this->check_empty($v) && "@" != substr($v, 0, 1)) {
+                if ($i == 0) {
+                    $body .= "{$k}" . "=" . urlencode($v);
+                } else {
+                    $body .= "&" . "{$k}" . "=" . urlencode($v);
+                }
+                $i++;
+            }
+        }
+
+        $body .= "&key=".config::KEY;
+
+        return md5($body);
+    }
+}

+ 7 - 0
helper/refill/api/zy/shengtonghfy/api.txt

@@ -0,0 +1,7 @@
+https://admin.xyzshops.cn/merchant/#/login
+
+shengtonghfy
+ui3_uox2
+
+10478
+59a9945ea2f74816e6d7716233de8b9e

+ 14 - 0
helper/refill/api/zy/shengtonghfy/config.php

@@ -0,0 +1,14 @@
+<?php
+
+namespace refill\shengtonghfy;
+
+# 盛通汇(非银)
+class config
+{
+    #zy shengtonghfy -> 向叶子提单
+    const MCH_ID = 10478;
+    const KEY = '59a9945ea2f74816e6d7716233de8b9e';
+
+    const ORDER_URL  = 'https://www.xyzshops.cn/mobile/index.php';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_shengtonghfy.php";
+}

+ 0 - 4
mobile/callback/refill_Ryuequanyi.php

@@ -1,4 +0,0 @@
-<?php
-
-refill\util::push_notify('Ryuequanyi',$_POST);
-echo ('SUCCESS');

+ 4 - 0
mobile/callback/refill_leyou.php

@@ -0,0 +1,4 @@
+<?php
+
+refill\util::push_notify('leyou',$_POST);
+echo ('SUCCESS');

+ 4 - 0
mobile/callback/refill_ryuequanyi.php

@@ -0,0 +1,4 @@
+<?php
+
+refill\util::push_notify('ryuequanyi',$_POST);
+echo ('SUCCESS');

+ 4 - 0
mobile/callback/refill_shengtonghfy.php

@@ -0,0 +1,4 @@
+<?php
+
+refill\util::push_notify('shengtonghfy',$_POST);
+echo ('SUCCESS');

+ 27 - 1
test/TestRefill.php

@@ -5316,9 +5316,35 @@ class TestRefill extends TestCase
     }
     public function testRyuequanyi_Balance()
     {
-        $provider = $this->getProvider('Ryuequanyi');
+        $provider = $this->getProvider('ryuequanyi');
         [$succ, $val] = $provider->balance();
     }
+
+    public function testShengtonghfy_Balance()
+    {
+        $provider = $this->getProvider('shengtonghfy');
+        [$succ, $val] = $provider->balance();
+    }
+    public function testLeyou_Balance()
+    {
+        $provider = $this->getProvider('leyou','RefillOil');
+        [$succ, $val] = $provider->balance();
+    }
+
+    public function testLeyou_Add()
+    {
+        $provider = $this->getProvider('leyou','RefillOil');
+        $net_errno = '';
+        [$succ, $val, $neterr] = $provider->add('1000111100021211884', 2, 50, ['order_sn'=>'Test-Leyou-Oil'.time()], $net_errno);
+    }
+
+    public function testLeyou_Query()
+    {
+        $provider = $this->getProvider('leyou','RefillOil');
+        $net_errno = '';
+        [$succ, $val] = $provider->query(['order_sn'=>'Test-Leyou-Oil1693375143']);
+    }
+
 }
 
 //docker-compose run phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefill::testLoadBlack)( .*)?$/" --test-suffix TestRefill.php /var/www/html/test