Bladeren bron

椰子,腾忧捷1号&腾忧捷2号

lowkeyman 1 jaar geleden
bovenliggende
commit
ef5a694673

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

@@ -10273,6 +10273,96 @@ $yeyekami_fast_phone = ['name' => 'yeyekami_fast', 'store_id' => 388, 'qualitys'
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$tengyoujun_ylyw_phone = ['name' => 'tengyoujun_ylyw', 'store_id' => 389, 'qualitys' => '2',
+    'amount' => [
+        10 => [
+            ['goods_id' => 9049, 'price' => 10.55, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9049, 'price' => 10.55, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9049, 'price' => 10.55, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ],
+        20 => [
+            ['goods_id' => 9050, 'price' => 21.1, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9050, 'price' => 21.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9050, 'price' => 21.1, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ],
+        30 => [
+            ['goods_id' => 9051, 'price' => 31.11, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9051, 'price' => 30.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9051, 'price' => 30.93, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ],
+        50 => [
+            ['goods_id' => 9052, 'price' => 51.85, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9052, 'price' => 51.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9052, 'price' => 51.55, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ],
+        100 => [
+            ['goods_id' => 9053, 'price' => 103.7, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9053, 'price' => 103, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9053, 'price' => 103.1, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ],
+        200 => [
+            ['goods_id' => 9054, 'price' => 207.4, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9054, 'price' => 206, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9054, 'price' => 206.2, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ],
+        300 => [
+            ['goods_id' => 9055, 'price' => 311.1, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9055, 'price' => 309, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9055, 'price' => 309.3, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ],
+        500 => [
+            ['goods_id' => 9056, 'price' => 518.5, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9056, 'price' => 515, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9056, 'price' => 515.5, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$tengyoujun_yj_phone = ['name' => 'tengyoujun_yj', 'store_id' => 390, 'qualitys' => '2',
+    'amount' => [
+        10 => [
+            ['goods_id' => 9057, 'price' => 10.55, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9057, 'price' => 10.55, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9057, 'price' => 10.55, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ],
+        20 => [
+            ['goods_id' => 9058, 'price' => 21.1, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9058, 'price' => 21.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9058, 'price' => 21.1, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ],
+        30 => [
+            ['goods_id' => 9059, 'price' => 31.11, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9059, 'price' => 30.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9059, 'price' => 30.93, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ],
+        50 => [
+            ['goods_id' => 9060, 'price' => 51.85, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9060, 'price' => 51.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9060, 'price' => 51.55, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ],
+        100 => [
+            ['goods_id' => 9061, 'price' => 103.7, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9061, 'price' => 103, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9061, 'price' => 103.1, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ],
+        200 => [
+            ['goods_id' => 9062, 'price' => 207.4, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9062, 'price' => 206, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9062, 'price' => 206.2, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ],
+        300 => [
+            ['goods_id' => 9063, 'price' => 311.1, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9063, 'price' => 309, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9063, 'price' => 309.3, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ],
+        500 => [
+            ['goods_id' => 9064, 'price' => 518.5, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9064, 'price' => 515, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9064, 'price' => 515.5, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_p hone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -10582,6 +10672,8 @@ $phone_providers = [
     ['name' => 'miaoxt_fs_three', 'cfg' => $miaoxt_fs_three_phone],
     ['name' => 'yuntian_trd', 'cfg' => $yuntian_trd_phone],
     ['name' => 'yeyekami_fast', 'cfg' => $yeyekami_fast_phone],
+    ['name' => 'tengyoujun_ylyw', 'cfg' => $tengyoujun_ylyw_phone],
+    ['name' => 'tengyoujun_yj', 'cfg' => $tengyoujun_yj_phone],
 ];
 $config['phone_providers'] = $phone_providers;
 

+ 19 - 0
helper/refill/api/xyz/tengyoujun_yj/API.MD

@@ -0,0 +1,19 @@
+## 腾忧捷2号
+- 对接文档:https://docs.qq.com/doc/DWkV1VkxQVk13eEtQ
+
+- 话费下单地址:http://101.37.65.140:10186/plat/api/old/submitorder
+- 查询地址:http://101.37.65.140:10186/plat/api/old/queryorder
+- 查询余额地址:http://101.37.65.140:10186/plat/api/old/queryBalance
+
+### 接口参数
+- ID:200072
+- 秘钥:bd15f6ed68d54c69a20b49cb903a0b63
+
+### 后台
+- http://101.37.65.140:10186/plat/index
+- 账户:youjun
+- 密码:123456
+
+### 店铺账号
+- tengyoujun_yj
+- tengyoujun_yj67890

+ 51 - 0
helper/refill/api/xyz/tengyoujun_yj/RefillCallBack.php

@@ -0,0 +1,51 @@
+<?php
+namespace refill\tengyoujun_yj;
+
+require_once(BASE_HELPER_RAPI_PATH . '/tengyoujun_yj/config.php');
+
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $sign = $this->sign($params);
+        if ($params['szVerifyString'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "szAgentId={$userid}&szOrderId={$params['szOrderId']}&szPhoneNum={$params['szPhoneNum']}&nDemo={$params['nDemo']}&fSalePrice={$params['fSalePrice']}";
+        $content .= "&nFlag={$params['nFlag']}&szKey={$key}";
+        return md5($content);
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['nFlag']);
+        $order_sn = $params['szOrderId'];
+        $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 === 2) {
+            $official_sn = strtolower($params['szRtnMsg']) == 'null' ? '' : $params['szRtnMsg'];
+            $data['official_sn'] = $official_sn;
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true, $official_sn];
+        }
+        elseif ($status === 3) {
+            return [$order_id, false, true, true, ''];
+        }
+        else {
+            return [$order_id, false, false, false, ''];
+        }
+    }
+}

+ 143 - 0
helper/refill/api/xyz/tengyoujun_yj/RefillPhone.php

@@ -0,0 +1,143 @@
+<?php
+
+namespace refill\tengyoujun_yj;
+
+require_once(BASE_HELPER_RAPI_PATH . '/tengyoujun_yj/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, int $card_type, string $order_sn)
+    {
+        $params['szAgentId'] = config::USER_ID;
+        $params['szOrderId'] = $order_sn;
+        $params['szPhoneNum'] = $phone;
+        $params['nMoney'] = $amount;
+        $params['nSortType'] = config::operator[$card_type];
+        $params['nProductClass'] = 1;
+        $params['nProductType'] = 1;
+        $params['szTimeStamp'] = date("Y-m-d H:i:s");
+        $params['szNotifyUrl'] = config::NOTIFY_URL;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn);
+
+        $sign = $this->sign($params);
+        $params['szVerifyString'] = $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);
+
+            $nRtn = $resp['nRtn'];
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            } elseif ($nRtn === 0) {
+                return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NOS, true)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999], true)) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], true];
+            } else {
+                $err = 998;
+                $net_errno = "HTTP-{$err}";
+                return [false, $resp['szRtnCode'], true];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['szAgentId'] = config::USER_ID;
+        $params['szOrderId'] = $refill_info['order_sn'];
+        $key = config::KEY;
+        $content = "szAgentId={$params['szAgentId']}&szOrderId={$params['szOrderId']}&szKey={$key}";
+        $params['szVerifyString'] = md5($content);
+
+        $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, '网络错误', ''];
+            }
+
+            $offical_sn = '';
+            $status = $resp['nRtn'];
+            if ($status === 5012) {
+                $offical_sn = $resp['szRtnMsg'];
+                $updata['official_sn'] = $offical_sn;
+                Model('refill_order')->edit($refill_info['order_id'], $updata);
+                $order_state = ORDER_STATE_SUCCESS;
+            } elseif ($status === 5013) {
+                $order_state = ORDER_STATE_CANCEL;
+            } elseif (in_array($status, [5011,5019],true)) {
+                $order_state = ORDER_STATE_SEND;
+            } elseif ($status === 5005 && (time() - $refill_info['commit_time'] >= 300)) {
+                $order_state = ORDER_STATE_NOEXIST;
+            } else {
+                return [false, $resp['szRtnMsg'], $offical_sn];
+            }
+
+            return [true, $order_state, $offical_sn];
+        }
+    }
+
+    public function balance()
+    {
+        $params['szAgentId'] = config::USER_ID;
+        $key = config::KEY;
+        $content = "szAgentId={$params['szAgentId']}&szKey={$key}";
+        $params['szVerifyString'] = md5($content);
+
+        $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['nRtn'] === 0) {
+                return [true, $resp['fBalance']];
+            } else {
+                return [false, $resp['szRtnCode']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "szAgentId={$userid}&szOrderId={$params['szOrderId']}&szPhoneNum={$params['szPhoneNum']}&nMoney={$params['nMoney']}&nSortType={$params['nSortType']}";
+        $content .= "&nProductClass={$params['nProductClass']}&nProductType={$params['nProductType']}&szTimeStamp={$params['szTimeStamp']}&szKey={$key}";
+        return md5($content);
+    }
+}

+ 27 - 0
helper/refill/api/xyz/tengyoujun_yj/config.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace refill\tengyoujun_yj;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://101.37.65.140:10186/plat/api/old/submitorder';
+    const QUERY_URL= 'http://101.37.65.140:10186/plat/api/old/queryorder';
+    const BALANCE_URL = 'http://101.37.65.140:10186/plat/api/old/queryBalance';
+
+    const USER_ID= '200072';
+    const KEY = 'bd15f6ed68d54c69a20b49cb903a0b63';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_tengyoujun_yj.php";
+
+
+    const operator = [
+        mtopcard\ChinaMobileCard  => 1,
+        mtopcard\ChinaUnicomCard  => 2,
+        mtopcard\ChinaTelecomCard => 3
+    ];
+    const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NOS = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
+}

+ 19 - 0
helper/refill/api/xyz/tengyoujun_ylyw/API.MD

@@ -0,0 +1,19 @@
+## 腾忧捷1号
+- 对接文档:https://docs.qq.com/doc/DWkV1VkxQVk13eEtQ
+
+- 话费下单地址:http://101.37.65.140:10186/plat/api/old/submitorder
+- 查询地址:http://101.37.65.140:10186/plat/api/old/queryorder
+- 查询余额地址:http://101.37.65.140:10186/plat/api/old/queryBalance
+
+### 接口参数
+- ID:200071
+- 秘钥:cad54673cb7743a38c34d1cb45f0aa18
+
+### 后台
+- http://101.37.65.140:10186/plat/index
+- 账户:youlaiyouwang
+- 密码:123456
+
+### 店铺账号
+- tengyoujun_ylyw
+- tengyoujun_ylyw67890

+ 51 - 0
helper/refill/api/xyz/tengyoujun_ylyw/RefillCallBack.php

@@ -0,0 +1,51 @@
+<?php
+namespace refill\tengyoujun_ylyw;
+
+require_once(BASE_HELPER_RAPI_PATH . '/tengyoujun_ylyw/config.php');
+
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $sign = $this->sign($params);
+        if ($params['szVerifyString'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "szAgentId={$userid}&szOrderId={$params['szOrderId']}&szPhoneNum={$params['szPhoneNum']}&nDemo={$params['nDemo']}&fSalePrice={$params['fSalePrice']}";
+        $content .= "&nFlag={$params['nFlag']}&szKey={$key}";
+        return md5($content);
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['nFlag']);
+        $order_sn = $params['szOrderId'];
+        $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 === 2) {
+            $official_sn = strtolower($params['szRtnMsg']) == 'null' ? '' : $params['szRtnMsg'];
+            $data['official_sn'] = $official_sn;
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true, $official_sn];
+        }
+        elseif ($status === 3) {
+            return [$order_id, false, true, true, ''];
+        }
+        else {
+            return [$order_id, false, false, false, ''];
+        }
+    }
+}

+ 143 - 0
helper/refill/api/xyz/tengyoujun_ylyw/RefillPhone.php

@@ -0,0 +1,143 @@
+<?php
+
+namespace refill\tengyoujun_ylyw;
+
+require_once(BASE_HELPER_RAPI_PATH . '/tengyoujun_ylyw/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, int $card_type, string $order_sn)
+    {
+        $params['szAgentId'] = config::USER_ID;
+        $params['szOrderId'] = $order_sn;
+        $params['szPhoneNum'] = $phone;
+        $params['nMoney'] = $amount;
+        $params['nSortType'] = config::operator[$card_type];
+        $params['nProductClass'] = 1;
+        $params['nProductType'] = 1;
+        $params['szTimeStamp'] = date("Y-m-d H:i:s");
+        $params['szNotifyUrl'] = config::NOTIFY_URL;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn);
+
+        $sign = $this->sign($params);
+        $params['szVerifyString'] = $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);
+
+            $nRtn = $resp['nRtn'];
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            } elseif ($nRtn === 0) {
+                return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NOS, true)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999], true)) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], true];
+            } else {
+                $err = 998;
+                $net_errno = "HTTP-{$err}";
+                return [false, $resp['szRtnCode'], true];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['szAgentId'] = config::USER_ID;
+        $params['szOrderId'] = $refill_info['order_sn'];
+        $key = config::KEY;
+        $content = "szAgentId={$params['szAgentId']}&szOrderId={$params['szOrderId']}&szKey={$key}";
+        $params['szVerifyString'] = md5($content);
+
+        $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, '网络错误', ''];
+            }
+
+            $offical_sn = '';
+            $status = $resp['nRtn'];
+            if ($status === 5012) {
+                $offical_sn = $resp['szRtnMsg'];
+                $updata['official_sn'] = $offical_sn;
+                Model('refill_order')->edit($refill_info['order_id'], $updata);
+                $order_state = ORDER_STATE_SUCCESS;
+            } elseif ($status === 5013) {
+                $order_state = ORDER_STATE_CANCEL;
+            } elseif (in_array($status, [5011,5019],true)) {
+                $order_state = ORDER_STATE_SEND;
+            } elseif ($status === 5005 && (time() - $refill_info['commit_time'] >= 300)) {
+                $order_state = ORDER_STATE_NOEXIST;
+            } else {
+                return [false, $resp['szRtnMsg'], $offical_sn];
+            }
+
+            return [true, $order_state, $offical_sn];
+        }
+    }
+
+    public function balance()
+    {
+        $params['szAgentId'] = config::USER_ID;
+        $key = config::KEY;
+        $content = "szAgentId={$params['szAgentId']}&szKey={$key}";
+        $params['szVerifyString'] = md5($content);
+
+        $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['nRtn'] === 0) {
+                return [true, $resp['fBalance']];
+            } else {
+                return [false, $resp['szRtnCode']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "szAgentId={$userid}&szOrderId={$params['szOrderId']}&szPhoneNum={$params['szPhoneNum']}&nMoney={$params['nMoney']}&nSortType={$params['nSortType']}";
+        $content .= "&nProductClass={$params['nProductClass']}&nProductType={$params['nProductType']}&szTimeStamp={$params['szTimeStamp']}&szKey={$key}";
+        return md5($content);
+    }
+}

+ 27 - 0
helper/refill/api/xyz/tengyoujun_ylyw/config.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace refill\tengyoujun_ylyw;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://101.37.65.140:10186/plat/api/old/submitorder';
+    const QUERY_URL= 'http://101.37.65.140:10186/plat/api/old/queryorder';
+    const BALANCE_URL = 'http://101.37.65.140:10186/plat/api/old/queryBalance';
+
+    const USER_ID= '200071';
+    const KEY = 'cad54673cb7743a38c34d1cb45f0aa18';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_tengyoujun_ylyw.php";
+
+
+    const operator = [
+        mtopcard\ChinaMobileCard  => 1,
+        mtopcard\ChinaUnicomCard  => 2,
+        mtopcard\ChinaTelecomCard => 3
+    ];
+    const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NOS = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
+}

+ 4 - 0
mobile/callback/refill_tengyoujun_yj.php

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

+ 4 - 0
mobile/callback/refill_tengyoujun_ylyw.php

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

+ 12 - 0
test/TestRefill.php

@@ -5917,6 +5917,18 @@ class TestRefill extends TestCase
         $provider = $this->getProvider('xingchuang_fs');
         $resp = $provider->balance();
     }
+
+    public function testtengyoujun_ylyw()
+    {
+        $provider = $this->getProvider('tengyoujun_ylyw');
+        $resp = $provider->balance();
+    }
+
+    public function testtengyoujun_yj()
+    {
+        $provider = $this->getProvider('tengyoujun_yj');
+        $resp = $provider->balance();
+    }
 }