瀏覽代碼

yl donghong

haru haru 2 年之前
父節點
當前提交
01f8db691e

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

@@ -5601,6 +5601,96 @@ $ainika_high_phone = ['name' => 'ainika_high', 'store_id' => 215, 'qualitys' =>
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$donghong_high_phone = ['name' => 'donghong_high', 'store_id' => 216, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7810, 'price' => 9.65, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7810, 'price' => 9.52, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7810, 'price' => 9.52, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7811, 'price' => 19.3, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7811, 'price' => 19.04, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7811, 'price' => 19.04 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 7812, 'price' => 28.95, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7812, 'price' => 28.56, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7812, 'price' => 28.56, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7813, 'price' => 48.25, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7813, 'price' => 47.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7813, 'price' => 47.6, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7814, 'price' => 96.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7814, 'price' => 95.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7814, 'price' => 95.2, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7815, 'price' => 193, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7815, 'price' => 190.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7815, 'price' => 190.4, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+//        300 => [
+//            ['goods_id' => 7816, 'price' => 289.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7816, 'price' => 285.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7816, 'price' => 285.6, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7817, 'price' => 482.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7817, 'price' => 476, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7817, 'price' => 476, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$donghong_normal_phone = ['name' => 'donghong_normal', 'store_id' => 217, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7818, 'price' => 9.62, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7818, 'price' => 9.45, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7818, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7819, 'price' => 19.24, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7819, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7819, 'price' => 19 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 7820, 'price' => 28.86, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7820, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7820, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7821, 'price' => 48.1, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7821, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7821, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7822, 'price' => 96.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7822, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7822, 'price' => 95, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7823, 'price' => 192.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7823, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7823, 'price' => 190, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+//        300 => [
+//            ['goods_id' => 7824, 'price' => 288.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7824, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7824, 'price' => 285, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7825, 'price' => 481, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7825, 'price' => 472.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7825, 'price' => 475, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -5777,6 +5867,8 @@ $phone_providers = [
     ['name' => 'shantong', 'cfg' => $shantong_phone],
     ['name' => 'ainika', 'cfg' => $ainika_phone],
     ['name' => 'ainika_high', 'cfg' => $ainika_high_phone],
+    ['name' => 'donghong_high', 'cfg' => $donghong_high_phone],
+    ['name' => 'donghong_normal', 'cfg' => $donghong_normal_phone],
 
 ];
 $config['phone_providers'] = $phone_providers;

+ 48 - 0
helper/refill/api/yl/donghong_high/RefillCallBack.php

@@ -0,0 +1,48 @@
+<?php
+namespace refill\donghong_high;
+
+require_once(BASE_HELPER_RAPI_PATH . '/donghong_high/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)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "userid={$userid}&orderid={$params['orderid']}&sporderid={$params['sporderid']}&merchantsubmittime={$params['merchantsubmittime']}";
+        $content .= "&resultno={$params['resultno']}&key={$key}";
+        return strtoupper(md5($content));
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['resultno']);
+        $order_sn = $params['sporderid'];
+        $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 === 1) {
+            $data['official_sn'] = strtolower($params['remark1']) == 'null' ? '' : $params['remark1'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true];
+        } elseif ($status === 9) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 155 - 0
helper/refill/api/yl/donghong_high/RefillPhone.php

@@ -0,0 +1,155 @@
+<?php
+
+namespace refill\donghong_high;
+
+require_once(BASE_HELPER_RAPI_PATH . '/donghong_high/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, $card_type, string $order_sn)
+    {
+        $params['userid'] = config::USER_ID;
+        $params['productid'] = config::ProductIdS[$card_type][$amount];
+        $params['price'] = $amount;
+        $params['num'] = 1;
+        $params['mobile'] = $phone;
+        $params['spordertime'] = date("YmdHis");
+        $params['sporderid'] = $order_sn;
+        $params['back_url'] = config::NOTIFY_URL;
+        $params['paytype'] = config::operator[$card_type];
+
+        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['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 = $this->xmlToArray($resp);
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            }
+
+            $resultno = $resp['resultno'];
+            if (in_array($resultno, ['0', '2'], true)) {
+                return [true, $resp['orderid'], false];
+            } elseif (in_array($resultno, config::ERR_NOS, true)) {
+                return [false, $resultno, false];
+            } elseif ($resultno === '9999' || $resultno === '5006') {
+                $net_errno = "HTTP-{$resultno}";
+                return [false, $resultno, true];
+            } else {
+                //未知结果码
+                $err = 998;
+                $net_errno = "HTTP-{$err}";
+                return [false, $resultno, true];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['userid'] = config::USER_ID;
+        $params['sporderid'] = $refill_info['order_sn'];
+        $key = config::KEY;
+        $content = "userid={$params['userid']}&sporderid={$params['sporderid']}&key={$key}";
+        $params['sign'] = strtoupper(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 = $this->xmlToArray($resp);
+            if (empty($resp))
+            {
+                return [false, '网络错误'];
+            }
+            else
+            {
+                $resultno = $resp['resultno'];
+                if ($resultno === '1') {
+                    $updata['official_sn'] = $resp['remark1'];
+                    Model('refill_order')->edit($refill_info['order_id'], $updata);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($resultno === '9') {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif (in_array($resultno, ['0','2'], true)) {
+                    $order_state = ORDER_STATE_SEND;
+                } elseif ($resultno === '5007' && (time() - $refill_info['commit_time'] > 600)) {
+                    $order_state = ORDER_STATE_NOEXIST;
+                } else {
+                    return [false, $resultno];
+                }
+
+                return [true, $order_state];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['userid'] = config::USER_ID;
+        $key = config::KEY;
+        $content = "userid={$params['userid']}&key={$key}";
+        $params['sign'] = strtoupper(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 = $this->xmlToArray($resp);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            } elseif ($resp['resultno'] === '1') {
+                return [true, $resp['balance']];
+            } else {
+                return [false, $resp['resultno']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "userid={$userid}&productid={$params['productid']}&price={$params['price']}&num={$params['num']}&mobile={$params['mobile']}&spordertime={$params['spordertime']}";
+        $content .= "&sporderid={$params['sporderid']}&key={$key}";
+        return strtoupper(md5($content));
+    }
+
+    public function xmlToArray($xml)
+    {
+        $replace_str = str_replace(' ','','encoding="gb2312"');
+        $xml = mb_convert_encoding($xml,"UTF-8","gb2312");
+        $xml = str_replace($replace_str, "encoding='utf-8'", $xml);
+        return refill\util::xmlToArray($xml);
+    }
+}

+ 51 - 0
helper/refill/api/yl/donghong_high/config.php

@@ -0,0 +1,51 @@
+<?php
+
+
+namespace refill\donghong_high;
+
+use mtopcard;
+class config
+{
+    //https://www.showdoc.com.cn/AQL666666/
+    const ORDER_URL = 'http://123.60.217.36:9086/onlinepay.do';
+    const QUERY_URL= 'http://123.60.217.36:9086/searchpay.do';
+    const BALANCE_URL = 'http://123.60.217.36:9086/searchbalance.do';
+
+    const USER_ID= '10002585';
+    const KEY = 'CGeQXjKWYfBGpsr2Fk57brfCTEMKAA8S';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_donghong_high.php";
+
+    const operator = [
+        mtopcard\ChinaMobileCard  => 'yd',
+        mtopcard\ChinaUnicomCard  => 'lt',
+        mtopcard\ChinaTelecomCard => 'dx'
+    ];
+    const ERR_NOS = [
+        '5001','5002','5003','5004','5005','5008','5009','5010','5011','5012'
+    ];
+    const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;'];
+
+    const ProductIdS = [
+        mtopcard\ChinaMobileCard =>
+            [
+                30  => '101687',
+                50  => '101688',
+                100 => '101689',
+                200 => '101690'
+            ],
+        mtopcard\ChinaUnicomCard =>
+            [
+                30  => '101705',
+                50  => '101706',
+                100 => '101707',
+                200 => '101708',
+            ],
+        mtopcard\ChinaTelecomCard =>
+            [
+                30  => '101723',
+                50  => '101724',
+                100 => '101725',
+                200 => '101726'
+            ]
+    ];
+}

+ 27 - 0
helper/refill/api/yl/donghong_high/对接文档-yezi.txt

@@ -0,0 +1,27 @@
+登陆账户名:椰林
+密码:yz123456
+用户id:10002585
+秘钥:CGeQXjKWYfBGpsr2Fk57brfCTEMKAA8S
+
+http://123.60.217.36:9086/onlinepay.do 下单地址
+http://123.60.217.36:9086/searchbalance.do 余额查询
+http://123.60.217.36:9086/searchpay.do 订单主动查询地址
+api接口文档地址:https://www.showdoc.com.cn/AQL666666/
+
+
+
+商品代码     商品名称
+101687     中国移动30
+101688     中国移动50
+101689     中国移动100
+101690     中国移动200
+
+101705     中国联通30
+101706     中国联通50
+101707     中国联通100
+101708     中国联通200
+
+101723     中国电信30
+101724     中国电信50
+101725     中国电信100
+101726     中国电信200

+ 48 - 0
helper/refill/api/yl/donghong_normal/RefillCallBack.php

@@ -0,0 +1,48 @@
+<?php
+namespace refill\donghong_normal;
+
+require_once(BASE_HELPER_RAPI_PATH . '/donghong_normal/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)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "userid={$userid}&orderid={$params['orderid']}&sporderid={$params['sporderid']}&merchantsubmittime={$params['merchantsubmittime']}";
+        $content .= "&resultno={$params['resultno']}&key={$key}";
+        return strtoupper(md5($content));
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['resultno']);
+        $order_sn = $params['sporderid'];
+        $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 === 1) {
+            $data['official_sn'] = strtolower($params['remark1']) == 'null' ? '' : $params['remark1'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true];
+        } elseif ($status === 9) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 155 - 0
helper/refill/api/yl/donghong_normal/RefillPhone.php

@@ -0,0 +1,155 @@
+<?php
+
+namespace refill\donghong_normal;
+
+require_once(BASE_HELPER_RAPI_PATH . '/donghong_normal/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, $card_type, string $order_sn)
+    {
+        $params['userid'] = config::USER_ID;
+        $params['productid'] = config::ProductIdS[$card_type][$amount];
+        $params['price'] = $amount;
+        $params['num'] = 1;
+        $params['mobile'] = $phone;
+        $params['spordertime'] = date("YmdHis");
+        $params['sporderid'] = $order_sn;
+        $params['back_url'] = config::NOTIFY_URL;
+        $params['paytype'] = config::operator[$card_type];
+
+        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['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 = $this->xmlToArray($resp);
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            }
+
+            $resultno = $resp['resultno'];
+            if (in_array($resultno, ['0', '2'], true)) {
+                return [true, $resp['orderid'], false];
+            } elseif (in_array($resultno, config::ERR_NOS, true)) {
+                return [false, $resultno, false];
+            } elseif ($resultno === '9999' || $resultno === '5006') {
+                $net_errno = "HTTP-{$resultno}";
+                return [false, $resultno, true];
+            } else {
+                //未知结果码
+                $err = 998;
+                $net_errno = "HTTP-{$err}";
+                return [false, $resultno, true];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['userid'] = config::USER_ID;
+        $params['sporderid'] = $refill_info['order_sn'];
+        $key = config::KEY;
+        $content = "userid={$params['userid']}&sporderid={$params['sporderid']}&key={$key}";
+        $params['sign'] = strtoupper(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 = $this->xmlToArray($resp);
+            if (empty($resp))
+            {
+                return [false, '网络错误'];
+            }
+            else
+            {
+                $resultno = $resp['resultno'];
+                if ($resultno === '1') {
+                    $updata['official_sn'] = $resp['remark1'];
+                    Model('refill_order')->edit($refill_info['order_id'], $updata);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($resultno === '9') {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif (in_array($resultno, ['0','2'], true)) {
+                    $order_state = ORDER_STATE_SEND;
+                } elseif ($resultno === '5007' && (time() - $refill_info['commit_time'] > 600)) {
+                    $order_state = ORDER_STATE_NOEXIST;
+                } else {
+                    return [false, $resultno];
+                }
+
+                return [true, $order_state];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['userid'] = config::USER_ID;
+        $key = config::KEY;
+        $content = "userid={$params['userid']}&key={$key}";
+        $params['sign'] = strtoupper(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 = $this->xmlToArray($resp);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            } elseif ($resp['resultno'] === '1') {
+                return [true, $resp['balance']];
+            } else {
+                return [false, $resp['resultno']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "userid={$userid}&productid={$params['productid']}&price={$params['price']}&num={$params['num']}&mobile={$params['mobile']}&spordertime={$params['spordertime']}";
+        $content .= "&sporderid={$params['sporderid']}&key={$key}";
+        return strtoupper(md5($content));
+    }
+
+    public function xmlToArray($xml)
+    {
+        $replace_str = str_replace(' ','','encoding="gb2312"');
+        $xml = mb_convert_encoding($xml,"UTF-8","gb2312");
+        $xml = str_replace($replace_str, "encoding='utf-8'", $xml);
+        return refill\util::xmlToArray($xml);
+    }
+}

+ 51 - 0
helper/refill/api/yl/donghong_normal/config.php

@@ -0,0 +1,51 @@
+<?php
+
+
+namespace refill\donghong_normal;
+
+use mtopcard;
+class config
+{
+    //https://www.showdoc.com.cn/AQL666666/
+    const ORDER_URL = 'http://123.60.217.36:9086/onlinepay.do';
+    const QUERY_URL= 'http://123.60.217.36:9086/searchpay.do';
+    const BALANCE_URL = 'http://123.60.217.36:9086/searchbalance.do';
+
+    const USER_ID= '10002586';
+    const KEY = 'WsSW3eRjTMwcAaCdCAAnimHe58XCMJkP';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_donghong_normal.php";
+
+    const operator = [
+        mtopcard\ChinaMobileCard  => 'yd',
+        mtopcard\ChinaUnicomCard  => 'lt',
+        mtopcard\ChinaTelecomCard => 'dx'
+    ];
+    const ERR_NOS = [
+        '5001','5002','5003','5004','5005','5008','5009','5010','5011','5012'
+    ];
+    const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;'];
+
+    const ProductIdS = [
+        mtopcard\ChinaMobileCard =>
+            [
+                30  => '101687',
+                50  => '101688',
+                100 => '101689',
+                200 => '101690'
+            ],
+        mtopcard\ChinaUnicomCard =>
+            [
+                30  => '101705',
+                50  => '101706',
+                100 => '101707',
+                200 => '101708',
+            ],
+        mtopcard\ChinaTelecomCard =>
+            [
+                30  => '101723',
+                50  => '101724',
+                100 => '101725',
+                200 => '101726'
+            ]
+    ];
+}

+ 26 - 0
helper/refill/api/yl/donghong_normal/对接文档-yezi.txt

@@ -0,0 +1,26 @@
+登陆账户名:椰林2
+密码:yz123456
+用户id:10002586
+秘钥:WsSW3eRjTMwcAaCdCAAnimHe58XCMJkP
+
+http://123.60.217.36:9086/onlinepay.do 下单地址
+http://123.60.217.36:9086/searchbalance.do 余额查询
+http://123.60.217.36:9086/searchpay.do 订单主动查询地址
+api接口文档地址:https://www.showdoc.com.cn/AQL666666/
+
+
+商品代码     商品名称
+101687     中国移动30
+101688     中国移动50
+101689     中国移动100
+101690     中国移动200
+
+101705     中国联通30
+101706     中国联通50
+101707     中国联通100
+101708     中国联通200
+
+101723     中国电信30
+101724     中国电信50
+101725     中国电信100
+101726     中国电信200

+ 12 - 0
test/TestRefillYl.php

@@ -688,4 +688,16 @@ class TestRefillYl extends TestCase
         $provider = $this->getProvider('yunchonggong_yd');
         $resp = $provider->balance();
     }
+
+    public function testDonghong_high()
+    {
+        $provider = $this->getProvider('donghong_high');
+        $resp = $provider->balance();
+    }
+
+    public function testDonghong_normal()
+    {
+        $provider = $this->getProvider('donghong_normal');
+        $resp = $provider->balance();
+    }
 }