Bläddra i källkod

Merge branch 'raccount' of 39.97.239.116:gyfl/xyzshop into raccount

stanley-king 1 år sedan
förälder
incheckning
64527ebb5b
35 ändrade filer med 952 tillägg och 35 borttagningar
  1. 59 5
      admin/control/ordersendlist.php
  2. 11 0
      admin/templates/default/refill.order.exception.php
  3. 12 5
      data/config/xyz/refill.ini.php
  4. 78 18
      data/config/zy/refill.ini.php
  5. 23 0
      data/model/refill_exception.model.php
  6. 14 0
      helper/refill/api/xyz/bier_fs/config.php
  7. 15 0
      helper/refill/api/xyz/bier_fs/椰子.txt
  8. 2 0
      helper/refill/api/xyz/dezhi_fs/config.php
  9. 39 0
      helper/refill/api/xyz/feihan_fetch/RefillCallBack.php
  10. 61 0
      helper/refill/api/xyz/feihan_fetch/RefillPhone.php
  11. 20 0
      helper/refill/api/xyz/feihan_fetch/config.php
  12. BIN
      helper/refill/api/xyz/guochuang/20230619辽宁广东移动调价函.jpg
  13. 2 2
      helper/refill/api/xyz/guochuang/config.php
  14. 10 0
      helper/refill/api/xyz/jinfeng_fs/api.txt
  15. 7 0
      helper/refill/api/xyz/jinfeng_fs/config.php
  16. 1 1
      helper/refill/api/xyz/meixu/config.php
  17. 4 1
      helper/refill/api/xyz/meixu/对接文档-yezi.txt
  18. 15 0
      helper/refill/api/xyz/qianqian_fs/api.txt
  19. 14 0
      helper/refill/api/xyz/qianqian_fs/config.php
  20. 4 1
      helper/refill/api/xyz/zhongst_oil/RefillCallBack.php
  21. 14 0
      helper/refill/api/yl/bier_fs/config.php
  22. 2 0
      helper/refill/api/yl/dezhi_fs/config.php
  23. 2 2
      helper/refill/api/yl/guochuang/config.php
  24. 7 0
      helper/refill/api/yl/jinfeng_fs/config.php
  25. 14 0
      helper/refill/api/yl/qianqian_fs/config.php
  26. 76 0
      helper/refill/api/zy/blueciyuefeiy/RefillCallBack.php
  27. 161 0
      helper/refill/api/zy/blueciyuefeiy/RefillPhone.php
  28. 7 0
      helper/refill/api/zy/blueciyuefeiy/api.txt
  29. 13 0
      helper/refill/api/zy/blueciyuefeiy/config.php
  30. 76 0
      helper/refill/api/zy/wangxinnoy/RefillCallBack.php
  31. 161 0
      helper/refill/api/zy/wangxinnoy/RefillPhone.php
  32. 7 0
      helper/refill/api/zy/wangxinnoy/api.txt
  33. 13 0
      helper/refill/api/zy/wangxinnoy/config.php
  34. 4 0
      mobile/callback/refill_blueciyuefeiy.php
  35. 4 0
      mobile/callback/refill_wangxinnoy.php

+ 59 - 5
admin/control/ordersendlist.php

@@ -427,10 +427,9 @@ class ordersendlistControl extends SystemControl
     private function RefillOrderExport($cond, $method_name = '', $type='order')
     {
         $result = [];
-        if($type == 'order') {
+        if ($type == 'order') {
             $result = Model('refill_order')->getAllOrders($cond);
-
-        }elseif($type == 'time_out_order'){
+        } elseif ($type == 'time_out_order') {
             $result = Model('refill_order')->getAllTimeOutOrders($cond);
         }
         $this->createExcel($result, $method_name);
@@ -455,7 +454,7 @@ class ordersendlistControl extends SystemControl
         $excel_data[0][] = array('styleid' => 's_title', 'data' => '完成日期');
         $excel_data[0][] = array('styleid' => 's_title', 'data' => '官方流水号');
         $excel_data[0][] = array('styleid' => 's_title', 'data' => '订单状态');
-//        $excel_data[0][] = array('styleid' => 's_title', 'data' => '扣款金额');
+
         //data
         foreach ((array)$data as $v) {
             $tmp = array();
@@ -474,7 +473,6 @@ class ordersendlistControl extends SystemControl
 
             $tmp[] = array('data' => $v['official_sn']);
             $tmp[] = array('data' => orderState($v));
-//            $tmp[] = array('data' => $v['mch_amount']);
             $excel_data[] = $tmp;
         }
         $excel_data = $excel_obj->charset($excel_data, CHARSET);
@@ -728,6 +726,7 @@ class ordersendlistControl extends SystemControl
     {
         $mod_except = Model('refill_exception');
         $_GET['except_state'] = $_GET['except_state'] ?? 0;
+        $cond = [];
         if (!empty($_GET['order_sns'])) {
             $order_sns = rtrim($_GET['order_sns'],',');
             $cond['refill_exception.order_sn'] = ['in', $order_sns];
@@ -752,6 +751,11 @@ class ordersendlistControl extends SystemControl
             $cond['order_time'] = ['lt', $end_unixtime];
         }
 
+        if (!empty($_GET['export'])) {
+            $this->exception_order_export($cond);
+            return;
+        }
+
         $list = $mod_except->getExceptionList($cond, 200, 0, 'refill_exception.*,refill_order.order_time,refill_order.card_no');
 
         $merchant_list = $this->merchants();
@@ -870,4 +874,54 @@ class ordersendlistControl extends SystemControl
         Tpl::output('show_page', $mod->showpage());
         Tpl::showpage('refill.query.err');
     }
+
+    private function exception_order_export($cond)
+    {
+        $data = Model('refill_exception')->getAllExceptionOrders($cond);
+        $merchants = [];
+        $merchant_list = $this->merchants();
+        foreach ($merchant_list as  $value) {
+            $merchants[$value['mchid']] = $value;
+        }
+
+        Language::read('export');
+        import('libraries.excel');
+        $excel_obj = new Excel();
+        $excel_data = array();
+        //设置样式
+        $excel_obj->setStyle(array('id' => 's_title', 'Font' => array('FontName' => '宋体', 'Size' => '12', 'Bold' => '1')));
+        //header
+        $excel_data[0][] = array('styleid' => 's_title', 'data' => '机构编号');
+        $excel_data[0][] = array('styleid' => 's_title', 'data' => '机构名称');
+        $excel_data[0][] = array('styleid' => 's_title', 'data' => '通道名称');
+        $excel_data[0][] = array('styleid' => 's_title', 'data' => '订单号');
+        $excel_data[0][] = array('styleid' => 's_title', 'data' => '异常事件');
+        $excel_data[0][] = array('styleid' => 's_title', 'data' => '异常信息');
+        $excel_data[0][] = array('styleid' => 's_title', 'data' => '异常记录日期');
+        $excel_data[0][] = array('styleid' => 's_title', 'data' => '异常状态');
+        $excel_data[0][] = array('styleid' => 's_title', 'data' => '处理人');
+
+        //data
+        foreach ((array)$data as $v) {
+            $tmp = array();
+            $tmp[] = array('data' => $v['mchid']);
+            $tmp[] = array('data' => $merchants[$v['mchid']]['company_name']);
+            $tmp[] = array('data' => $v['store_name']);
+            $tmp[] = array('data' => $v['order_sn']);
+            $tmp[] = array('data' => $v['title']);
+            $tmp[] = array('data' => $v['except_desc']);
+            $tmp[] = array('data' => date('Y-m-d H:i:s', $v['add_time']));
+            if (empty($v['except_state'])) {
+                $tmp[] = array('data' => '未处理');
+            } else {
+                $tmp[] = array('data' => '已处理');
+            }
+            $tmp[] = array('data' => $v['admin_name']);
+            $excel_data[] = $tmp;
+        }
+        $excel_data = $excel_obj->charset($excel_data, CHARSET);
+        $excel_obj->addArray($excel_data);
+        $excel_obj->addWorksheet($excel_obj->charset(L('exp_od_order'), CHARSET));
+        $excel_obj->generateXML('异常订单导出-' . date('Y-m-d-H', time()));
+    }
 }

+ 11 - 0
admin/templates/default/refill.order.exception.php

@@ -106,6 +106,7 @@
     <form method="get" action="index.php" name="formSearch" id="formSearch">
         <input type="hidden" name="act" value="ordersendlist" />
         <input type="hidden" name="op" value="order_exception" />
+        <input type="hidden" name="export" value=""/>
         <table class="tb-type1 noborder search">
             <tr>
                 <th><label class="query_ors">订单号(多行查询)</label></th>
@@ -159,6 +160,9 @@
                     <a href="#" class="btns" id="hHandled">
                         <span><i class="icon-edit"></i>批量标记为已处理</span>
                     </a>
+                    <a href="javascript:void(0);" id="ncexport" class="btns" style="margin: 0 59px;">
+                        <span><i class="icon-edit"></i>导出Excel</span>
+                    </a>
                 </td>
             </tr>
         </table>
@@ -304,6 +308,13 @@
             });
         })
 
+        // 导出
+        $('#ncexport').click(function () {
+            $('input[name="export"]').val('1');
+            $('#formSearch').submit();
+            $('input[name="export"]').val('');
+        })
+
 
         // 表格hover时背景
         $('.trFlex').each(function() {

+ 12 - 5
data/config/xyz/refill.ini.php

@@ -9027,23 +9027,23 @@ $tianchen_sec_phone = ['name' => 'tianchen_sec', 'store_id' => 330, 'qualitys' =
 //            ['goods_id' => 8686, 'price' => 30.135, 'quality' => 2, 'card_type' => 'chinatelecom']
 //        ],
         50 => [
-//            ['goods_id' => 8687, 'price' => 50.175, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 8687, 'price' => 50.075, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8687, 'price' => 50.25, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 8687, 'price' => 50.125, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 8687, 'price' => 50.3, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 8688, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 8688, 'price' => 100.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8688, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 8688, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 8689, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 8689, 'price' => 200.3, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8689, 'price' => 200.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 8689, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
             ['goods_id' => 8690, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 8690, 'price' => 300.45, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8690, 'price' => 300.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 8690, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
@@ -9550,6 +9550,12 @@ $tongka_fetch = ['name' => 'tongka_fetch', 'store_id' => 343, 'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$feihan_fetch = ['name' => 'feihan_fetch', 'store_id' => 344, 'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 8751, 'price' => 99, 'quality' => 1, 'card_type' => 'third']],
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $third_providers = [
     ['name' => 'lingzhthird', 'cfg' => $lingzhthird],
     ['name' => 'jumithird', 'cfg' => $jumithird],
@@ -9575,6 +9581,7 @@ $third_providers = [
     ['name' => 'shuzishijie', 'cfg' => $shuzishijie],
     ['name' => 'piaoyi_oil', 'cfg' => $piaoyi_oil],
     ['name' => 'tongka_fetch', 'cfg' => $tongka_fetch],
+    ['name' => 'feihan_fetch', 'cfg' => $feihan_fetch],
 ];
 $config['third_providers'] = $third_providers;
 

+ 78 - 18
data/config/zy/refill.ini.php

@@ -14,13 +14,13 @@ $config['refill_specs'] = [
     'chinatelecom' => $config['refill_phone_specs']
 ];
 
-$ruidongsoil_oil = ['name' => 'ruidongsoil', 'store_id' => 15, 'qualitys' => '2',
+$ruidongsoil_oil = ['name' => 'ruidongsoil', 'store_id' => 15, 'qualitys' => '5',
     'amount' => [
-        50 => [['goods_id' => 6463, 'price' => 50, 'quality' => 2, 'card_type' => 'petrochina,sinopec']],
-        100 => [['goods_id' => 6464, 'price' => 100, 'quality' => 2, 'card_type' => 'petrochina,sinopec']],
-        200 => [['goods_id' => 6465, 'price' => 200, 'quality' => 2, 'card_type' => 'petrochina,sinopec']],
-        500 => [['goods_id' => 6466, 'price' => 500, 'quality' => 2, 'card_type' => 'petrochina,sinopec']],
-        1000 => [['goods_id' => 6467, 'price' => 1000, 'quality' => 2, 'card_type' => 'petrochina,sinopec']]
+        50 => [['goods_id' => 6463, 'price' => 50, 'quality' => 5, 'card_type' => 'petrochina,sinopec']],
+        100 => [['goods_id' => 6464, 'price' => 100, 'quality' => 5, 'card_type' => 'petrochina,sinopec']],
+        200 => [['goods_id' => 6465, 'price' => 200, 'quality' => 5, 'card_type' => 'petrochina,sinopec']],
+        500 => [['goods_id' => 6466, 'price' => 500, 'quality' => 5, 'card_type' => 'petrochina,sinopec']],
+        1000 => [['goods_id' => 6467, 'price' => 1000, 'quality' => 5, 'card_type' => 'petrochina,sinopec']]
     ],
     'refill_type' => 'api'];
 
@@ -34,23 +34,23 @@ $chewshioil_oil = ['name' => 'chewshioil', 'store_id' => 18, 'qualitys' => '5',
     ],
     'refill_type' => 'api'];
 
-$shenzhouoil_oil = ['name' => 'shenzhouoil', 'store_id' => 19, 'qualitys' => '2',
+$shenzhouoil_oil = ['name' => 'shenzhouoil', 'store_id' => 19, 'qualitys' => '5',
     'amount' => [
-        50 => [['goods_id' => 6489, 'price' => 50, 'quality' => 2, 'card_type' => 'petrochina,sinopec']],
-        100 => [['goods_id' => 6490, 'price' => 100, 'quality' => 2, 'card_type' => 'petrochina,sinopec']],
-        200 => [['goods_id' => 6491, 'price' => 200, 'quality' => 2, 'card_type' => 'petrochina,sinopec']],
-        500 => [['goods_id' => 6492, 'price' => 500, 'quality' => 2, 'card_type' => 'petrochina,sinopec']],
-        1000 => [['goods_id' => 6493, 'price' => 1000, 'quality' => 2, 'card_type' => 'petrochina,sinopec']]
+        50 => [['goods_id' => 6489, 'price' => 50, 'quality' => 5, 'card_type' => 'petrochina,sinopec']],
+        100 => [['goods_id' => 6490, 'price' => 100, 'quality' => 5, 'card_type' => 'petrochina,sinopec']],
+        200 => [['goods_id' => 6491, 'price' => 200, 'quality' => 5, 'card_type' => 'petrochina,sinopec']],
+        500 => [['goods_id' => 6492, 'price' => 500, 'quality' => 5, 'card_type' => 'petrochina,sinopec']],
+        1000 => [['goods_id' => 6493, 'price' => 1000, 'quality' => 5, 'card_type' => 'petrochina,sinopec']]
     ],
     'refill_type' => 'api'];
 
-$oillanse_oil = ['name' => 'oillanse', 'store_id' => 65, 'qualitys' => '2',
+$oillanse_oil = ['name' => 'oillanse', 'store_id' => 65, 'qualitys' => '5',
     'amount' => [
-        50 => [['goods_id' => 6799, 'price' => 50, 'quality' => 2, 'card_type' => 'petrochina,sinopec']],
-        100 => [['goods_id' => 6800, 'price' => 100, 'quality' => 2, 'card_type' => 'petrochina,sinopec']],
-        200 => [['goods_id' => 6801, 'price' => 200, 'quality' => 2, 'card_type' => 'petrochina,sinopec']],
-        500 => [['goods_id' => 6802, 'price' => 500, 'quality' => 2, 'card_type' => 'petrochina,sinopec']],
-        1000 => [['goods_id' => 6803, 'price' => 1000, 'quality' => 2, 'card_type' => 'petrochina,sinopec']]
+        50 => [['goods_id' => 6799, 'price' => 50, 'quality' => 5, 'card_type' => 'petrochina,sinopec']],
+        100 => [['goods_id' => 6800, 'price' => 100, 'quality' => 5, 'card_type' => 'petrochina,sinopec']],
+        200 => [['goods_id' => 6801, 'price' => 200, 'quality' => 5, 'card_type' => 'petrochina,sinopec']],
+        500 => [['goods_id' => 6802, 'price' => 500, 'quality' => 5, 'card_type' => 'petrochina,sinopec']],
+        1000 => [['goods_id' => 6803, 'price' => 1000, 'quality' => 5, 'card_type' => 'petrochina,sinopec']]
     ],
     'refill_type' => 'api'];
 
@@ -1570,6 +1570,64 @@ $by_online_kami_cb_phone = ['name' => 'by_online_kami_cb', 'store_id' => 68, 'qu
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$blueciyuefeiy_phone = ['name' => 'blueciyuefeiy', 'store_id' => 70, 'qualitys' => '2',
+    'amount' => [
+        10 => [
+            ['goods_id' => 6822, 'price' => 10, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        20 => [
+            ['goods_id' => 6823, 'price' => 20, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        30 => [
+            ['goods_id' => 6824, 'price' => 30, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        50 => [
+            ['goods_id' => 6825, 'price' => 50, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        100 => [
+            ['goods_id' => 6826, 'price' => 100, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        200 => [
+            ['goods_id' => 6827, 'price' => 200, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        300 => [
+            ['goods_id' => 6828, 'price' => 300, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        500 => [
+            ['goods_id' => 6829, 'price' => 500, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$wangxinnoy_phone = ['name' => 'wangxinnoy', 'store_id' => 71, 'qualitys' => '2',
+    'amount' => [
+        10 => [
+            ['goods_id' => 6830, 'price' => 10, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        20 => [
+            ['goods_id' => 6831, 'price' => 20, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        30 => [
+            ['goods_id' => 6832, 'price' => 30, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        50 => [
+            ['goods_id' => 6833, 'price' => 50, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        100 => [
+            ['goods_id' => 6834, 'price' => 100, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        200 => [
+            ['goods_id' => 6835, 'price' => 200, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        300 => [
+            ['goods_id' => 6836, 'price' => 300, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        500 => [
+            ['goods_id' => 6837, 'price' => 500, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
     ['name' => 'yezi_hf', 'cfg' => $yezi_hf_phone],
     ['name' => 'yezia', 'cfg' => $yezia_phone],
@@ -1623,6 +1681,8 @@ $phone_providers = [
     ['name' => 'hongtai_fy', 'cfg' => $hongtai_fy_phone],
     ['name' => 'by_online_cb', 'cfg' => $by_online_cb_phone],
     ['name' => 'by_online_kami_cb', 'cfg' => $by_online_kami_cb_phone],
+    ['name' => 'blueciyuefeiy', 'cfg' => $blueciyuefeiy_phone],
+    ['name' => 'wangxinnoy', 'cfg' => $wangxinnoy_phone],
 
 ];
 

+ 23 - 0
data/model/refill_exception.model.php

@@ -44,4 +44,27 @@ class refill_exceptionModel extends Model
         $item = $this->field('*')->where(['order_sn' => $order_sn])->find();
         return !empty($item);
     }
+
+    public function getAllExceptionOrders($condition)
+    {
+        $len = 1000;
+
+        $i = 0;
+        $orders = [];
+        while (true)
+        {
+            $start = $i * $len;
+            $items = $this->table('refill_exception')
+                ->where($condition)
+                ->order('oper_time desc')
+                ->limit("{$start},{$len}")
+                ->select();
+            $orders = array_merge($orders,$items);
+            if (empty($items) || count($items) < $len) {
+                break;
+            }
+            $i++;
+        }
+        return $orders;
+    }
 }

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

@@ -92,6 +92,18 @@ class config
                 100 => 'CMCCLNr100r',
                 200 => 'CMCCLNr200r',
             ],
+            //甘肃
+            28 => [
+                50  => 'CMCCGSr50r',
+                100 => 'CMCCGSr100r',
+                200 => 'CMCCGSr200r',
+            ],
+            //黑龙江
+            8 => [
+                50  => 'CMCCHLJr50r',
+                100 => 'CMCCHLJr100r',
+                200 => 'CMCCHLJr200r',
+            ],
         ],
         mtopcard\ChinaTelecomCard => [
             //四川
@@ -205,6 +217,8 @@ class config
         "4-50-14" => 47.75, "4-100-14" => 95.5, "4-200-14" => 191,//江西 14
         "4-50-17" => 47.75, "4-100-17" => 95.5, "4-200-17" => 191,//湖北 17
         "4-50-6" => 47.75, "4-100-6" => 95.5, "4-200-6" => 191,//辽宁 6
+        "4-50-28" => 47.75, "4-100-28" => 95.5, "4-200-28" => 191,//甘肃 28
+        "4-50-8" => 47.75, "4-100-8" => 95.5, "4-200-8" => 191,//黑龙江 8
 
         "6-30-23" => 28.65, "6-50-23" => 47.75, "6-100-23" => 95.5, "6-200-23" => 191,//四川 23
         "6-30-15" => 28.65, "6-50-15" => 47.75, "6-100-15" => 95.5, "6-200-15" => 191,//山东 15

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

@@ -217,3 +217,18 @@ CTCCHBr30r
 CTCCHBr50r
 CTCCHBr100r
 CTCCHBr200r
+
+2023.6.19
+比尔甘肃 黑龙江移动调价
+
+甘肃移动产品编码:
+
+CMCCGSr50r
+CMCCGSr100r
+CMCCGSr200r
+
+黑龙江移动产品编码:
+
+CMCCHLJr50r
+CMCCHLJr100r
+CMCCHLJr200r

+ 2 - 0
helper/refill/api/xyz/dezhi_fs/config.php

@@ -41,6 +41,8 @@ class config
         "4-30-19" => 28.65, "4-50-19" => 47.75, "4-100-19" => 95.5, "4-200-19" => 191,//广东 19
         "4-30-31" => 28.2, "4-50-31" => 47, "4-100-31" => 94, "4-200-31" => 188,//新疆 31
         "4-30-6" => 27.96, "4-50-6" => 46.6, "4-100-6" => 93.2, "4-200-6" => 186.4,//辽宁 6
+        "4-30-28" => 28.05, "4-50-28" => 46.75, "4-100-28" => 93.5, "4-200-28" => 187,//甘肃 28
+        "4-30-8" => 28.2, "4-50-8" => 47, "4-100-8" => 94, "4-200-8" => 188,//黑龙江 8
 
         //电信
         "6-30-19" => 28.2, "6-50-19" => 47, "6-100-19" => 94, "6-200-19" => 188,//广东 19

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

@@ -0,0 +1,39 @@
+<?php
+
+
+namespace refill\feihan_fetch;
+
+require_once(BASE_HELPER_RAPI_PATH . '/feihan_fetch/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];
+        }
+    }
+}

+ 61 - 0
helper/refill/api/xyz/feihan_fetch/RefillPhone.php

@@ -0,0 +1,61 @@
+<?php
+
+namespace refill\feihan_fetch;
+
+require_once(BASE_HELPER_RAPI_PATH . '/feihan_fetch/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillThird
+{
+    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/feihan_fetch/config.php

@@ -0,0 +1,20 @@
+<?php
+
+
+namespace refill\feihan_fetch;
+
+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_baidu.php";
+    const operator = [
+        mtopcard\ChinaMobileCard  => 2,
+        mtopcard\ChinaUnicomCard  => 1,
+        mtopcard\ChinaTelecomCard => 3
+    ];
+}

BIN
helper/refill/api/xyz/guochuang/20230619辽宁广东移动调价函.jpg


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

@@ -64,7 +64,7 @@ class config
     const Price = [
         //移动
         "4-10-2" => 10.18, "4-20-2" => 20.36, "4-30-2" => 30.18, "4-50-2" => 50.3, "4-100-2" => 100.3, "4-200-2" => 200.6, "4-300-2" => 300.9, "4-500-2" => 501.5,//天津 2
-        "4-10-6" => 9.725, "4-20-6" => 19.45, "4-30-6" => 29.175, "4-50-6" => 48.625, "4-100-6" => 97.25, "4-200-6" => 194.5, "4-300-6" => 291.75, "4-500-6" => 486.25,//辽宁 6
+        "4-10-6" => 9.738, "4-20-6" => 19.476, "4-30-6" => 29.214, "4-50-6" => 48.69, "4-100-6" => 97.38, "4-200-6" => 194.76, "4-300-6" => 292.14, "4-500-6" => 486.9,//辽宁 6
         "4-10-9" => 9.94, "4-20-9" => 19.88, "4-30-9" => 29.82, "4-50-9" => 49.7, "4-100-9" => 99.4,//上海 9
         "4-10-8" => 9.98, "4-20-8" => 19.96, "4-30-8" => 29.94, "4-50-8" => 49.9, "4-100-8" => 99.8, "4-200-8" => 199.6, "4-300-8" => 299.4, "4-500-8" => 499,//黑龙江 8
         "4-10-29" => 9.88, "4-20-29" => 19.76, "4-30-29" => 29.64, "4-50-29" => 49.4, "4-100-29" => 98.8, "4-200-29" => 197.6, "4-300-29" => 296.4, "4-500-29" => 494,//青海 29
@@ -72,7 +72,7 @@ class config
         "4-10-13" => 10.01, "4-20-13" => 20.02, "4-30-13" => 30.03, "4-50-13" => 50.05, "4-100-13" => 100.1, "4-200-13" => 200.2, "4-300-13" => 300.3, "4-500-13" => 500.5,//福建 13
         "4-10-5" => 10.035, "4-20-5" => 20.07, "4-30-5" => 30.09, "4-50-5" => 50.15, "4-100-5" => 100.3, "4-200-5" => 200.4, "4-300-5" => 300.6, "4-500-5" => 501,//内蒙古 5
         "4-30-18" => 29.835, "4-50-18" => 49.725, "4-100-18" => 99.45, "4-200-18" => 198.3,//湖南 18
-        "4-10-19" => 10.005, "4-20-19" => 20.1, "4-30-19" => 29.985, "4-50-19" => 49.975, "4-100-19" => 99.95, "4-200-19" => 199.9, "4-300-19" => 299.85, "4-500-19" => 499.75,//广东 19
+        "4-10-19" => 10.005, "4-20-19" => 20.1, "4-30-19" => 29.994, "4-50-19" => 49.99, "4-100-19" => 99.98, "4-200-19" => 199.96, "4-300-19" => 299.94, "4-500-19" => 499.9,//广东 19
         "4-10-7" => 9.93, "4-20-7" => 19.86, "4-30-7" => 29.52, "4-50-7" => 49.2, "4-100-7" => 98.4, "4-200-7" => 196.8, "4-300-7" => 295.2, "4-500-7" => 492,//吉林 7
         "4-10-1" => 10.31, "4-20-1" => 20.32, "4-30-1" => 30.33, "4-50-1" => 50.35, "4-100-1" => 100.4, "4-200-1" => 200.3, "4-300-1" => 300.45, "4-500-1" => 500.75,//北京 1
         "4-10-22" => 10.015, "4-20-22" => 20.03, "4-30-22" => 30.045, "4-50-22" => 50.075, "4-100-22" => 100.15, "4-200-22" => 200.3, "4-300-22" => 300.45, "4-500-22" => 500.75,//重庆 22

+ 10 - 0
helper/refill/api/xyz/jinfeng_fs/api.txt

@@ -73,3 +73,13 @@ CMCCYUr200r
 CMCCGXr50r
 CMCCGXr100r
 CMCCGXr200r
+
+
+2023.6.19
+金丰湖北移动调价
+
+湖北移动产品编码:
+
+CMCCHBr50r
+CMCCHBr100r
+CMCCHBr200r

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

@@ -40,6 +40,12 @@ class config
             20 => [
                 50  => 'CMCCGXr50r', 100 => 'CMCCGXr100r', 200 => 'CMCCGXr200r',
             ],//广西
+            //湖北
+            17 => [
+                50  => 'CMCCHBr50r',
+                100 => 'CMCCHBr100r',
+                200 => 'CMCCHBr200r',
+            ],
         ],
         mtopcard\ChinaUnicomCard => [
 
@@ -70,6 +76,7 @@ class config
         "4-50-25" => 48, "4-100-25" => 96, "4-200-25" => 192,//云南 25
         "4-50-16" => 48, "4-100-16" => 96, "4-200-16" => 192,//河南 16
         "4-50-20" => 48, "4-100-20" => 96, "4-200-20" => 192,//广西 20
+        "4-50-17" => 47.75, "4-100-17" => 95.5, "4-200-17" => 191,//湖北 17
 
         //电信
         "6-30-19" => 28.5, "6-50-19" => 47.5, "6-100-19" => 95, "6-200-19" => 190,//广东 19

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

@@ -47,7 +47,7 @@ class config
             10 => 100017,
             20 => 100018,
             30 => 100019,
-            50 => 100020,
+            50 => 30000003445,
             100 => 100021,
             200 => 100022,
             300 => 100023,

+ 4 - 1
helper/refill/api/xyz/meixu/对接文档-yezi.txt

@@ -57,4 +57,7 @@
 100012 全国联通沃支付话费50元
 100013 全国联通沃支付话费100元
 100014 全国联通沃支付话费200元
-100015 全国联通沃支付话费300元
+100015 全国联通沃支付话费300元
+
+2023.6.20
+30000003445	全国电信电渠话费50元

+ 15 - 0
helper/refill/api/xyz/qianqian_fs/api.txt

@@ -216,3 +216,18 @@ CTCCHBr30r
 CTCCHBr50r
 CTCCHBr100r
 CTCCHBr200r
+
+2023.6.19
+比尔甘肃 黑龙江移动调价
+
+甘肃移动产品编码:
+
+CMCCGSr50r
+CMCCGSr100r
+CMCCGSr200r
+
+黑龙江移动产品编码:
+
+CMCCHLJr50r
+CMCCHLJr100r
+CMCCHLJr200r

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

@@ -68,6 +68,18 @@ class config
                 100 => 'CMCCLNr100r',
                 200 => 'CMCCLNr200r',
             ],
+            //甘肃
+            28 => [
+                50  => 'CMCCGSr50r',
+                100 => 'CMCCGSr100r',
+                200 => 'CMCCGSr200r',
+            ],
+            //黑龙江
+            8 => [
+                50  => 'CMCCHLJr50r',
+                100 => 'CMCCHLJr100r',
+                200 => 'CMCCHLJr200r',
+            ],
         ],
         mtopcard\ChinaUnicomCard => [
 
@@ -168,6 +180,8 @@ class config
         "4-50-14" => 47.75, "4-100-14" => 95.5, "4-200-14" => 191,//江西 14
         "4-50-17" => 47.75, "4-100-17" => 95.5, "4-200-17" => 191,//湖北 17
         "4-50-6" => 47.75, "4-100-6" => 95.5, "4-200-6" => 191,//辽宁 6
+        "4-50-28" => 47.75, "4-100-28" => 95.5, "4-200-28" => 191,//甘肃 28
+        "4-50-8" => 47.75, "4-100-8" => 95.5, "4-200-8" => 191,//黑龙江 8
 
         //电信
         "6-30-19" => 28.8, "6-50-19" => 48, "6-100-19" => 96, "6-200-19" => 192,//广东 19

+ 4 - 1
helper/refill/api/xyz/zhongst_oil/RefillCallBack.php

@@ -36,7 +36,10 @@ class RefillCallBack implements refill\IRefillCallBack
         $order_id = $order_info['order_id'];
 
         if ($status === 2) {
-            $data['official_sn'] = strtolower($params['szRtnMsg']) == 'null' ? '' : $params['szRtnMsg'];
+            $msg = strtolower($params['szRtnMsg']) == 'null' ? '' : $params['szRtnMsg'];
+            preg_match('/:\d+/', $msg, $matches);
+            $official_sn = ltrim($matches[0], ':');
+            $data['official_sn'] = $official_sn;
             Model('refill_order')->edit($order_id, $data);
             return [$order_id, true, false,true];
         }

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

@@ -92,6 +92,18 @@ class config
                 100 => 'CMCCLNr100r',
                 200 => 'CMCCLNr200r',
             ],
+            //甘肃
+            28 => [
+                50  => 'CMCCGSr50r',
+                100 => 'CMCCGSr100r',
+                200 => 'CMCCGSr200r',
+            ],
+            //黑龙江
+            8 => [
+                50  => 'CMCCHLJr50r',
+                100 => 'CMCCHLJr100r',
+                200 => 'CMCCHLJr200r',
+            ],
         ],
         mtopcard\ChinaTelecomCard => [
             //四川
@@ -205,6 +217,8 @@ class config
         "4-50-14" => 47.75, "4-100-14" => 95.5, "4-200-14" => 191,//江西 14
         "4-50-17" => 47.75, "4-100-17" => 95.5, "4-200-17" => 191,//湖北 17
         "4-50-6" => 47.75, "4-100-6" => 95.5, "4-200-6" => 191,//辽宁 6
+        "4-50-28" => 47.75, "4-100-28" => 95.5, "4-200-28" => 191,//甘肃 28
+        "4-50-8" => 47.75, "4-100-8" => 95.5, "4-200-8" => 191,//黑龙江 8
 
         "6-30-23" => 28.65, "6-50-23" => 47.75, "6-100-23" => 95.5, "6-200-23" => 191,//四川 23
         "6-30-15" => 28.65, "6-50-15" => 47.75, "6-100-15" => 95.5, "6-200-15" => 191,//山东 15

+ 2 - 0
helper/refill/api/yl/dezhi_fs/config.php

@@ -41,6 +41,8 @@ class config
         "4-30-19" => 28.65, "4-50-19" => 47.75, "4-100-19" => 95.5, "4-200-19" => 191,//广东 19
         "4-30-31" => 28.2, "4-50-31" => 47, "4-100-31" => 94, "4-200-31" => 188,//新疆 31
         "4-30-6" => 27.96, "4-50-6" => 46.6, "4-100-6" => 93.2, "4-200-6" => 186.4,//辽宁 6
+        "4-30-28" => 28.05, "4-50-28" => 46.75, "4-100-28" => 93.5, "4-200-28" => 187,//甘肃 28
+        "4-30-8" => 28.2, "4-50-8" => 47, "4-100-8" => 94, "4-200-8" => 188,//黑龙江 8
 
         //电信
         "6-30-19" => 28.2, "6-50-19" => 47, "6-100-19" => 94, "6-200-19" => 188,//广东 19

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

@@ -64,7 +64,7 @@ class config
     const Price = [
         //移动
         "4-10-2" => 10.18, "4-20-2" => 20.36, "4-30-2" => 30.18, "4-50-2" => 50.3, "4-100-2" => 100.3, "4-200-2" => 200.6, "4-300-2" => 300.9, "4-500-2" => 501.5,//天津 2
-        "4-10-6" => 9.725, "4-20-6" => 19.45, "4-30-6" => 29.175, "4-50-6" => 48.625, "4-100-6" => 97.25, "4-200-6" => 194.5, "4-300-6" => 291.75, "4-500-6" => 486.25,//辽宁 6
+        "4-10-6" => 9.738, "4-20-6" => 19.476, "4-30-6" => 29.214, "4-50-6" => 48.69, "4-100-6" => 97.38, "4-200-6" => 194.76, "4-300-6" => 292.14, "4-500-6" => 486.9,//辽宁 6
         "4-10-9" => 9.94, "4-20-9" => 19.88, "4-30-9" => 29.82, "4-50-9" => 49.7, "4-100-9" => 99.4,//上海 9
         "4-10-8" => 9.98, "4-20-8" => 19.96, "4-30-8" => 29.94, "4-50-8" => 49.9, "4-100-8" => 99.8, "4-200-8" => 199.6, "4-300-8" => 299.4, "4-500-8" => 499,//黑龙江 8
         "4-10-29" => 9.88, "4-20-29" => 19.76, "4-30-29" => 29.64, "4-50-29" => 49.4, "4-100-29" => 98.8, "4-200-29" => 197.6, "4-300-29" => 296.4, "4-500-29" => 494,//青海 29
@@ -72,7 +72,7 @@ class config
         "4-10-13" => 10.01, "4-20-13" => 20.02, "4-30-13" => 30.03, "4-50-13" => 50.05, "4-100-13" => 100.1, "4-200-13" => 200.2, "4-300-13" => 300.3, "4-500-13" => 500.5,//福建 13
         "4-10-5" => 10.035, "4-20-5" => 20.07, "4-30-5" => 30.09, "4-50-5" => 50.15, "4-100-5" => 100.3, "4-200-5" => 200.4, "4-300-5" => 300.6, "4-500-5" => 501,//内蒙古 5
         "4-30-18" => 29.835, "4-50-18" => 49.725, "4-100-18" => 99.45, "4-200-18" => 198.3,//湖南 18
-        "4-10-19" => 10.005, "4-20-19" => 20.1, "4-30-19" => 29.985, "4-50-19" => 49.975, "4-100-19" => 99.95, "4-200-19" => 199.9, "4-300-19" => 299.85, "4-500-19" => 499.75,//广东 19
+        "4-10-19" => 10.005, "4-20-19" => 20.1, "4-30-19" => 29.994, "4-50-19" => 49.99, "4-100-19" => 99.98, "4-200-19" => 199.96, "4-300-19" => 299.94, "4-500-19" => 499.9,//广东 19
         "4-10-7" => 9.93, "4-20-7" => 19.86, "4-30-7" => 29.52, "4-50-7" => 49.2, "4-100-7" => 98.4, "4-200-7" => 196.8, "4-300-7" => 295.2, "4-500-7" => 492,//吉林 7
         "4-10-1" => 10.31, "4-20-1" => 20.32, "4-30-1" => 30.33, "4-50-1" => 50.35, "4-100-1" => 100.4, "4-200-1" => 200.3, "4-300-1" => 300.45, "4-500-1" => 500.75,//北京 1
         "4-10-22" => 10.015, "4-20-22" => 20.03, "4-30-22" => 30.045, "4-50-22" => 50.075, "4-100-22" => 100.15, "4-200-22" => 200.3, "4-300-22" => 300.45, "4-500-22" => 500.75,//重庆 22

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

@@ -40,6 +40,12 @@ class config
             20 => [
                 50  => 'CMCCGXr50r', 100 => 'CMCCGXr100r', 200 => 'CMCCGXr200r',
             ],//广西
+            //湖北
+            17 => [
+                50  => 'CMCCHBr50r',
+                100 => 'CMCCHBr100r',
+                200 => 'CMCCHBr200r',
+            ],
         ],
         mtopcard\ChinaUnicomCard => [
 
@@ -70,6 +76,7 @@ class config
         "4-50-25" => 48, "4-100-25" => 96, "4-200-25" => 192,//云南 25
         "4-50-16" => 48, "4-100-16" => 96, "4-200-16" => 192,//河南 16
         "4-50-20" => 48, "4-100-20" => 96, "4-200-20" => 192,//广西 20
+        "4-50-17" => 47.75, "4-100-17" => 95.5, "4-200-17" => 191,//湖北 17
 
         //电信
         "6-30-19" => 28.5, "6-50-19" => 47.5, "6-100-19" => 95, "6-200-19" => 190,//广东 19

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

@@ -68,6 +68,18 @@ class config
                 100 => 'CMCCLNr100r',
                 200 => 'CMCCLNr200r',
             ],
+            //甘肃
+            28 => [
+                50  => 'CMCCGSr50r',
+                100 => 'CMCCGSr100r',
+                200 => 'CMCCGSr200r',
+            ],
+            //黑龙江
+            8 => [
+                50  => 'CMCCHLJr50r',
+                100 => 'CMCCHLJr100r',
+                200 => 'CMCCHLJr200r',
+            ],
         ],
         mtopcard\ChinaUnicomCard => [
 
@@ -168,6 +180,8 @@ class config
         "4-50-14" => 47.75, "4-100-14" => 95.5, "4-200-14" => 191,//江西 14
         "4-50-17" => 47.75, "4-100-17" => 95.5, "4-200-17" => 191,//湖北 17
         "4-50-6" => 47.75, "4-100-6" => 95.5, "4-200-6" => 191,//辽宁 6
+        "4-50-28" => 47.75, "4-100-28" => 95.5, "4-200-28" => 191,//甘肃 28
+        "4-50-8" => 47.75, "4-100-8" => 95.5, "4-200-8" => 191,//黑龙江 8
 
         //电信
         "6-30-19" => 28.8, "6-50-19" => 48, "6-100-19" => 96, "6-200-19" => 192,//广东 19

+ 76 - 0
helper/refill/api/zy/blueciyuefeiy/RefillCallBack.php

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

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

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

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

@@ -0,0 +1,7 @@
+https://admin.xyzshops.cn/merchant/#/login
+
+blueciyuefeiy
+hjx_yu3c
+
+10425
+7e703e5bd1a31c80d57c1c4dec1412b9

+ 13 - 0
helper/refill/api/zy/blueciyuefeiy/config.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace refill\blueciyuefeiy;
+
+class config
+{
+    const ORDER_URL = 'https://www.xyzshops.cn/mobile/index.php';
+
+    const MCH_ID = 10425;
+    const KEY = '7e703e5bd1a31c80d57c1c4dec1412b9';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_blueciyuefeiy.php";
+
+}

+ 76 - 0
helper/refill/api/zy/wangxinnoy/RefillCallBack.php

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

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

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

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

@@ -0,0 +1,7 @@
+https://admin.xyzshops.cn/merchant/#/login
+
+wangxinnoy
+du2k_klj2
+
+10426
+b266c2198063f45d704b41b74e6a0887

+ 13 - 0
helper/refill/api/zy/wangxinnoy/config.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace refill\wangxinnoy;
+
+class config
+{
+    const ORDER_URL = 'https://www.xyzshops.cn/mobile/index.php';
+
+    const MCH_ID = 10426;
+    const KEY = 'b266c2198063f45d704b41b74e6a0887';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_wangxinnoy.php";
+
+}

+ 4 - 0
mobile/callback/refill_blueciyuefeiy.php

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

+ 4 - 0
mobile/callback/refill_wangxinnoy.php

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