stanley-king 4 年之前
父节点
当前提交
e44b35afb4

+ 61 - 0
data/config/lingzh/refill.ini.php

@@ -466,6 +466,65 @@ $weishengywt_phone = ['name' => 'weishengywt', 'store_id' => 54, 'qualitys' => '
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$weishengyjd_phone = ['name' => 'weishengyjd', 'store_id' => 56, 'qualitys' => '5',
+    'amount' => [
+        10 => [
+            ['goods_id' => 124, 'price' => 8.8, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        20 => [
+            ['goods_id' => 125, 'price' => 17.6, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        30 => [
+            ['goods_id' => 126, 'price' => 26.4, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        50 => [
+            ['goods_id' => 127, 'price' => 44, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        100 => [
+            ['goods_id' => 128, 'price' => 88, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        200 => [
+            ['goods_id' => 129, 'price' => 176, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        300 => [
+            ['goods_id' => 130, 'price' => 264, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        500 => [
+            ['goods_id' => 131, 'price' => 440, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+
+$yezi_phone = ['name' => 'yezi', 'store_id' => 57, 'qualitys' => '2',
+    'amount' => [
+        10 => [
+            ['goods_id' => 132, 'price' => 9.8, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        20 => [
+            ['goods_id' => 133, 'price' => 19.6, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        30 => [
+            ['goods_id' => 134, 'price' => 29.4, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        50 => [
+            ['goods_id' => 135, 'price' => 49, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        100 => [
+            ['goods_id' => 136, 'price' => 98, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        200 => [
+            ['goods_id' => 137, 'price' => 196, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        300 => [
+            ['goods_id' => 138, 'price' => 294, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        500 => [
+            ['goods_id' => 139, 'price' => 490, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
     ['name' => 'baizeyd', 'cfg' => $baizeyd],
     ['name' => 'aming', 'cfg' => $aming_phone],
@@ -485,6 +544,8 @@ $phone_providers = [
     ['name' => 'shengying', 'cfg' => $shengying_phone],
     ['name' => 'amingjdman', 'cfg' => $amingjdman_phone],
     ['name' => 'weishengywt', 'cfg' => $weishengywt_phone],
+    ['name' => 'weishengyjd', 'cfg' => $weishengyjd_phone],
+    ['name' => 'yezi', 'cfg' => $yezi_phone],
 ];
 
 $config['phone_providers'] = $phone_providers;

+ 29 - 0
data/config/win/refill.ini.php

@@ -466,6 +466,35 @@ $weishengywt_phone = ['name' => 'weishengywt', 'store_id' => 54, 'qualitys' => '
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$weishengyjd_phone = ['name' => 'weishengyjd', 'store_id' => 56, 'qualitys' => '5',
+    'amount' => [
+        10 => [
+            ['goods_id' => 124, 'price' => 8.8, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        20 => [
+            ['goods_id' => 125, 'price' => 17.6, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        30 => [
+            ['goods_id' => 126, 'price' => 26.4, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        50 => [
+            ['goods_id' => 127, 'price' => 44, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        100 => [
+            ['goods_id' => 128, 'price' => 88, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        200 => [
+            ['goods_id' => 129, 'price' => 176, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        300 => [
+            ['goods_id' => 130, 'price' => 264, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        500 => [
+            ['goods_id' => 131, 'price' => 440, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
     ['name' => 'baizeyd', 'cfg' => $baizeyd],
     ['name' => 'aming', 'cfg' => $aming_phone],

+ 8 - 8
data/config/xyz/refill.ini.php

@@ -610,14 +610,14 @@ $xunao_phone = ['name' => 'xunao', 'store_id' => 44, 'qualitys' => '1',
 
 $weiyiman_phone = ['name' => 'weiyiman', 'store_id' => 45, 'qualitys' => '5',
     'amount' => [
-        10 => [['goods_id' => 6512, 'price' => 8.8, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6513, 'price' => 17.6, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6514, 'price' => 26.4, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6515, 'price' => 44, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6516, 'price' => 88, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6517, 'price' => 176, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6518, 'price' => 264, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6519, 'price' => 440, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+        10 => [['goods_id' => 6512, 'price' => 8.9, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6513, 'price' => 17.8, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6514, 'price' => 26.7, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6515, 'price' => 44.5, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6516, 'price' => 89, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6517, 'price' => 178, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6518, 'price' => 267, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6519, 'price' => 445, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 

+ 2 - 1
helper/fcgisrv/LZRAccServer.php

@@ -30,7 +30,8 @@ class LZRAccServer extends BaseServer
             'callback/lingzh/amingyd.php','callback/lingzh/chuka.php'  ,'callback/lingzh/amingjd.php',
             'callback/lingzh/legou.php'  ,'callback/lingzh/feiniao.php','callback/lingzh/fensheng.php',
             'callback/lingzh/riying.php' ,'callback/lingzh/wailing.php','callback/lingzh/weishengy.php',
-            'callback/lingzh/shengying.php','callback/lingzh/amingjdman.php','callback/lingzh/weishengywt.php'
+            'callback/lingzh/shengying.php','callback/lingzh/amingjdman.php','callback/lingzh/weishengywt.php',
+            'callback/lingzh/weishengyjd.php'
         ];
 
         $this->setExFiles($exfiles);

+ 50 - 0
helper/refill/api/lingzh/weishengyjd/RefillCallBack.php

@@ -0,0 +1,50 @@
+<?php
+namespace refill\weishengyjd;
+
+require_once(BASE_HELPER_RAPI_PATH . '/weishengyjd/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')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false,false];
+        }
+        $order_id = $order_info['order_id'];
+
+        if ($status === 2) {
+            $data['official_sn'] = strtolower($params['szRtnMsg']) == 'null' ? '' : $params['szRtnMsg'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false,true];
+        }
+        elseif ($status === 3) {
+            return [$order_id, false, false,true];
+        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

+ 102 - 0
helper/refill/api/lingzh/weishengyjd/RefillPhone.php

@@ -0,0 +1,102 @@
+<?php
+
+namespace refill\weishengyjd;
+
+require_once(BASE_HELPER_RAPI_PATH . '/weishengyjd/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)
+    {
+        $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);
+
+        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['nRtn'] == 0) {
+                return [true, '', false];
+            } else {
+                return [false, $resp['szRtnCode'], false];
+            }
+        }
+    }
+
+    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, '网络错误'];
+            }
+            $status = intval($resp['nRtn']);
+            if ($status === 5012) {
+                $updata['official_sn'] = $resp['szRtnMsg'];
+                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])) {
+                $order_state = ORDER_STATE_SEND;
+            } else {
+                return [false, $status];
+            }
+            return [true, $order_state];
+        }
+    }
+
+    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);
+    }
+}

+ 12 - 0
helper/refill/api/lingzh/weishengyjd/api.txt

@@ -0,0 +1,12 @@
+下单地址:http://47.96.251.76:10186/plat/api/old/submitorder
+
+查询地址:http://47.96.251.76:10186/plat/api/old/queryorder
+
+查询余额地址:http://47.96.251.76:10186/plat/api/old/queryBalance
+
+用户名:17335762432
+账户ID:200050
+密码 :123456
+秘钥:d906a871ca28442baecaa041d84a13f2
+
+http://47.96.251.76:10186/plat/index

+ 21 - 0
helper/refill/api/lingzh/weishengyjd/config.php

@@ -0,0 +1,21 @@
+<?php
+
+
+namespace refill\weishengyjd;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://47.96.251.76:10186/plat/api/old/submitorder';
+    const QUERY_URL= 'http://47.96.251.76:10186/plat/api/old/queryorder';
+
+    const USER_ID= '200050';
+    const KEY = 'd906a871ca28442baecaa041d84a13f2';
+    const NOTIFY_URL = BASE_SITE_URL . "/racc/callback/lingzh/weishengyjd.php";
+    const operator = [
+        mtopcard\ChinaMobileCard  => 1,
+        mtopcard\ChinaUnicomCard  => 2,
+        mtopcard\ChinaTelecomCard => 3
+    ];
+    const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+}

二进制
helper/refill/api/lingzh/weishengyjd/增值业务接口文档V2.3.docx


二进制
helper/refill/api/lingzh/weishengyjd/接口状态码映射表.docx


+ 1 - 1
helper/refill/api/lingzh/weishengywt/RefillCallBack.php

@@ -41,7 +41,7 @@ class RefillCallBack implements refill\IRefillCallBack
             return [$order_id, true, false,true];
         }
         elseif ($status === 3) {
-            return [$order_id, false, true,true];
+            return [$order_id, false, false,true];
         }
         else {
             return [$order_id, false, false,false];

+ 76 - 0
helper/refill/api/lingzh/yezi/RefillCallBack.php

@@ -0,0 +1,76 @@
+<?php
+namespace refill\yezi;
+
+require_once(BASE_HELPER_RAPI_PATH . '/yezi/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'];
+        
+        $data['official_sn'] = strtolower($params['official_sn']) == 'null' ? '' : $params['official_sn'];
+
+        if ($status === 'SUCCESS') {
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false,true];
+        }
+        elseif ($status === 'CANCEL') {
+            return [$order_id, false, false,true];
+        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

+ 127 - 0
helper/refill/api/lingzh/yezi/RefillPhone.php

@@ -0,0 +1,127 @@
+<?php
+
+namespace refill\yezi;
+
+require_once(BASE_HELPER_RAPI_PATH . '/yezi/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)
+    {
+        $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');
+
+        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['status'] == 40) {
+                    $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['status'] == 0) {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif (in_array($data['status'], [10,20,30])) {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $resp['message']];
+                }
+                return [true, $order_state];
+            } 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);
+    }
+}

+ 12 - 0
helper/refill/api/lingzh/yezi/config.php

@@ -0,0 +1,12 @@
+<?php
+
+namespace refill\yezi;
+
+class config
+{
+    const ORDER_URL = 'https://www.xyzshops.cn/mobile/index.php';
+
+    const MCH_ID = 10147;
+    const KEY = 'b2b636b193eab82f4b290b6057abec9c';
+    const NOTIFY_URL = BASE_SITE_URL . "/racc/callback/lingzh/yezi.php";
+}

+ 1 - 2
helper/refill/api/xyz/weiyiman/RefillCallBack.php

@@ -33,10 +33,9 @@ class RefillCallBack implements refill\IRefillCallBack
             return [false, false, false,false];
         }
         $order_id = $order_info['order_id'];
-        
-        $data['official_sn'] = strtolower($params['serialno']) == 'null' ? '' : $params['serialno'];
 
         if ($status === 2) {
+            $data['official_sn'] = strtolower($params['serialno']) == 'null' ? '' : $params['serialno'];
             Model('refill_order')->edit($order_id, $data);
             return [$order_id, true, false,true];
         }

+ 1 - 1
helper/refill/api/xyz/weiyiman/RefillPhone.php

@@ -22,7 +22,7 @@ class RefillPhone extends refill\IRefillPhone
         $params['version'] = '1.0';
         $params['packcode'] = $amount;
         $params['mobile'] = $phone;
-        $params['flowtype'] = '1001';
+        $params['flowtype'] = 'fee_slow';
         $params['callback_url'] = config::NOTIFY_URL;
         return $params;
     }

+ 4 - 4
helper/refill/api/xyz/weiyiman/config.php

@@ -3,11 +3,11 @@ namespace refill\weiyiman;
 
 class config
 {
-    const ORDER_URL = 'http://115.28.209.246:8081/api/charge.do';
-    const QUERY_URL = 'http://115.28.209.246:8081/api/query_chargestate.do';
+    const ORDER_URL = 'http://47.118.78.137:6066/fee/api/charge.do';
+    const QUERY_URL = 'http://47.118.78.137:6066/fee/api/query_state.do';
 
-    const USER_ID = 'd62df4c1fc804cd48f86';
-    const KEY = '7f3feb5e0c1049f4b839';
+    const USER_ID = '46dbb0c992644da881d0';
+    const KEY = '8db13714e4d74a6e81cf';
     const NOTIFY_URL = BASE_SITE_URL . "/mobile/refill_weiyiman.php";
     const ExtHeaders = ['Content-Type: application/json'];
 }

二进制
helper/refill/api/xyz/weiyiman/维一-接口文档.pdf


+ 18 - 0
helper/refill/api/xyz/weiyiman/维一接口.txt

@@ -0,0 +1,18 @@
+账户名:guoyanfanglue
+
+编码:46dbb0c992644da881d0
+
+密码:a123456
+
+秘钥:8db13714e4d74a6e81cf
+
+手工提单密码:df090ea0747a4a96b130
+
+商户登录地址:http://47.118.78.137:6066/fee/agent/login.do
+
+
+充值请求地址:47.118.78.137:6066
+
+订单查询地址:47.118.78.137:6066
+
+余额查询地址:47.118.78.137:6066

+ 4 - 0
racc/callback/lingzh/weishengyjd.php

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

+ 4 - 0
racc/callback/lingzh/yezi.php

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

+ 30 - 0
test/TestRefill.php

@@ -307,6 +307,16 @@ class TestRefill extends TestCase
 //        refill\RefillFactory::instance()->notify('weiyi',$params);
     }
 
+    public function testWeiyimanPhone()
+    {
+        $providers = new refill\weiyiman\RefillPhone([]);
+//        $resp = $providers->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '47591620898269370373']);
+        $data = '{"userid":"46dbb0c992644da881d0","ordernum":"47591620898269370373","mobile":"18500608333","timestamp":"20210513211050","state":"2","desc":"%E5%85%85%E5%80%BC%E6%88%90%E5%8A%9F","serialno":"173313182872","sign":"e9d2ea85b43808d1587793ae329cdb0b"}';
+        $params = json_decode($data , true);
+        refill\RefillFactory::instance()->notify('weiyiman',$params);
+    }
+
     public function testTongluPhone()
     {
         $providers = new refill\tonglu\RefillPhone([]);
@@ -349,6 +359,26 @@ class TestRefill extends TestCase
         refill\RefillFactory::instance()->notify('weishengywt', $params);
     }
 
+    public function testWeishengyJDPhone()
+    {
+        $providers = new refill\weishengyjd\RefillPhone([]);
+//        $resp = $providers->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '14261620887423822879']);
+        $data = '{"szOrderId":"14261620887423822879","fSalePrice":"44.0","szAgentId":"200050","nFlag":"3","szVerifyString":"3cceef390602058e1d2fdde2e07636a4","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"50"}';
+        $params = json_decode($data, true);
+        refill\RefillFactory::instance()->notify('weishengyjd', $params);
+    }
+
+    public function testYeziPhone()
+    {
+        $providers = new refill\yezi\RefillPhone([]);
+//        $resp = $providers->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '35261620988265145105']);
+        $data = '{"mchid":"10147","order_sn":"35261620988265145105","amount":"50.00","cardno":"18500608333","trade_no":"6363570674332280422825","idcard":"","card_name":"","official_sn":"","message":"","state":"CANCEL","sign":"b79f2ddbb5b7eef98f414585a5bd2cde"}';
+        $params = json_decode($data, true);
+        refill\RefillFactory::instance()->notify('yezi', $params);
+    }
+
     public function testZeheng()
     {
         $providers = new refill\zeheng\RefillOil([]);