Browse Source

huiyuan test

xiaoyu 1 year ago
parent
commit
fef7f1e6bc
44 changed files with 888 additions and 32 deletions
  1. 78 3
      data/config/xyz/refill.ini.php
  2. 8 0
      helper/refill/api/xyz/bier_fs/config.php
  3. 8 0
      helper/refill/api/xyz/bier_fs/椰子.txt
  4. 39 0
      helper/refill/api/xyz/bingguang/RefillCallBack.php
  5. 60 0
      helper/refill/api/xyz/bingguang/RefillPhone.php
  6. 20 0
      helper/refill/api/xyz/bingguang/config.php
  7. 2 0
      helper/refill/api/xyz/by_online/RefillCallBack.php
  8. 2 0
      helper/refill/api/xyz/by_online/RefillPhone.php
  9. BIN
      helper/refill/api/xyz/by_online/纸莺运营商数据管理平台对外接口.pdf
  10. BIN
      helper/refill/api/xyz/dazhanggui_fs/20230511广东 云南移动调价函.jpg
  11. 2 2
      helper/refill/api/xyz/dazhanggui_fs/config.php
  12. BIN
      helper/refill/api/xyz/guochuang/20230512陕西电信调价函.jpg
  13. 1 1
      helper/refill/api/xyz/guochuang/config.php
  14. 1 1
      helper/refill/api/xyz/huiyuan/RefillPhone.php
  15. 1 7
      helper/refill/api/xyz/huiyuan/config.php
  16. 12 12
      helper/refill/api/xyz/jiuyi/config.php
  17. 18 0
      helper/refill/api/xyz/jiuyi/产品编码.txt
  18. 58 0
      helper/refill/api/xyz/jiuyi_yin/RefillCallBack.php
  19. 140 0
      helper/refill/api/xyz/jiuyi_yin/RefillPhone.php
  20. BIN
      helper/refill/api/xyz/jiuyi_yin/api.pdf
  21. 38 0
      helper/refill/api/xyz/jiuyi_yin/config.php
  22. 14 0
      helper/refill/api/xyz/jiuyi_yin/产品编码.txt
  23. 14 0
      helper/refill/api/xyz/jiuyi_yin/椰子账户信息.txt
  24. BIN
      helper/refill/api/xyz/meixu_fs/20230512陕西电信调价函.jpg
  25. 1 1
      helper/refill/api/xyz/meixu_fs/config.php
  26. 9 1
      helper/refill/api/xyz/qianqian_fs/api.txt
  27. 8 0
      helper/refill/api/xyz/qianqian_fs/config.php
  28. 6 0
      helper/refill/api/xyz/youhe_fs/api.txt
  29. 7 0
      helper/refill/api/xyz/youhe_fs/config.php
  30. 50 0
      helper/refill/api/xyz/zhongst_oil/RefillCallBack.php
  31. 146 0
      helper/refill/api/xyz/zhongst_oil/RefillOil.php
  32. 21 0
      helper/refill/api/xyz/zhongst_oil/api.txt
  33. 32 0
      helper/refill/api/xyz/zhongst_oil/config.php
  34. 8 0
      helper/refill/api/yl/bier_fs/config.php
  35. 2 2
      helper/refill/api/yl/dazhanggui_fs/config.php
  36. 1 1
      helper/refill/api/yl/guochuang/config.php
  37. 8 0
      helper/refill/api/yl/qianqian_fs/config.php
  38. 7 0
      helper/refill/api/yl/youhe_fs/config.php
  39. 5 0
      mobile/callback/refill_bingguang.php
  40. 35 0
      mobile/callback/refill_huiyuan.php
  41. 8 0
      mobile/callback/refill_jiuyi_yin.php
  42. 4 0
      mobile/callback/refill_zhongst_oil.php
  43. 2 0
      mobile/signature.php
  44. 12 1
      test/TestRefill.php

+ 78 - 3
data/config/xyz/refill.ini.php

@@ -259,6 +259,26 @@ $feihan_oil = ['name' => 'feihan', 'store_id' => 317, 'qualitys' => '5',
     ],
     'period' => [], 'refill_type' => 'api'];
 
+$zhongst_oil = ['name' => 'zhongst_oil', 'store_id' => 323, 'qualitys' => '5',
+    'amount' => [
+//        50 => [
+//            ['goods_id' => 8648, 'price' => 50.25, 'quality' => 5, 'card_type' => 'sinopec']
+//        ],
+        100 => [
+            ['goods_id' => 8649, 'price' => 100.3, 'quality' => 5, 'card_type' => 'sinopec'],
+        ],
+        200 => [
+            ['goods_id' => 8650, 'price' => 200.6, 'quality' => 5, 'card_type' => 'sinopec'],
+        ],
+        500 => [
+            ['goods_id' => 8651, 'price' => 500.5, 'quality' => 5, 'card_type' => 'sinopec'],
+        ],
+        1000 => [
+            ['goods_id' => 8652, 'price' => 998.5, 'quality' => 5, 'card_type' => 'sinopec'],
+        ],
+    ],
+    'period' => [], 'refill_type' => 'api'];
+
 $oil_providers = [
 //    ['name' => 'tianjt', 'cfg' => $tianjt_oil],
 //    ['name' => 'suhctm', 'cfg' => $suhctm_oil],
@@ -281,6 +301,7 @@ $oil_providers = [
     ['name' => 'menggu', 'cfg' => $menggu_oil],
     ['name' => 'jumi_sec', 'cfg' => $jumi_sec_oil],
     ['name' => 'feihan', 'cfg' => $feihan_oil],
+    ['name' => 'zhongst_oil', 'cfg' => $zhongst_oil],
 ];
 $config['oil_providers'] = $oil_providers;
 
@@ -8802,9 +8823,9 @@ $by_online_phone = ['name' => 'by_online', 'store_id' => 319, 'qualitys' => '2',
 //        10 => [['goods_id' => 8623, 'price' => 10, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        20 => [['goods_id' => 8624, 'price' => 20, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        30 => [['goods_id' => 8625, 'price' => 30, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 8626, 'price' => 50, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 8627, 'price' => 100, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 8628, 'price' => 200, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 8626, 'price' => 50, 'quality' => 2, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 8627, 'price' => 100, 'quality' => 2, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 8628, 'price' => 200, 'quality' => 2, 'card_type' => 'chinamobile']],
 //        300 => [['goods_id' => 8629, 'price' => 300, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        500 => [['goods_id' => 8630, 'price' => 500, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
@@ -8855,6 +8876,51 @@ $guochuang_nation_trd_phone = ['name' => 'guochuang_nation_trd', 'store_id' => 3
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$jiuyi_yin_phone = ['name' => 'jiuyi_yin', 'store_id' => 322, 'qualitys' => '2',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 8640, 'price' => 10.24, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8640, 'price' => 10.09, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 8640, 'price' => 10.23, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 8641, 'price' => 20.48, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8641, 'price' => 20.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 8641, 'price' => 20.26, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 8642, 'price' => 30.105, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8642, 'price' => 30.135, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8642, 'price' => 30.135, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 8643, 'price' => 50.175, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8643, 'price' => 50.125, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8643, 'price' => 50.225, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 8644, 'price' => 100.35, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8644, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8644, 'price' => 100.45, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 8645, 'price' => 200.7, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8645, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8645, 'price' => 200.9, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 8646, 'price' => 301.05, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8646, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8646, 'price' => 301.35, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 8647, 'price' => 501.75, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8647, 'price' => 501, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8647, 'price' => 502.25, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -9127,6 +9193,7 @@ $phone_providers = [
     ['name' => 'zhenghe_sec', 'cfg' => $zhenghe_sec_phone],
     ['name' => 'by_online', 'cfg' => $by_online_phone],
     ['name' => 'guochuang_nation_trd', 'cfg' => $guochuang_nation_trd_phone],
+    ['name' => 'jiuyi_yin', 'cfg' => $jiuyi_yin_phone],
 
 ];
 $config['phone_providers'] = $phone_providers;
@@ -9217,6 +9284,13 @@ $weixue_doubi_third = ['name' => 'weixue_doubi', 'store_id' => 307, 'qualitys' =
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$bingguang_third = ['name' => 'bingguang', 'store_id' => 321, 'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 8639, 'price' => 99, 'quality' => 1, 'card_type' => 'third']],
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+
 $third_providers = [
     ['name' => 'lingzhthird', 'cfg' => $lingzhthird],
     ['name' => 'jumithird', 'cfg' => $jumithird],
@@ -9232,6 +9306,7 @@ $third_providers = [
     ['name' => 'tianrui', 'cfg' => $tianrui_third],
     ['name' => 'zhongst_doubi', 'cfg' => $zhongst_doubi_third],
     ['name' => 'weixue_doubi', 'cfg' => $weixue_doubi_third],
+    ['name' => 'bingguang', 'cfg' => $bingguang_third],
 ];
 $config['third_providers'] = $third_providers;
 

+ 8 - 0
helper/refill/api/xyz/bier_fs/config.php

@@ -163,6 +163,13 @@ class config
                 100 => 'CTCCQIONGr100r',
                 200 => 'CTCCQIONGr200r',
             ],
+            //广西
+            20 => [
+                30  => 'CTCCGXr30r',
+                50  => 'CTCCGXr50r',
+                100 => 'CTCCGXr100r',
+                200 => 'CTCCGXr200r',
+            ],
         ]
     ];
 
@@ -205,5 +212,6 @@ class config
         "6-30-11" => 28.65, "6-50-11" => 47.75, "6-100-11" => 95.5, "6-200-11" => 191,//浙江 11
         "6-30-31" => 28.8, "6-50-31" => 48, "6-100-31" => 96, "6-200-31" => 192,//新疆 31
         "6-30-21" => 28.65, "6-50-21" => 47.75, "6-100-21" => 95.5, "6-200-21" => 191,//海南 21
+        "6-30-20" => 28.5, "6-50-20" => 47.5, "6-100-20" => 95, "6-200-20" => 190,//广西 20
     ];
 }

+ 8 - 0
helper/refill/api/xyz/bier_fs/椰子.txt

@@ -201,3 +201,11 @@ CMCCHBr200r
 CMCCLNr50r
 CMCCLNr100r
 CMCCLNr200r
+
+2023.5.11
+广西电信产品编码:
+
+CTCCGXr30r
+CTCCGXr50r
+CTCCGXr100r
+CTCCGXr200r

+ 39 - 0
helper/refill/api/xyz/bingguang/RefillCallBack.php

@@ -0,0 +1,39 @@
+<?php
+
+
+namespace refill\bingguang;
+
+require_once(BASE_HELPER_RAPI_PATH . '/bingguang/config.php');
+
+
+use refill;
+
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        return true;
+    }
+
+    public function notify($params)
+    {
+        $order_sn = $params['order_sn'];
+        $status = intval($params['status']);
+
+        $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) {
+            return [$order_id, true, false,true];
+        }
+        elseif ($status === 0) {
+            return [$order_id, false, true,true];
+        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

+ 60 - 0
helper/refill/api/xyz/bingguang/RefillPhone.php

@@ -0,0 +1,60 @@
+<?php
+
+namespace refill\bingguang;
+
+require_once(BASE_HELPER_RAPI_PATH . '/bingguang/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['tel'] = $phone;
+        $params['mch_order_id'] = $order_sn;
+        $params['mchid'] = config::MCHID;
+        $params['price'] = $amount;
+        $params['notify'] = config::NOTIFY_URL;
+        $params['teltype'] = config::operator[$card_type];
+        $params['timeout'] = 50;
+        $params['time'] = time();
+        $params['rand'] = rand(100000,999999);
+
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        refill\util::send_normal($params['order_sn']);
+        return [true , '',false];
+    }
+
+    public function query($refill_info)
+    {
+        $params['mch_order_id'] = $refill_info['order_sn'];
+        $params['mchid'] = config::MCHID;
+        $content = $params['mchid'] . $params['mch_order_id'] . config::KEY;
+        $params['sign'] = md5($content);
+        $resp = http_request(config::QUERY_URL, $params , 'POST' , false);
+        if ($resp === false) {
+            return [false, '系统错误'];
+        } else {
+            $rand = mt_rand(0,1);
+            return [$rand , ''];
+        }
+    }
+
+    private function sign($params)
+    {
+        $key = config::KEY;
+        $content  = $params['mchid'] . $params['tel'] . $params['mch_order_id'] . $params['price'] . $params['teltype'] . $params['timeout'] . $params['notify'];
+        $content .= $params['time'] . $params['rand'] . $key;
+        return md5($content);
+    }
+}

+ 20 - 0
helper/refill/api/xyz/bingguang/config.php

@@ -0,0 +1,20 @@
+<?php
+
+
+namespace refill\bingguang;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'https://www.baidu.com/';
+    const QUERY_URL = 'https://www.baidu.com/';
+
+    const MCHID = 10019;
+    const KEY = '953b8e10a70ef4e85b77f09448c0e316';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_bingguang.php";
+    const operator = [
+        mtopcard\ChinaMobileCard  => 2,
+        mtopcard\ChinaUnicomCard  => 1,
+        mtopcard\ChinaTelecomCard => 3
+    ];
+}

+ 2 - 0
helper/refill/api/xyz/by_online/RefillCallBack.php

@@ -29,6 +29,8 @@ class RefillCallBack implements refill\IRefillCallBack
         $order_id = $order_info['order_id'];
 
         if ($status === 7) {
+            $data['official_sn'] = strtolower($params['charge_id']) == 'null' ? '' : $params['charge_id'];
+            Model('refill_order')->edit($order_id, $data);
             return [$order_id, true, false, true];
         } elseif (in_array($status, [3, 4, 6], true)) {
             return [$order_id, false, true, true];

+ 2 - 0
helper/refill/api/xyz/by_online/RefillPhone.php

@@ -85,6 +85,8 @@ class RefillPhone extends refill\IRefillPhone
             {
                 $status = $resp['data']['order_status'];
                 if ($status === 7) {
+                    $updata['official_sn'] = $resp['data']['charge_id'];
+                    Model('refill_order')->edit($refill_info['order_id'], $updata);
                     $order_state = ORDER_STATE_SUCCESS;
                 } elseif (in_array($status, [3, 4, 6], true)) {
                     $order_state = ORDER_STATE_CANCEL;

BIN
helper/refill/api/xyz/by_online/纸莺运营商数据管理平台对外接口.pdf


BIN
helper/refill/api/xyz/dazhanggui_fs/20230511广东 云南移动调价函.jpg


+ 2 - 2
helper/refill/api/xyz/dazhanggui_fs/config.php

@@ -220,10 +220,10 @@ class config
         //移动
         "4-50-10" => 47.25, "4-100-10" => 94.5, "4-200-10" => 189,//江苏 10
         "4-50-15" => 47.25, "4-100-15" => 94.5, "4-200-15" => 189,//山东 15
-        "4-30-19" => 28.65, "4-50-19" => 47.75, "4-100-19" => 95.5, "4-200-19" => 191,//广东 19
+        "4-30-19" => 28.59, "4-50-19" => 47.65, "4-100-19" => 95.3, "4-200-19" => 190.6,//广东 19
         "4-30-24" => 27.9, "4-50-24" => 46.5, "4-100-24" => 93, "4-200-24" => 186,//贵州 24
         "4-30-13" => 27.9, "4-50-13" => 47, "4-100-13" => 94, "4-200-13" => 188,//福建 13
-        "4-30-25" => 28.08, "4-50-25" => 47.1, "4-100-25" => 94.2, "4-200-25" => 188.4,//云南 25
+        "4-30-25" => 28.08, "4-50-25" => 47, "4-100-25" => 94, "4-200-25" => 188,//云南 25
         "4-30-16" => 28.2, "4-50-16" => 47, "4-100-16" => 94, "4-200-16" => 188,//河南 16
         "4-30-11" => 28.95, "4-50-11" => 48.25, "4-100-11" => 96.5, "4-200-11" => 193,//浙江 11
         "4-50-3" => 47, "4-100-3" => 94, "4-200-3" => 188,//河北 3

BIN
helper/refill/api/xyz/guochuang/20230512陕西电信调价函.jpg


+ 1 - 1
helper/refill/api/xyz/guochuang/config.php

@@ -95,7 +95,7 @@ class config
         "5-20-23" => 20.08, "5-30-23" => 30.12, "5-50-23" => 50.2, "5-100-23" => 100.4, "5-200-23" => 200.8, "5-300-23" => 301.2, "5-500-23" => 502,//四川 23
         "5-10-31" => 10.22, "5-20-31" => 20.22, "5-30-31" => 30.24, "5-50-31" => 50.25, "5-100-31" => 100.3, "5-200-31" => 200.4, "5-300-31" => 300.6, "5-500-31" => 501,//新疆 31
         //电信
-        "6-10-27" => 9.955, "6-20-27" => 19.91, "6-30-27" => 29.865, "6-50-27" => 49.775, "6-100-27" => 99.55, "6-200-27" => 199.1, "6-300-27" => 298.5, "6-500-27" => 497.5,//陕西 27
+        "6-10-27" => 9.98, "6-20-27" => 19.96, "6-30-27" => 29.94, "6-50-27" => 49.9, "6-100-27" => 99.8, "6-200-27" => 199.6, "6-300-27" => 299.4, "6-500-27" => 499,//陕西 27
         "6-10-4" => 9.935, "6-20-4" => 19.87, "6-30-4" => 29.805, "6-50-4" => 49.675, "6-100-4" => 99.35, "6-200-4" => 198.7, "6-300-4" => 298.05, "6-500-4" => 496.75,//山西 4
         "6-10-18" => 10.04, "6-20-18" => 20.08, "6-30-18" => 30.12, "6-50-18" => 50.15, "6-100-18" => 100.3, "6-200-18" => 200.6, "6-300-18" => 300.9, "6-500-18" => 501.5,//湖南 18
         "6-10-15" => 10.21, "6-20-15" => 20.22, "6-30-15" => 30.231, "6-50-15" => 50.25, "6-100-15" => 100.3, "6-200-15" => 200.3, "6-300-15" => 300.45, "6-500-15" => 500.75,//山东 15

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

@@ -183,8 +183,8 @@ class RefillPhone extends refill\IRefillPhone
     public function decode_tag($squery)
     {
         if(empty($squery)) return false;
-        $squery = mb_convert_encoding($squery, "UTF-8", "GB2312");
         $squery = urldecode($squery);
+        $squery = mb_convert_encoding($squery, "UTF-8", "GB2312");
 
         $result = [];
         $params = preg_split('/&/', $squery);

+ 1 - 7
helper/refill/api/xyz/huiyuan/config.php

@@ -12,16 +12,10 @@ class config
 
     const AGENT_ID= '2145738';
     const KEY = '4458A6BD7839';
-//    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_huiyuan.php";
-    const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.php";
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_huiyuan.php";
 
     const API_IP = NET_IP;
 
-    const operator = [
-        mtopcard\ChinaMobileCard  => 1,
-        mtopcard\ChinaUnicomCard  => 2,
-        mtopcard\ChinaTelecomCard => 3
-    ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=GB2312'];
 
     const ERR_NOS = [

+ 12 - 12
helper/refill/api/xyz/jiuyi/config.php

@@ -16,22 +16,22 @@ class config
 
     const product_code = [
         mtopcard\ChinaMobileCard => [
-            100 => 'PLM100188',
-            200 => 'PLM100189',
-            300 => 'PLM100190',
-            500 => 'PLM100191'
+            100 => 'SKU100188',
+            200 => 'SKU100189',
+            300 => 'SKU100190',
+            500 => 'SKU100191'
         ],
         mtopcard\ChinaUnicomCard => [
-            50 => 'PLM100177',
-            100 => 'PLM100178',
-            200 => 'PLM100179',
-            300 => 'PLM100180',
+            50 => 'SKU100177',
+            100 => 'SKU100178',
+            200 => 'SKU100179',
+            300 => 'SKU100180',
         ],
         mtopcard\ChinaTelecomCard => [
-            100 => 'PLM100183',
-            200 => 'PLM100184',
-            300 => 'PLM100185',
-            500 => 'PLM100186'
+            100 => 'SKU100183',
+            200 => 'SKU100184',
+            300 => 'SKU100185',
+            500 => 'SKU100186'
         ],
     ];
 }

+ 18 - 0
helper/refill/api/xyz/jiuyi/产品编码.txt

@@ -29,3 +29,21 @@
 全国电信200元	直充	200	PLM100184
 全国电信300元	直充	300	PLM100185
 全国电信500元	直充	500	PLM100186
+
+
+2023.5.10
+
+全国移动100元	直充	100	SKU100188
+全国移动200元	直充	200	SKU100189
+全国移动300元	直充	300	SKU100190
+全国移动500元	直充	500	SKU100191
+
+全国联通50元	直充	50	SKU100177
+全国联通100元	直充	100	SKU100178
+全国联通200元	直充	200	SKU100179
+全国联通300元	直充	300	SKU100180
+
+全国电信100元	直充	100	SKU100183
+全国电信200元	直充	200	SKU100184
+全国电信300元	直充	300	SKU100185
+全国电信500元	直充	500	SKU100186

+ 58 - 0
helper/refill/api/xyz/jiuyi_yin/RefillCallBack.php

@@ -0,0 +1,58 @@
+<?php
+
+
+namespace refill\jiuyi_yin;
+
+require_once(BASE_HELPER_RAPI_PATH . '/jiuyi_yin/config.php');
+
+use refill;
+
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $input = $params;
+        unset($input['sign']);
+        unset($input['data']);
+        $sign = $this->sign($input);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        ksort($params);
+        $body = "";
+        foreach ($params as $k => $v) {
+            $body .= "{$k}{$v}";
+        }
+        return base64_encode(hash_hmac("sha1", $body, config::ACCESS_SECRET, true));
+    }
+
+    //[$order_id, $success, $can_try, $need_handle]
+    public function notify($params)
+    {
+        $status = intval($params['code']);
+        $order_sn = $params['out_trade_no'];
+        $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) {
+            $data['official_sn'] = strtolower($params['data']['official_id']) == 'null' ? '' : $params['data']['official_id'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false,true];
+        }
+        elseif ($status === 3) {
+            return [$order_id, false, true,true];
+        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

+ 140 - 0
helper/refill/api/xyz/jiuyi_yin/RefillPhone.php

@@ -0,0 +1,140 @@
+<?php
+
+namespace refill\jiuyi_yin;
+
+require_once(BASE_HELPER_RAPI_PATH . '/jiuyi_yin/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $card_type, int $amount, string $order_sn)
+    {
+        $params['phone'] = $phone;
+        $params['access_key'] = config::ACCESS_KEY;
+        $params['par_value'] = $amount;
+        $params['code'] = config::product_code[$card_type][$amount];
+        $params['producttype'] = 1;
+        $params['out_trade_no'] = $order_sn;
+        $params['timestamp'] = time();
+
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $params = $this->req_params($card_no, $card_type, $amount, $params['order_sn']);
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+        $params['notify_url'] = config::NOTIFY_URL;
+        $params = json_encode($params);
+
+        $resp = http_post_data(config::ORDER_URL, $params , 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];
+            } elseif ($resp['code'] === 1) {
+                return [true, $resp['data']['orderid'], false];
+            } elseif ($resp['code'] === 3) {
+                return [false, $resp['msg'], false];
+            } elseif (in_array($resp['code'], [0, 2], true)) {
+                $net_errno = "HTTP-{$resp['code']}";
+                return [false, $resp['msg'], true];
+            } else {
+                $err = 998;
+                $net_errno = "HTTP-{$err}";
+                return [false, $resp['msg'], true];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['access_key'] = config::ACCESS_KEY;
+        $params['orderid'] = $refill_info['ch_trade_no'];
+        $params['out_trade_no'] = $refill_info['order_sn'];
+        $params['timestamp'] = time();
+        $params['sign'] = $this->sign($params);
+        $params = json_encode($params);
+
+        $resp = http_post_data(config::QUERY_URL, $params , config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            }
+            else
+            {
+                $status = intval($resp['code']);
+                if ($status === 2) {
+                    Model('refill_order')->edit($refill_info['order_id'], ['official_sn' => $resp['data']['official_id']]);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($status === 3) {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif ($status === 1) {
+                    $order_state = ORDER_STATE_SEND;
+                } elseif ($status === 5 && (time() - $refill_info['commit_time'] > 600)) {
+                    $order_state = ORDER_STATE_NOEXIST;
+                } else {
+                    return [false, $resp['msg']];
+                }
+                return [true, $order_state];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['access_key'] = config::ACCESS_KEY;
+        $params['timestamp'] = time();
+        $params['sign'] = $this->sign($params);
+        $params = json_encode($params);
+
+        $resp = http_post_data(config::BALANCE_URL, $params , 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['code'] == 1) {
+                return [true, $resp['balance']];
+            } else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        ksort($params);
+        $body = "";
+        foreach ($params as $k => $v) {
+            $body .= "{$k}{$v}";
+        }
+        return base64_encode(hash_hmac("sha1", $body, config::ACCESS_SECRET, true));
+    }
+}

BIN
helper/refill/api/xyz/jiuyi_yin/api.pdf


+ 38 - 0
helper/refill/api/xyz/jiuyi_yin/config.php

@@ -0,0 +1,38 @@
+<?php
+namespace refill\jiuyi_yin;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://47.93.7.11:10050/order/insert';
+    const QUERY_URL = 'http://47.93.7.11:10050/order/query';
+    const BALANCE_URL = 'http://47.93.7.11:10050/member/account';
+
+    const ACCESS_KEY = 'ACK211394684';
+    const ACCESS_SECRET = '74B1D6461A6E984BA3EEC8293975FF37';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_jiuyi_yin.php";
+
+    const ExtHeaders = ['Content-Type: application/json; charset=utf-8'];
+
+    const product_code = [
+        mtopcard\ChinaMobileCard => [
+            30  => 'SKU100285',
+            50  => 'SKU100286',
+            100 => 'SKU100287',
+            200 => 'SKU100288',
+            300 => 'SKU100289',
+            500 => 'SKU100290'
+        ],
+        mtopcard\ChinaUnicomCard => [
+
+        ],
+        mtopcard\ChinaTelecomCard => [
+            30  => 'SKU100291',
+            50  => 'SKU100292',
+            100 => 'SKU100293',
+            200 => 'SKU100294',
+            300 => 'SKU100295',
+            500 => 'SKU100296'
+        ],
+    ];
+}

+ 14 - 0
helper/refill/api/xyz/jiuyi_yin/产品编码.txt

@@ -0,0 +1,14 @@
+【全国移动手支】产品编码:
+全国移动手支30-限		SKU100285
+全国移动手支50-限		SKU100286
+全国移动手支100-限	    SKU100287
+全国移动手支200-限		SKU100288
+全国移动手支300-限		SKU100289
+全国移动手支500-限		SKU100290
+【全国电信电渠】产品编码:
+全国电信电渠30-限		SKU100291
+全国电信电渠50-限		SKU100292
+全国电信电渠100-限	    SKU100293
+全国电信电渠200-限		SKU100294
+全国电信电渠300-限		SKU100295
+全国电信电渠500-限		SKU100296

+ 14 - 0
helper/refill/api/xyz/jiuyi_yin/椰子账户信息.txt

@@ -0,0 +1,14 @@
+九亿九亿创芯生产环境接口地址:
+直充收单:http://47.93.7.11:10050/order/insert
+直充查单:http://47.93.7.11:10050/order/query
+余额查询:http://47.93.7.11:10050/member/account
+
+九亿创芯会员端登录地址
+http://47.93.7.11:10040/html/login.html
+
+正式账号:
+
+前台登录名:18513846008ZL
+前台登陆密码:700886
+access_key:ACK211394684
+accessSecret:74B1D6461A6E984BA3EEC8293975FF37

BIN
helper/refill/api/xyz/meixu_fs/20230512陕西电信调价函.jpg


+ 1 - 1
helper/refill/api/xyz/meixu_fs/config.php

@@ -122,6 +122,6 @@ class config
 
         //电信
         "6-10-23" => 10.025, "6-20-23" => 20.05, "6-30-23" => 30.075, "6-50-23" => 50.125, "6-100-23" => 100.25, "6-200-23" => 200.5, "6-300-23" => 300.75, "6-500-23" => 501.25,//四川 6
-        "6-10-27" => 9.965, "6-20-27" => 19.93, "6-30-27" => 29.895, "6-50-27" => 49.825, "6-100-27" => 99.65, "6-200-27" => 199.3, "6-300-27" => 298.95, "6-500-27" => 498.25,//陕西 27
+        "6-10-27" => 9.985, "6-20-27" => 19.97, "6-30-27" => 29.955, "6-50-27" => 49.925, "6-100-27" => 99.85, "6-200-27" => 199.7, "6-300-27" => 299.55, "6-500-27" => 499.25,//陕西 27
     ];
 }

+ 9 - 1
helper/refill/api/xyz/qianqian_fs/api.txt

@@ -200,4 +200,12 @@ CMCCHBr200r
 
 CMCCLNr50r
 CMCCLNr100r
-CMCCLNr200r
+CMCCLNr200r
+
+2023.5.11
+广西电信产品编码:
+
+CTCCGXr30r
+CTCCGXr50r
+CTCCGXr100r
+CTCCGXr200r

+ 8 - 0
helper/refill/api/xyz/qianqian_fs/config.php

@@ -126,6 +126,13 @@ class config
                 100 => 'CTCCQIONGr100r',
                 200 => 'CTCCQIONGr200r',
             ],
+            //广西
+            20 => [
+                30  => 'CTCCGXr30r',
+                50  => 'CTCCGXr50r',
+                100 => 'CTCCGXr100r',
+                200 => 'CTCCGXr200r',
+            ],
         ]
     ];
 
@@ -169,5 +176,6 @@ class config
         "6-30-11" => 28.65, "6-50-11" => 47.75, "6-100-11" => 95.5, "6-200-11" => 191,//浙江 11
         "6-30-31" => 28.8, "6-50-31" => 48, "6-100-31" => 96, "6-200-31" => 192,//新疆 31
         "6-30-21" => 28.65, "6-50-21" => 47.75, "6-100-21" => 95.5, "6-200-21" => 191,//海南 21
+        "6-30-20" => 28.5, "6-50-20" => 47.5, "6-100-20" => 95, "6-200-20" => 190,//广西 20
     ];
 }

+ 6 - 0
helper/refill/api/xyz/youhe_fs/api.txt

@@ -81,3 +81,9 @@
 福建电信50元 3350050
 福建电信100元 3350100
 福建电信200元 3350200
+
+
+2023.5.12
+湖北移动50元 1420050
+湖北移动100元 1420100
+湖北移动200元 1420200

+ 7 - 0
helper/refill/api/xyz/youhe_fs/config.php

@@ -70,6 +70,12 @@ class config
                 100 => 1450100,
                 200 => 1450200,
             ],
+            //湖北
+            17 => [
+                50  => 1420050,
+                100 => 1420100,
+                200 => 1420200,
+            ],
         ],
         mtopcard\ChinaTelecomCard => [
             //山东
@@ -119,6 +125,7 @@ class config
         "4-30-16" => 28.05, "4-50-16" => 47.25, "4-100-16" => 94.5, "4-200-16" => 189,//河南 16
         "4-30-25" => 28.05, "4-50-25" => 47.25, "4-100-25" => 94.5, "4-200-25" => 189,//云南 25
         "4-30-20" => 28.05, "4-50-20" => 47.25, "4-100-20" => 94.5, "4-200-20" => 189,//广西 20
+        "4-50-17" => 47.25, "4-100-17" => 94.5, "4-200-17" => 189,//湖北 17
 
         //电信
         "6-30-15" => 28.05, "6-50-15" => 48, "6-100-15" => 96, "6-200-15" => 192,//山东 15

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

@@ -0,0 +1,50 @@
+<?php
+namespace refill\zhongst_oil;
+
+require_once(BASE_HELPER_RAPI_PATH . '/zhongst_oil/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) {
+            $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, true,true];
+        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

+ 146 - 0
helper/refill/api/xyz/zhongst_oil/RefillOil.php

@@ -0,0 +1,146 @@
+<?php
+
+namespace refill\zhongst_oil;
+
+require_once(BASE_HELPER_RAPI_PATH . '/zhongst_oil/config.php');
+
+use refill;
+use Log;
+
+class RefillOil extends refill\IRefillOil
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params($phone, int $amount, $card_type, string $order_sn)
+    {
+        $params['szAgentId'] = config::USER_ID;
+        $params['szOrderId'] = $order_sn;
+        $params['szPhoneNum'] = $phone;
+        $params['nMoney'] = $amount;
+        $params['nSortType'] = '104';
+        $params['szProductId'] = config::PRODUCT[$card_type][$amount];
+        $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);
+        if(empty($params['szProductId'])) {
+            return [false, '商品编号错误', false];
+        }
+
+        $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, '网络错误'];
+            }
+
+            $status = $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],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']];
+            }
+
+            return [true, $order_state];
+        }
+    }
+
+    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);
+    }
+}

+ 21 - 0
helper/refill/api/xyz/zhongst_oil/api.txt

@@ -0,0 +1,21 @@
+对接文档:https://docs.qq.com/doc/DWkV1VkxQVk13eEtQ
+
+权益,油卡下单地址:http://123.56.142.204:10186/plat/api/submitorder
+话费下单地址:http://123.56.142.204:10186/plat/api/old/submitorder
+查询地址:http://123.56.142.204:10186/plat/api/old/queryorder
+查询余额地址:http://123.56.142.204:10186/plat/api/old/queryBalance
+
+ID:200072
+秘钥:bb57e16413894d98a8312b032c223f87
+后台地址:http://123.56.142.204:10186/plat/index
+
+账户:gyyk
+
+密码:123456
+
+
+
+中石化100元     104000100
+中石化200元     104000200
+中石化500元     104000500
+中石化1000元    104001000

+ 32 - 0
helper/refill/api/xyz/zhongst_oil/config.php

@@ -0,0 +1,32 @@
+<?php
+
+
+namespace refill\zhongst_oil;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://123.56.142.204:10186/plat/api/submitorder';
+    const QUERY_URL= 'http://123.56.142.204:10186/plat/api/old/queryorder';
+    const BALANCE_URL = 'http://123.56.142.204:10186/plat/api/old/queryBalance';
+
+    const USER_ID= '200072';
+    const KEY = 'bb57e16413894d98a8312b032c223f87';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_zhongst_oil.php";
+
+    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
+    ];
+
+
+    const PRODUCT = [
+        mtopcard\SinopecCard => [
+            100  => 104000100,
+            200  => 104000200,
+            500  => 104000500,
+            1000 => 104001000,
+        ],
+    ];
+}

+ 8 - 0
helper/refill/api/yl/bier_fs/config.php

@@ -163,6 +163,13 @@ class config
                 100 => 'CTCCQIONGr100r',
                 200 => 'CTCCQIONGr200r',
             ],
+            //广西
+            20 => [
+                30  => 'CTCCGXr30r',
+                50  => 'CTCCGXr50r',
+                100 => 'CTCCGXr100r',
+                200 => 'CTCCGXr200r',
+            ],
         ]
     ];
 
@@ -205,5 +212,6 @@ class config
         "6-30-11" => 28.65, "6-50-11" => 47.75, "6-100-11" => 95.5, "6-200-11" => 191,//浙江 11
         "6-30-31" => 28.8, "6-50-31" => 48, "6-100-31" => 96, "6-200-31" => 192,//新疆 31
         "6-30-21" => 28.65, "6-50-21" => 47.75, "6-100-21" => 95.5, "6-200-21" => 191,//海南 21
+        "6-30-20" => 28.5, "6-50-20" => 47.5, "6-100-20" => 95, "6-200-20" => 190,//广西 20
     ];
 }

+ 2 - 2
helper/refill/api/yl/dazhanggui_fs/config.php

@@ -220,10 +220,10 @@ class config
         //移动
         "4-50-10" => 47.25, "4-100-10" => 94.5, "4-200-10" => 189,//江苏 10
         "4-50-15" => 47.25, "4-100-15" => 94.5, "4-200-15" => 189,//山东 15
-        "4-30-19" => 28.65, "4-50-19" => 47.75, "4-100-19" => 95.5, "4-200-19" => 191,//广东 19
+        "4-30-19" => 28.59, "4-50-19" => 47.65, "4-100-19" => 95.3, "4-200-19" => 190.6,//广东 19
         "4-30-24" => 27.9, "4-50-24" => 46.5, "4-100-24" => 93, "4-200-24" => 186,//贵州 24
         "4-30-13" => 27.9, "4-50-13" => 47, "4-100-13" => 94, "4-200-13" => 188,//福建 13
-        "4-30-25" => 28.08, "4-50-25" => 47.1, "4-100-25" => 94.2, "4-200-25" => 188.4,//云南 25
+        "4-30-25" => 28.08, "4-50-25" => 47, "4-100-25" => 94, "4-200-25" => 188,//云南 25
         "4-30-16" => 28.2, "4-50-16" => 47, "4-100-16" => 94, "4-200-16" => 188,//河南 16
         "4-30-11" => 28.95, "4-50-11" => 48.25, "4-100-11" => 96.5, "4-200-11" => 193,//浙江 11
         "4-50-3" => 47, "4-100-3" => 94, "4-200-3" => 188,//河北 3

+ 1 - 1
helper/refill/api/yl/guochuang/config.php

@@ -95,7 +95,7 @@ class config
         "5-20-23" => 20.08, "5-30-23" => 30.12, "5-50-23" => 50.2, "5-100-23" => 100.4, "5-200-23" => 200.8, "5-300-23" => 301.2, "5-500-23" => 502,//四川 23
         "5-10-31" => 10.22, "5-20-31" => 20.22, "5-30-31" => 30.24, "5-50-31" => 50.25, "5-100-31" => 100.3, "5-200-31" => 200.4, "5-300-31" => 300.6, "5-500-31" => 501,//新疆 31
         //电信
-        "6-10-27" => 9.955, "6-20-27" => 19.91, "6-30-27" => 29.865, "6-50-27" => 49.775, "6-100-27" => 99.55, "6-200-27" => 199.1, "6-300-27" => 298.5, "6-500-27" => 497.5,//陕西 27
+        "6-10-27" => 9.98, "6-20-27" => 19.96, "6-30-27" => 29.94, "6-50-27" => 49.9, "6-100-27" => 99.8, "6-200-27" => 199.6, "6-300-27" => 299.4, "6-500-27" => 499,//陕西 27
         "6-10-4" => 9.935, "6-20-4" => 19.87, "6-30-4" => 29.805, "6-50-4" => 49.675, "6-100-4" => 99.35, "6-200-4" => 198.7, "6-300-4" => 298.05, "6-500-4" => 496.75,//山西 4
         "6-10-18" => 10.04, "6-20-18" => 20.08, "6-30-18" => 30.12, "6-50-18" => 50.15, "6-100-18" => 100.3, "6-200-18" => 200.6, "6-300-18" => 300.9, "6-500-18" => 501.5,//湖南 18
         "6-10-15" => 10.21, "6-20-15" => 20.22, "6-30-15" => 30.231, "6-50-15" => 50.25, "6-100-15" => 100.3, "6-200-15" => 200.3, "6-300-15" => 300.45, "6-500-15" => 500.75,//山东 15

+ 8 - 0
helper/refill/api/yl/qianqian_fs/config.php

@@ -126,6 +126,13 @@ class config
                 100 => 'CTCCQIONGr100r',
                 200 => 'CTCCQIONGr200r',
             ],
+            //广西
+            20 => [
+                30  => 'CTCCGXr30r',
+                50  => 'CTCCGXr50r',
+                100 => 'CTCCGXr100r',
+                200 => 'CTCCGXr200r',
+            ],
         ]
     ];
 
@@ -169,5 +176,6 @@ class config
         "6-30-11" => 28.65, "6-50-11" => 47.75, "6-100-11" => 95.5, "6-200-11" => 191,//浙江 11
         "6-30-31" => 28.8, "6-50-31" => 48, "6-100-31" => 96, "6-200-31" => 192,//新疆 31
         "6-30-21" => 28.65, "6-50-21" => 47.75, "6-100-21" => 95.5, "6-200-21" => 191,//海南 21
+        "6-30-20" => 28.5, "6-50-20" => 47.5, "6-100-20" => 95, "6-200-20" => 190,//广西 20
     ];
 }

+ 7 - 0
helper/refill/api/yl/youhe_fs/config.php

@@ -70,6 +70,12 @@ class config
                 100 => 1450100,
                 200 => 1450200,
             ],
+            //湖北
+            17 => [
+                50  => 1420050,
+                100 => 1420100,
+                200 => 1420200,
+            ],
         ],
         mtopcard\ChinaTelecomCard => [
             //山东
@@ -119,6 +125,7 @@ class config
         "4-30-16" => 28.05, "4-50-16" => 47.25, "4-100-16" => 94.5, "4-200-16" => 189,//河南 16
         "4-30-25" => 28.05, "4-50-25" => 47.25, "4-100-25" => 94.5, "4-200-25" => 189,//云南 25
         "4-30-20" => 28.05, "4-50-20" => 47.25, "4-100-20" => 94.5, "4-200-20" => 189,//广西 20
+        "4-50-17" => 47.25, "4-100-17" => 94.5, "4-200-17" => 189,//湖北 17
 
         //电信
         "6-30-15" => 28.05, "6-50-15" => 48, "6-100-15" => 96, "6-200-15" => 192,//山东 15

+ 5 - 0
mobile/callback/refill_bingguang.php

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

+ 35 - 0
mobile/callback/refill_huiyuan.php

@@ -0,0 +1,35 @@
+<?php
+
+$content = $_SERVER['QUERY_STRING'];
+
+$squery = urldecode($content);
+$squery = mb_convert_encoding($squery, "UTF-8", "GB2312");
+
+$input = [];
+$params = preg_split('/&/', $squery);
+foreach ($params as $pair)
+{
+    if(empty($pair)) continue;
+
+    $kv = explode('=', $pair);
+    $count = count($kv);
+    if($count === 1) {
+        $key = $kv[0];
+        $val = "";
+    }
+    elseif($count === 2) {
+        $key = $kv[0];
+        $val = urldecode($kv[1]);
+    }
+    else {
+        continue;
+    }
+
+    if(!empty($key)) {
+        $input[$key] = $val;
+    }
+}
+
+refill\util::push_notify('huiyuan',$input);
+
+echo 'OK';

+ 8 - 0
mobile/callback/refill_jiuyi_yin.php

@@ -0,0 +1,8 @@
+<?php
+$content = $_SERVER['post_content'];
+$input = json_decode($content,true);
+refill\util::push_notify('jiuyi_yin',$input);
+
+$response = ["code" => "0"];
+$body = json_encode($response);
+echo($body);

+ 4 - 0
mobile/callback/refill_zhongst_oil.php

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

+ 2 - 0
mobile/signature.php

@@ -11,10 +11,12 @@ $sign = $_SERVER['HTTP_SIGN'];
 $addr = $_SERVER['REMOTE_ADDR'];
 $content = $_SERVER['post_content'];
 $xmldata=file_get_contents("php://input");
+$squery = $_SERVER['QUERY_STRING'];
 
 Log::record("request ip:{$addr}",Log::DEBUG);
 Log::record("signature data : {$data}",Log::DEBUG);
 Log::record("content data : {$content}",Log::DEBUG);
+Log::record("query_string data : {$squery}",Log::DEBUG);
 Log::record("HTTP_SIGN : {$sign}",Log::DEBUG);
 Log::record("XML_DATA : {$xmldata}",Log::DEBUG);
 echo ('SUCCESS');

+ 12 - 1
test/TestRefill.php

@@ -3271,7 +3271,6 @@ class TestRefill extends TestCase
 //        $resp = $provider->query(['order_sn' => '25551683853847719519']);
 
         $content = 'agent_id=2145738&bill_id=25551683853847719519&jnet_bill_no=C230512588496314&par_price=10.0000&purchase_amt=10.3600&bill_charge_time=20230512092120&bill_status=%B3%C9%B9%A6&bill_data_info=C230512588496314%3a1&sign=b0c81c3b9b1ce25ed76299069df4be82';
-        $content = urldecode($content);
         $params = $provider->decode_tag($content);
         $provider = $this->getProvider('huiyuan', 'RefillCallBack');
         $ret = $provider->verify($params);
@@ -3378,6 +3377,18 @@ class TestRefill extends TestCase
         $body = '{"msg":"FAIL","amount":"10000","orderId":"49611683682698964856","phone":"1000111100021211884","voucher":"","appid":"wp1680594711360","sign":"dbb5446b01a209330da268b4b51765eb","time":"20230510103433","status":3}';
         $params = json_decode($body, true);
         $provider = $this->getProvider('quanzhen', 'RefillCallBack');
+    }
+
+    public function testZhongst_oil()
+    {
+//        $provider = $this->getProvider('zhongst_oil', 'RefillOil');
+//        $resp = $provider->balance();
+//        $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
+//        $resp = $provider->query(['order_sn' => '47761683793213899415']);
+
+        $body = '{"szOrderId":"47761683793213899415","fSalePrice":"100.3","szAgentId":"200072","nFlag":"3","szVerifyString":"486394ca15e8b50a96f4a3f5fdfe4554","szPhoneNum":"1000111100021211884","szRtnMsg":"","nDemo":"100"}';
+        $params = json_decode($body, true);
+        $provider = $this->getProvider('zhongst_oil', 'RefillCallBack');
         $ret = $provider->verify($params);
         $resp = $provider->notify($params);