浏览代码

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

xiaoyu 3 年之前
父节点
当前提交
55495e5ed2
共有 30 个文件被更改,包括 1209 次插入71 次删除
  1. 1 1
      admin/control/merchant.php
  2. 2 2
      admin/templates/default/merchant.index.php
  3. 1 1
      admin/templates/default/provider.amount.control.php
  4. 17 12
      admin/templates/default/refill.order.index.php
  5. 83 16
      data/config/win/refill.ini.php
  6. 84 18
      data/config/xyz/refill.ini.php
  7. 83 16
      data/config/xyzadm/refill.ini.php
  8. 二进制
      helper/refill/api/xyz/guochuang/20210914广东移动调价函.jpg
  9. 二进制
      helper/refill/api/xyz/guochuang/20210915吉林移动调价函.png
  10. 2 2
      helper/refill/api/xyz/guochuang/config.php
  11. 34 0
      helper/refill/api/xyz/hangtong/RefillCallBack.php
  12. 136 0
      helper/refill/api/xyz/hangtong/RefillPhone.php
  13. 31 0
      helper/refill/api/xyz/hangtong/config.php
  14. 32 0
      helper/refill/api/xyz/hangtong/椰子.txt
  15. 159 0
      helper/refill/api/xyz/hangtong/话费充值接口v2.doc
  16. 34 0
      helper/refill/api/xyz/jinfeng/RefillCallBack.php
  17. 145 0
      helper/refill/api/xyz/jinfeng/RefillPhone.php
  18. 36 0
      helper/refill/api/xyz/jinfeng/config.php
  19. 32 0
      helper/refill/api/xyz/jinfeng/北京国研.txt
  20. 3 0
      helper/refill/api/xyz/jinfeng/话费充值接口v1.1.doc
  21. 1 0
      helper/refill/api/xyz/shimier/config.php
  22. 3 3
      helper/refill/api/xyz/tiancheng/config.php
  23. 50 0
      helper/refill/api/xyz/zhongst_mix/RefillCallBack.php
  24. 136 0
      helper/refill/api/xyz/zhongst_mix/RefillPhone.php
  25. 11 0
      helper/refill/api/xyz/zhongst_mix/api.txt
  26. 27 0
      helper/refill/api/xyz/zhongst_mix/config.php
  27. 10 0
      mobile/callback/refill_hangtong.php
  28. 10 0
      mobile/callback/refill_jinfeng.php
  29. 4 0
      mobile/callback/refill_zhongst_mix.php
  30. 42 0
      test/TestRefill.php

+ 1 - 1
admin/control/merchant.php

@@ -1012,7 +1012,7 @@ class merchantControl extends SystemControl
 //            var_dump($result);die;
 //            Log::record("provider amount data:".json_encode($result),Log::DEBUG);
             wcache($rkey, ['data' => serialize($result)], 'provider-');
-            showMessage('编辑成功', 'index.php?act=provider&op=index');
+            showMessage('编辑成功');
         } else {
             $speed_limit = rcache($rkey, 'provider-');
             if (empty($speed_limit)) {

+ 2 - 2
admin/templates/default/merchant.index.php

@@ -117,11 +117,11 @@ defined('InShopNC') or exit('Access Invalid!'); ?>
                             <a href="index.php?act=merchant&op=merchant_edit&mchid=<?php echo $v['mchid'] ?>">编辑</a>
                             <?php if($v['merchant_state'] == 1){?>
                                 |
-                                <a href="index.php?act=merchant&op=changeState&state=2&mchid=<?php echo $v['mchid'] ?>">关闭机构</a>
+                                <a href="index.php?act=merchant&op=changeState&state=2&mchid=<?php echo $v['mchid'] ?>" style="color: red">关闭机构</a>
                             <?php }?>
                             <?php if($v['merchant_state'] == 2){?>
                                 |
-                                <a href="index.php?act=merchant&op=changeState&state=1&mchid=<?php echo $v['mchid'] ?>">启用机构</a>
+                                <a href="index.php?act=merchant&op=changeState&state=1&mchid=<?php echo $v['mchid'] ?>" style="color: green">启用机构</a>
                             <?php }?>
                         </td>
 <!--                        <td class="align-center">-->

+ 1 - 1
admin/templates/default/provider.amount.control.php

@@ -211,7 +211,7 @@
             </tbody>
             <tfoot>
             <tr class="tfoot">
-                <td colspan="15"><a href="JavaScript:void(0);" class="btn" id="submitBtn"><span><?php echo $lang['nc_submit']; ?></span></a></td>
+                <td colspan="15"><a href="JavaScript:void(0);" class="btn" style="margin-top: 15px" id="submitBtn"><span><?php echo $lang['nc_submit']; ?></span></a></td>
             </tr>
             </tfoot>
         </table>

+ 17 - 12
admin/templates/default/refill.order.index.php

@@ -36,6 +36,11 @@
         max-height: 280px!important;
         padding: 14px 0!important;
     }
+    .layui-form-select .layui-input {
+    padding-right: 0!important;
+    cursor: pointer;
+    width: 124%;
+}
     .layui-form-select {
         width: 45%;
     }
@@ -44,7 +49,7 @@
     }
     .layui-form-select .layui-input {
     
-        padding-left: 11px;
+        padding-left: 4px;
     }
     .page .fixed-bar .item-title h3 {
         margin-top:18px !important;
@@ -70,16 +75,17 @@
     .layui-form-select dl dd {
     cursor: pointer;
     width: 130px;
-    
-
+    }
+    .layui-form-select .layui-edge {
+        right: -24px!important;
     }
     .db-right {
-        padding-right: 134px!important;
+    padding-right: 134px!important;
     border-bottom: 1px solid #ccc;
 
     }
     .db-center {
-        padding: 9px 0;
+    padding: 9px 0;
     border-bottom: 1px solid #ccc;
     }
     .db-top {
@@ -132,9 +138,9 @@
                     </select>
                 </td>
                 <th><label>供方名称</label></th>
-                <td >
-                    <select name="store_id" class="" >
-                        <option value=""><?php echo $lang['nc_please_choose']; ?></option>
+                <td class="">
+                    <select name="store_id" class="" lay-search> 
+                        <option data-color="<?php echo $provider['opened']?>"   value=""><?php echo $lang['nc_please_choose']; ?> </option>
                         <?php foreach($output['provider_list'] as $provider){?>
                             <option value="<?php echo $provider['store_id']?>"
                                     <?php if ($_GET['store_id'] == $provider['store_id']){ ?>selected<?php } ?> data-color="<?php echo $provider['opened']?>" class="textColor"><?php echo $provider['store_name']?>
@@ -497,7 +503,7 @@
                     <td class="align-left"><?php echo $order['mch_order']; ?></td>
                     <td class="align-left" class="ch_trade_no"><?php echo $order['ch_trade_no']; ?></td>
                     <td class="align-center"><?php echo $order['channel_name']; ?></td>
-                    <td class="align-center"><?php echo $order['commit_times']+1; ?></td>
+                    <td class="align-center"><?php echo $order['commit_times']; ?></td>
                     <td class="align-center"><?php echo $order['quality_text']; ?></td>
                     <td class="align-center"><?php echo $order['org_quality_text']; ?></td>
                     <!--                    <td class="align-center">--><?php //echo $order['mch_amount']; ?><!--</td>-->
@@ -814,6 +820,7 @@
         // 供方名称颜色
         $('.textColor').each(function () {
             let color = $(this).attr('data-color')
+            console.log(color);
             if (color == '1') {
                 $(this).css('color', 'green')
             } else {
@@ -865,11 +872,10 @@
             // console.log(formatdate)
             $('#startTime').val(formatdate)
         })
-        // 60分钟订单
+        // 当前零点钟订单
         $('#0_rder').click(function () {
             let date=new Date();
             let min=date.getMinutes();
-            date.setMinutes(min-60);
             let y = date.getFullYear();
             let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
             let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
@@ -877,7 +883,6 @@
             let f = 0;
             let s = 0;
             let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
-            // console.log(formatdate)
             $('#startTime').val(formatdate)
         })
     });

+ 83 - 16
data/config/win/refill.ini.php

@@ -562,7 +562,8 @@ $xunyin_phone = ['name' => 'xunyin', 'store_id' => 35,'qualitys' => '2',
         ],
         30 => [
             ['goods_id' => 6440, 'price' => 30, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6440, 'price' => 30, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6440, 'price' => 30.24, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6440, 'price' => 30, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 6441, 'price' => 50, 'quality' => 2, 'card_type' => 'chinamobile'],
@@ -2322,12 +2323,12 @@ $guochuang_nation_phone = ['name' => 'guochuang_nation', 'store_id' => 121, 'qua
             ['goods_id' => 7054, 'price' => 4.08, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         5  => [
-            ['goods_id' => 7055, 'price' => 5.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7055, 'price' => 5.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7055, 'price' => 5.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7055, 'price' => 5.15, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         6  => [
-            ['goods_id' => 7056, 'price' => 6.12, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7056, 'price' => 6.18, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7056, 'price' => 6.12, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7056, 'price' => 6.18, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
@@ -2342,48 +2343,48 @@ $guochuang_nation_phone = ['name' => 'guochuang_nation', 'store_id' => 121, 'qua
             ['goods_id' => 7058, 'price' => 8.24, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         9  => [
-            ['goods_id' => 7059, 'price' => 9.09, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7059, 'price' => 9.18, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7059, 'price' => 9.18, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7059, 'price' => 9.27, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         10 => [
-            ['goods_id' => 7060, 'price' => 10.16, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7060, 'price' => 10.21, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7060, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7060, 'price' => 10.13, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7061, 'price' => 20.17, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7061, 'price' => 20.22, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7061, 'price' => 20.52, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7061, 'price' => 20.26, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 7062, 'price' => 30.21, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7062, 'price' => 30.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7062, 'price' => 30.18, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7062, 'price' => 30.12, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7062, 'price' => 30.39, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7063, 'price' => 50.25, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7063, 'price' => 50.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7063, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7064, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7064, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7064, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7064, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7064, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7065, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7065, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7065, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7065, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 7066, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7066, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7066, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7066, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
-            ['goods_id' => 7067, 'price' => 502, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7067, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7067, 'price' => 501, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7067, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
@@ -2407,7 +2408,7 @@ $shimier_phone = ['name' => 'shimier', 'store_id' => 123,'qualitys' => '1',
     'amount' => [
 //        10 => [['goods_id' => 7076, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        20 => [['goods_id' => 7077, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-//        30 => [['goods_id' => 7078, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7078, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom']],
         50 => [
             ['goods_id' => 7079, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7079, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
@@ -2425,6 +2426,69 @@ $shimier_phone = ['name' => 'shimier', 'store_id' => 123,'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$zhongst_mix_phone = ['name' => 'zhongst_mix', 'store_id' => 124, 'qualitys' => '2',
+    'amount' => [
+        10 => [['goods_id' => 7084, 'price' => 9.95, 'quality' => 2, 'card_type' => 'chinamobile']],
+        20 => [['goods_id' => 7085, 'price' => 19.9, 'quality' => 2, 'card_type' => 'chinamobile']],
+        30 => [['goods_id' => 7086, 'price' => 29.85, 'quality' => 2, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 7087, 'price' => 49.75, 'quality' => 2, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 7088, 'price' => 99.5, 'quality' => 2, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 7089, 'price' => 199, 'quality' => 2, 'card_type' => 'chinamobile']],
+        300 => [['goods_id' => 7090, 'price' => 298.5, 'quality' => 2, 'card_type' => 'chinamobile']],
+        500 => [['goods_id' => 7091, 'price' => 497.5, 'quality' => 2, 'card_type' => 'chinamobile']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$jinfeng_phone = ['name' => 'jinfeng', 'store_id' => 125, 'qualitys' => '1',
+    'amount' => [
+//        10 => [['goods_id' => 7092, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        20 => [['goods_id' => 7093, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7094, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7095, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7096, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7097, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        300 => [['goods_id' => 7098, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        500 => [['goods_id' => 7099, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$hangtong_phone = ['name' => 'hangtong', 'store_id' => 126,'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7100, 'price' => 9.52, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7100, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7101, 'price' => 19.04, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7101, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 7102, 'price' => 28.56, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7102, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7103, 'price' => 47.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7103, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7104, 'price' => 95.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7104, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7105, 'price' => 190.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7105, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+//        300 => [
+//            ['goods_id' => 7106, 'price' => 285.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7106, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7107, 'price' => 476, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7107, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+//        ]
+    ],
+    'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -2518,6 +2582,9 @@ $phone_providers = [
 //    ['name' => 'guochuang_nation', 'cfg' => $guochuang_nation_phone],
     ['name' => 'tianyanman', 'cfg' => $tianyanman_phone],
     ['name' => 'shimier', 'cfg' => $shimier_phone],
+    ['name' => 'zhongst_mix', 'cfg' => $zhongst_mix_phone],
+    ['name' => 'jinfeng', 'cfg' => $jinfeng_phone],
+    ['name' => 'hangtong', 'cfg' => $hangtong_phone],
 ];
 $config['phone_providers'] = $phone_providers;
 

+ 84 - 18
data/config/xyz/refill.ini.php

@@ -562,7 +562,8 @@ $xunyin_phone = ['name' => 'xunyin', 'store_id' => 35,'qualitys' => '2',
         ],
         30 => [
             ['goods_id' => 6440, 'price' => 30, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6440, 'price' => 30, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6440, 'price' => 30.24, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6440, 'price' => 30, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 6441, 'price' => 50, 'quality' => 2, 'card_type' => 'chinamobile'],
@@ -2322,12 +2323,12 @@ $guochuang_nation_phone = ['name' => 'guochuang_nation', 'store_id' => 121, 'qua
             ['goods_id' => 7054, 'price' => 4.08, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         5  => [
-            ['goods_id' => 7055, 'price' => 5.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7055, 'price' => 5.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7055, 'price' => 5.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7055, 'price' => 5.15, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         6  => [
-            ['goods_id' => 7056, 'price' => 6.12, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7056, 'price' => 6.18, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7056, 'price' => 6.12, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7056, 'price' => 6.18, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
@@ -2342,48 +2343,48 @@ $guochuang_nation_phone = ['name' => 'guochuang_nation', 'store_id' => 121, 'qua
             ['goods_id' => 7058, 'price' => 8.24, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         9  => [
-            ['goods_id' => 7059, 'price' => 9.09, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7059, 'price' => 9.18, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7059, 'price' => 9.18, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7059, 'price' => 9.27, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         10 => [
-            ['goods_id' => 7060, 'price' => 10.16, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7060, 'price' => 10.21, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7060, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7060, 'price' => 10.13, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7061, 'price' => 20.17, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7061, 'price' => 20.22, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7061, 'price' => 20.52, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7061, 'price' => 20.26, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 7062, 'price' => 30.21, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7062, 'price' => 30.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7062, 'price' => 30.18, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7062, 'price' => 30.12, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7062, 'price' => 30.39, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7063, 'price' => 50.25, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7063, 'price' => 50.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7063, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7064, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7064, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7064, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7064, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7064, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7065, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7065, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7065, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7065, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 7066, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7066, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7066, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7066, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
-            ['goods_id' => 7067, 'price' => 502, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7067, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7067, 'price' => 501, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7067, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
@@ -2407,7 +2408,7 @@ $shimier_phone = ['name' => 'shimier', 'store_id' => 123,'qualitys' => '1',
     'amount' => [
 //        10 => [['goods_id' => 7076, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        20 => [['goods_id' => 7077, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-//        30 => [['goods_id' => 7078, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7078, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom']],
         50 => [
             ['goods_id' => 7079, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7079, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
@@ -2425,6 +2426,69 @@ $shimier_phone = ['name' => 'shimier', 'store_id' => 123,'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$zhongst_mix_phone = ['name' => 'zhongst_mix', 'store_id' => 124, 'qualitys' => '2',
+    'amount' => [
+        10 => [['goods_id' => 7084, 'price' => 9.95, 'quality' => 2, 'card_type' => 'chinamobile']],
+        20 => [['goods_id' => 7085, 'price' => 19.9, 'quality' => 2, 'card_type' => 'chinamobile']],
+        30 => [['goods_id' => 7086, 'price' => 29.85, 'quality' => 2, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 7087, 'price' => 49.75, 'quality' => 2, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 7088, 'price' => 99.5, 'quality' => 2, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 7089, 'price' => 199, 'quality' => 2, 'card_type' => 'chinamobile']],
+        300 => [['goods_id' => 7090, 'price' => 298.5, 'quality' => 2, 'card_type' => 'chinamobile']],
+        500 => [['goods_id' => 7091, 'price' => 497.5, 'quality' => 2, 'card_type' => 'chinamobile']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$jinfeng_phone = ['name' => 'jinfeng', 'store_id' => 125, 'qualitys' => '1',
+    'amount' => [
+//        10 => [['goods_id' => 7092, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        20 => [['goods_id' => 7093, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7094, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7095, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7096, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7097, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        300 => [['goods_id' => 7098, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        500 => [['goods_id' => 7099, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$hangtong_phone = ['name' => 'hangtong', 'store_id' => 126,'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7100, 'price' => 9.52, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7100, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7101, 'price' => 19.04, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7101, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 7102, 'price' => 28.56, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7102, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7103, 'price' => 47.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7103, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7104, 'price' => 95.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7104, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7105, 'price' => 190.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7105, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+//        300 => [
+//            ['goods_id' => 7106, 'price' => 285.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7106, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7107, 'price' => 476, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7107, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+//        ]
+    ],
+    'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -2518,6 +2582,9 @@ $phone_providers = [
 //    ['name' => 'guochuang_nation', 'cfg' => $guochuang_nation_phone],
     ['name' => 'tianyanman', 'cfg' => $tianyanman_phone],
     ['name' => 'shimier', 'cfg' => $shimier_phone],
+    ['name' => 'zhongst_mix', 'cfg' => $zhongst_mix_phone],
+    ['name' => 'jinfeng', 'cfg' => $jinfeng_phone],
+    ['name' => 'hangtong', 'cfg' => $hangtong_phone],
 ];
 $config['phone_providers'] = $phone_providers;
 
@@ -2548,10 +2615,9 @@ $third_providers = [
 ];
 $config['third_providers'] = $third_providers;
 
-$config['auto_find_channels'] = true;
 
+$config['auto_find_channels'] = true;
 $config['cancel_retry_time'] = [10120 => ["9:00",'10:00','11:00']];
-
 $config['merchant_retry_times'] = [
     1092 => [
         'qualities' => [1 => ['secs' => 420, 'times' => 100], 2 => ['secs' => 180, 'times' => 100]],

+ 83 - 16
data/config/xyzadm/refill.ini.php

@@ -562,7 +562,8 @@ $xunyin_phone = ['name' => 'xunyin', 'store_id' => 35,'qualitys' => '2',
         ],
         30 => [
             ['goods_id' => 6440, 'price' => 30, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6440, 'price' => 30, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6440, 'price' => 30.24, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6440, 'price' => 30, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 6441, 'price' => 50, 'quality' => 2, 'card_type' => 'chinamobile'],
@@ -2322,12 +2323,12 @@ $guochuang_nation_phone = ['name' => 'guochuang_nation', 'store_id' => 121, 'qua
             ['goods_id' => 7054, 'price' => 4.08, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         5  => [
-            ['goods_id' => 7055, 'price' => 5.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7055, 'price' => 5.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7055, 'price' => 5.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7055, 'price' => 5.15, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         6  => [
-            ['goods_id' => 7056, 'price' => 6.12, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7056, 'price' => 6.18, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7056, 'price' => 6.12, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7056, 'price' => 6.18, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
@@ -2342,48 +2343,48 @@ $guochuang_nation_phone = ['name' => 'guochuang_nation', 'store_id' => 121, 'qua
             ['goods_id' => 7058, 'price' => 8.24, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         9  => [
-            ['goods_id' => 7059, 'price' => 9.09, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7059, 'price' => 9.18, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7059, 'price' => 9.18, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7059, 'price' => 9.27, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         10 => [
-            ['goods_id' => 7060, 'price' => 10.16, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7060, 'price' => 10.21, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7060, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7060, 'price' => 10.13, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7061, 'price' => 20.17, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7061, 'price' => 20.22, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7061, 'price' => 20.52, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7061, 'price' => 20.26, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 7062, 'price' => 30.21, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7062, 'price' => 30.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7062, 'price' => 30.18, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7062, 'price' => 30.12, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7062, 'price' => 30.39, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7063, 'price' => 50.25, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7063, 'price' => 50.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7063, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7064, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7064, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7064, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7064, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7064, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7065, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7065, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7065, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7065, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 7066, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7066, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7066, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7066, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
-            ['goods_id' => 7067, 'price' => 502, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7067, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7067, 'price' => 501, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7067, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
@@ -2407,7 +2408,7 @@ $shimier_phone = ['name' => 'shimier', 'store_id' => 123,'qualitys' => '1',
     'amount' => [
 //        10 => [['goods_id' => 7076, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        20 => [['goods_id' => 7077, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-//        30 => [['goods_id' => 7078, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7078, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom']],
         50 => [
             ['goods_id' => 7079, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7079, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
@@ -2425,6 +2426,69 @@ $shimier_phone = ['name' => 'shimier', 'store_id' => 123,'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$zhongst_mix_phone = ['name' => 'zhongst_mix', 'store_id' => 124, 'qualitys' => '2',
+    'amount' => [
+        10 => [['goods_id' => 7084, 'price' => 9.95, 'quality' => 2, 'card_type' => 'chinamobile']],
+        20 => [['goods_id' => 7085, 'price' => 19.9, 'quality' => 2, 'card_type' => 'chinamobile']],
+        30 => [['goods_id' => 7086, 'price' => 29.85, 'quality' => 2, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 7087, 'price' => 49.75, 'quality' => 2, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 7088, 'price' => 99.5, 'quality' => 2, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 7089, 'price' => 199, 'quality' => 2, 'card_type' => 'chinamobile']],
+        300 => [['goods_id' => 7090, 'price' => 298.5, 'quality' => 2, 'card_type' => 'chinamobile']],
+        500 => [['goods_id' => 7091, 'price' => 497.5, 'quality' => 2, 'card_type' => 'chinamobile']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$jinfeng_phone = ['name' => 'jinfeng', 'store_id' => 125, 'qualitys' => '1',
+    'amount' => [
+//        10 => [['goods_id' => 7092, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        20 => [['goods_id' => 7093, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7094, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7095, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7096, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7097, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        300 => [['goods_id' => 7098, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        500 => [['goods_id' => 7099, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$hangtong_phone = ['name' => 'hangtong', 'store_id' => 126,'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7100, 'price' => 9.52, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7100, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7101, 'price' => 19.04, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7101, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 7102, 'price' => 28.56, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7102, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7103, 'price' => 47.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7103, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7104, 'price' => 95.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7104, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7105, 'price' => 190.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7105, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+//        300 => [
+//            ['goods_id' => 7106, 'price' => 285.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7106, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7107, 'price' => 476, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7107, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+//        ]
+    ],
+    'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -2518,6 +2582,9 @@ $phone_providers = [
 //    ['name' => 'guochuang_nation', 'cfg' => $guochuang_nation_phone],
     ['name' => 'tianyanman', 'cfg' => $tianyanman_phone],
     ['name' => 'shimier', 'cfg' => $shimier_phone],
+    ['name' => 'zhongst_mix', 'cfg' => $zhongst_mix_phone],
+    ['name' => 'jinfeng', 'cfg' => $jinfeng_phone],
+    ['name' => 'hangtong', 'cfg' => $hangtong_phone],
 ];
 $config['phone_providers'] = $phone_providers;
 

二进制
helper/refill/api/xyz/guochuang/20210914广东移动调价函.jpg


二进制
helper/refill/api/xyz/guochuang/20210915吉林移动调价函.png


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

@@ -72,8 +72,8 @@ class config
         "4-10-13" => 10.01, "4-20-13" => 20.02, "4-30-13" => 30.03, "4-50-13" => 50.5, "4-100-13" => 100.1, "4-200-13" => 200.2, "4-300-13" => 300.3, "4-500-13" => 500.5,//福建 13
         "4-10-5" => 9.97, "4-20-5" => 19.94, "4-30-5" => 29.91, "4-50-5" => 49.85, "4-100-5" => 99.7, "4-200-5" => 199.4, "4-300-5" => 299.1, "4-500-5" => 498.5,//内蒙古 5
         "4-50-18" => 49.55, "4-100-18" => 99.1, "4-200-18" => 198.2,//湖南 18
-        "4-10-19" => 9.97, "4-20-19" => 19.94, "4-30-19" => 29.91, "4-50-19" => 49.85, "4-100-19" => 99.7, "4-200-19" => 199.4, "4-300-19" => 299.1, "4-500-19" => 498.5,//广东 19
-        "4-10-7" => 9.89, "4-20-7" => 19.78, "4-30-7" => 29.67, "4-50-7" => 49.45, "4-100-7" => 98.9, "4-200-7" => 197.8, "4-300-7" => 296.7, "4-500-7" => 494.5,//吉林 7
+        "4-10-19" => 9.96, "4-20-19" => 19.92, "4-30-19" => 29.88, "4-50-19" => 49.8, "4-100-19" => 99.6, "4-200-19" => 199.2, "4-300-19" => 298.8, "4-500-19" => 498,//广东 19
+        "4-10-7" => 9.93, "4-20-7" => 19.86, "4-30-7" => 29.79, "4-50-7" => 49.65, "4-100-7" => 99.3, "4-200-7" => 198.6, "4-300-7" => 297.9, "4-500-7" => 496.5,//吉林 7
         "4-10-1" => 9.99, "4-20-1" => 19.98, "4-30-1" => 29.97, "4-50-1" => 49.95, "4-100-1" => 99.9, "4-200-1" => 199.8, "4-300-1" => 299.7, "4-500-1" => 499.5,//北京 1
         "4-20-22" => 20, "4-30-22" => 30, "4-50-22" => 50, "4-100-22" => 100, "4-200-22" => 200, "4-300-22" => 300, "4-500-22" => 500,//重庆 22
         "4-10-15" => 9.94, "4-20-15" => 19.88, "4-30-15" => 29.82, "4-50-15" => 49.7, "4-100-15" => 99.4, "4-200-15" => 198.8, "4-300-15" => 298.2, "4-500-15" => 497,//山东 15

+ 34 - 0
helper/refill/api/xyz/hangtong/RefillCallBack.php

@@ -0,0 +1,34 @@
+<?php
+namespace refill\hangtong;
+require_once(BASE_HELPER_RAPI_PATH . '/hangtong/config.php');
+
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+       return true;
+    }
+
+    public function notify($params)
+    {
+        $status = $params['status'];
+        $order_sn = $params['otherNo'];
+
+        $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['official_sn'] = strtolower($params['ext']) == 'null' ? '' : $params['ext'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true];
+        } elseif ($status === 'fail') {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 136 - 0
helper/refill/api/xyz/hangtong/RefillPhone.php

@@ -0,0 +1,136 @@
+<?php
+
+namespace refill\hangtong;
+
+require_once(BASE_HELPER_RAPI_PATH . '/hangtong/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, string $order_sn)
+    {
+        $params['account'] = config::ACCOUNT;
+        $params['otherNo'] = $order_sn;
+        $params['phone'] = $phone;
+        $params['ispCode'] = config::operator[$card_type];
+        $params['cbkUrl'] = config::NOTIFY_URL;
+        $params['timestamp'] = date("YmdHis");
+
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $params = $this->req_params($card_no, $card_type, $params['order_sn']);
+        $params['productCode'] = config::ProductIDS[$card_type][$amount];
+        if (empty($params['productCode'])) {
+            return [false, '产品编号错误', false];
+        }
+
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, 'GET', 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['status'] === 'success') {
+                return [true, $resp['orderNo'], false];
+            } else {
+                return [false, $resp['msg'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['account'] = config::ACCOUNT;
+        $params['otherNo'] = $refill_info['order_sn'];
+        $params['timestamp'] = date("YmdHis");
+        $params['sign'] = $this->sign($params);
+
+        $resp = http_request(config::QUERY_URL, $params);
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            }
+            elseif ($resp['qstatus'] === 'success')
+            {
+                $result = $resp['result'];
+                $status = $result['status'];
+                if ($status === 'success') {
+                    $order_state = ORDER_STATE_SUCCESS;
+                    $save['official_sn'] = strtolower($result['ext']) == 'null' ? '' : $result['ext'];
+                    Model('refill_order')->edit($refill_info['order_id'], $save);
+                } elseif ($status === 'fail') {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif ($status === 'ing') {
+                    $order_state = ORDER_STATE_SEND;
+                }
+                elseif ($status === 'non') {
+                    if( (time() - $refill_info['commit_time'] >=30) && (time() - $refill_info['commit_time'] < 10800) ) {
+                        $order_state = ORDER_STATE_NOEXIST;
+                    }else{
+                        $order_state = ORDER_STATE_SEND;
+                    }
+                }
+                else {
+                    return [false, $resp['msg']];
+                }
+
+                return [true, $order_state];
+            }
+            else
+            {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['account'] = config::ACCOUNT;
+        $params['timestamp'] = date("YmdHis");
+        $params['sign'] = $this->sign($params);
+
+        $resp = http_request(config::BALANCE_URL, $params);
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            return [true, $resp['balance']];
+        }
+    }
+
+    private function sign($params)
+    {
+        $signature = [config::KEY, $params['timestamp'], config::ACCOUNT];
+        sort($signature, SORT_STRING);
+        $signature = implode($signature);
+        return sha1($signature);
+    }
+}

+ 31 - 0
helper/refill/api/xyz/hangtong/config.php

@@ -0,0 +1,31 @@
+<?php
+
+
+namespace refill\hangtong;
+use mtopcard;
+
+class config
+{
+    const ORDER_URL = 'http://47.109.31.191/flow-receiver/api/v2/recharge';
+    const QUERY_URL = 'http://47.109.31.191/flow-receiver/api/v2/query/single';
+    const BALANCE_URL = 'http://47.109.31.191/flow-receiver/api/v2/balance/query';
+    const NOTIFY_URL = BASE_SITE_URL . '/mobile/callback/refill_hangtong.php';
+    const ACCOUNT = 'yezi';
+    const KEY = '9074ca3652384ab2a9c7278842ec1147';
+    const operator = [
+        mtopcard\ChinaMobileCard  => 'CMCC',
+        mtopcard\ChinaUnicomCard  => 'CUCC',
+        mtopcard\ChinaTelecomCard => 'CTCC'
+    ];
+    const ProductIDS = [
+        mtopcard\ChinaMobileCard => [
+            30 => 'CMCCALLr30r', 50 => 'CMCCALLr50r', 100 => 'CMCCALLr100r', 200 => 'CMCCALLr200r'
+        ],
+        mtopcard\ChinaUnicomCard => [
+            30 => 'CUCCALLr30r', 50 => 'CUCCALLr50r', 100 => 'CUCCALLr100r', 200 => 'CUCCALLr200r'
+        ],
+        mtopcard\ChinaTelecomCard => [
+            30 => 'CTCCALLr30r', 50 => 'CTCCALLr50r', 100 => 'CTCCALLr100r', 200 => 'CTCCALLr200r'
+        ]
+    ];
+}

+ 32 - 0
helper/refill/api/xyz/hangtong/椰子.txt

@@ -0,0 +1,32 @@
+账号	yezi
+密码	123456
+密钥	9074ca3652384ab2a9c7278842ec1147
+
+
+下单地址
+http://47.109.31.191/flow-receiver/api/v2/recharge
+查询地址
+http://47.109.31.191/flow-receiver/api/v2/query/single
+余额查询地址
+http://47.109.31.191/flow-receiver/api/v2/balance/query
+
+
+移动快充产品编码		面值
+CMCCALLr30r				30
+CMCCALLr50r				50
+CMCCALLr100r			100
+CMCCALLr200r			200
+
+
+联通快充产品编码		面值
+CUCCALLr30r				30
+CUCCALLr50r				50
+CUCCALLr100r			100
+CUCCALLr200r			200
+
+
+电信快充产品编码		面值
+CTCCALLr30r				30
+CTCCALLr50r				50
+CTCCALLr100r			100
+CTCCALLr200r			200

文件差异内容过多而无法显示
+ 159 - 0
helper/refill/api/xyz/hangtong/话费充值接口v2.doc


+ 34 - 0
helper/refill/api/xyz/jinfeng/RefillCallBack.php

@@ -0,0 +1,34 @@
+<?php
+namespace refill\jinfeng;
+require_once(BASE_HELPER_RAPI_PATH . '/jinfeng/config.php');
+
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+       return true;
+    }
+
+    public function notify($params)
+    {
+        $status = $params['status'];
+        $order_sn = $params['consumerNo'];
+
+        $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 === '001') {
+            $data['official_sn'] = strtolower($params['voucherNo']) == 'null' ? '' : $params['voucherNo'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true];
+        } elseif (in_array($status,config::NotifyErrCodes)) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 145 - 0
helper/refill/api/xyz/jinfeng/RefillPhone.php

@@ -0,0 +1,145 @@
+<?php
+
+namespace refill\jinfeng;
+
+require_once(BASE_HELPER_RAPI_PATH . '/jinfeng/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, string $order_sn)
+    {
+        $params['account'] = config::ACCOUNT;
+        $params['consumerNo'] = $order_sn;
+        $params['mobile'] = $phone;
+        $params['timestamp'] = date("YmdHis");
+
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $params = $this->req_params($card_no, $params['order_sn']);
+        $params['flowCode'] = config::ProductIDS[$card_type][$amount];
+        if (empty($params['flowCode'])) {
+            return [false, '产品编号错误', false];
+        }
+
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, 'GET', 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['status'] === '001') {
+                return [true, $resp['orderNo'], false];
+            } else {
+                return [false, $resp['status'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['account'] = config::ACCOUNT;
+        $params['consumerNo'] = $refill_info['order_sn'];
+        $params['timestamp'] = date("YmdHis");
+        $params['sign'] = $this->sign($params);
+
+        $resp = http_request(config::QUERY_URL, $params);
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            }
+
+            $status = $resp['status'];
+            if ($status === '001')
+            {
+                $order_state = ORDER_STATE_SUCCESS;
+                $save['official_sn'] = strtolower($resp['voucherNo']) == 'null' ? '' : $resp['voucherNo'];
+                Model('refill_order')->edit($refill_info['order_id'], $save);
+            }
+            elseif (in_array($status,config::QueryErrCodes))
+            {
+                if ($status === '026')
+                {
+                    //订单不存在状态,三小时内查询可失败,超过则返回充值中
+                    if (time() - $refill_info['commit_time'] <= 10800) {
+                        $order_state = ORDER_STATE_CANCEL;
+                    } else {
+                        $order_state = ORDER_STATE_SEND;
+                    }
+                } else {
+                    $order_state = ORDER_STATE_CANCEL;
+                }
+            }
+            elseif ($status === '002') {
+                $order_state = ORDER_STATE_SEND;
+            }
+            else {
+                return [false, $status];
+            }
+
+            return [true, $order_state];
+        }
+    }
+
+    public function balance()
+    {
+        $params['account'] = config::ACCOUNT;
+        $params['timestamp'] = date("YmdHis");
+        $params['sign'] = $this->sign($params);
+
+        $resp = http_request(config::BALANCE_URL, $params);
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            } elseif ($resp['status'] === 'success') {
+                return [true, $resp['balance']];
+            } else {
+                return [false, $resp['descriptor']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $data['account'] = $params['account'];
+        $data['timestamp'] = $params['timestamp'];
+        $data['secret'] = config::KEY;
+        asort($data);
+        $content = '';
+        foreach ($data as $val){
+            $content .= $val;
+        }
+        return sha1($content);
+    }
+}

+ 36 - 0
helper/refill/api/xyz/jinfeng/config.php

@@ -0,0 +1,36 @@
+<?php
+
+
+namespace refill\jinfeng;
+use mtopcard;
+
+class config
+{
+    //回调地址需配置
+    const ORDER_URL = 'http://121.40.204.48/flow-receiver/fee/recharge';
+    const QUERY_URL = 'http://121.40.204.48/flow-receiver/fee/query/single';
+    const BALANCE_URL = 'http://121.40.204.48/flow-receiver/fee/balance/query';
+    const NOTIFY_URL = BASE_SITE_URL . '/mobile/callback/refill_jinfeng.php';
+    const ACCOUNT = 'bjgy';
+    const KEY = '27c899a2946d4767b81f10b7dc3875fe';
+
+    const ProductIDS = [
+        mtopcard\ChinaMobileCard => [
+            30 => 'CMCCALLr30r', 50 => 'CMCCALLr50r', 100 => 'CMCCALLr100r', 200 => 'CMCCALLr200r'
+        ],
+        mtopcard\ChinaUnicomCard => [
+            30 => 'CUCCALLr30r', 50 => 'CUCCALLr50r', 100 => 'CUCCALLr100r', 200 => 'CUCCALLr200r'
+        ],
+        mtopcard\ChinaTelecomCard => [
+            30 => 'CTCCALLr30r', 50 => 'CTCCALLr50r', 100 => 'CTCCALLr100r', 200 => 'CTCCALLr200r'
+        ]
+    ];
+
+    const NotifyErrCodes = [
+        '003','004','005','006','007','008','015','016','017','018','019','020','021','022','023','025','027','028','098','099'
+    ];
+
+    const QueryErrCodes = [
+        '003','004','005','006','007','008','015','016','017','018','019','020','021','022','023','024','025','026','027','028','098','099'
+    ];
+}

+ 32 - 0
helper/refill/api/xyz/jinfeng/北京国研.txt

@@ -0,0 +1,32 @@
+账号	bjgy
+密码	123456
+密钥	27c899a2946d4767b81f10b7dc3875fe
+
+
+下单地址
+http://121.40.204.48/flow-receiver/fee/recharge
+查询地址
+http://121.40.204.48/flow-receiver/fee/query/single
+余额查询地址
+http://121.40.204.48/flow-receiver/fee/balance/query
+
+
+移动快充产品编码		面值
+CMCCALLr30r				30
+CMCCALLr50r				50
+CMCCALLr100r			100
+CMCCALLr200r			200
+
+
+联通快充产品编码		面值
+CUCCALLr30r				30
+CUCCALLr50r				50
+CUCCALLr100r			100
+CUCCALLr200r			200
+
+
+电信快充产品编码		面值
+CTCCALLr30r				30
+CTCCALLr50r				50
+CTCCALLr100r			100
+CTCCALLr200r			200

文件差异内容过多而无法显示
+ 3 - 0
helper/refill/api/xyz/jinfeng/话费充值接口v1.1.doc


+ 1 - 0
helper/refill/api/xyz/shimier/config.php

@@ -22,6 +22,7 @@ class config
             200 => 100004
         ],
         mtopcard\ChinaUnicomCard => [
+            30  => 100013,
             50  => 100014,
             100 => 100015,
             200 => 100016

+ 3 - 3
helper/refill/api/xyz/tiancheng/config.php

@@ -6,9 +6,9 @@ namespace refill\tiancheng;
 use mtopcard;
 class config
 {
-    const ORDER_URL = 'http://39.99.151.213:18080/api/order/invest';
-    const QUERY_URL = 'http://39.99.151.213:18080/api/order/queryStatus';
-    const BALANCE_URL = 'http://39.99.151.213:18080/api/order/queryBalance';
+    const ORDER_URL = 'http://39.101.168.240:18080/api/order/invest';
+    const QUERY_URL = 'http://39.101.168.240:18080/api/order/queryStatus';
+    const BALANCE_URL = 'http://39.101.168.240:18080/api/order/queryBalance';
 
     const SID = '16193208193424561706';
     const KEY = 'CwVAoQboguX2DZkdDXk0AIA2csWWnAp1gmKS0KyKKVoX8cX8qJLQa3exEfGevM5J';

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

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

+ 136 - 0
helper/refill/api/xyz/zhongst_mix/RefillPhone.php

@@ -0,0 +1,136 @@
+<?php
+
+namespace refill\zhongst_mix;
+
+require_once(BASE_HELPER_RAPI_PATH . '/zhongst_mix/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, int $card_type, string $order_sn)
+    {
+        $params['szAgentId'] = config::USER_ID;
+        $params['szOrderId'] = $order_sn;
+        $params['szPhoneNum'] = $phone;
+        $params['nMoney'] = $amount;
+        $params['nSortType'] = config::operator[$card_type];
+        $params['nProductClass'] = 1;
+        $params['nProductType'] = 1;
+        $params['szTimeStamp'] = date("Y-m-d H:i:s");
+        $params['szNotifyUrl'] = config::NOTIFY_URL;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn);
+
+        $sign = $this->sign($params);
+        $params['szVerifyString'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, 'POST', false, config::ExtHeaders, $net_errno);
+
+        if (empty($resp)) {
+            return [false, '网络错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            $nRtn = intval($resp['nRtn']);
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            } elseif ($nRtn === 0) {
+                return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NOS)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999])) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], false];
+            } else {
+                $err = 998;
+                $net_errno = "HTTP-{$err}";
+                return [false, $resp['szRtnCode'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['szAgentId'] = config::USER_ID;
+        $params['szOrderId'] = $refill_info['order_sn'];
+        $key = config::KEY;
+        $content = "szAgentId={$params['szAgentId']}&szOrderId={$params['szOrderId']}&szKey={$key}";
+        $params['szVerifyString'] = md5($content);
+
+        $resp = http_request(config::QUERY_URL, $params, 'POST', false, config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            }
+            $status = intval($resp['nRtn']);
+            if ($status === 5012) {
+                $updata['official_sn'] = $resp['szRtnMsg'];
+                Model('refill_order')->edit($refill_info['order_id'], $updata);
+                $order_state = ORDER_STATE_SUCCESS;
+            } elseif ($status === 5013) {
+                $order_state = ORDER_STATE_CANCEL;
+            } elseif (in_array($status, [5011,5019])) {
+                $order_state = ORDER_STATE_SEND;
+            } else {
+                return [false, $status];
+            }
+            return [true, $order_state];
+        }
+    }
+
+    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);
+    }
+}

+ 11 - 0
helper/refill/api/xyz/zhongst_mix/api.txt

@@ -0,0 +1,11 @@
+下单地址:http://39.102.121.210:10186/plat/api/old/submitorder
+
+查询地址:http://39.102.121.210:10186/plat/api/old/queryorder
+
+查询余额地址:http://39.102.121.210:10186/plat/api/old/queryBalance
+后台地址:http://39.102.121.210:10186/plat/index
+账号:changyou
+密码:123456
+ID:200053
+秘钥:3a7d472a266b47a7a929469e46749aa7
+接口文档:https://docs.qq.com/doc/DWkV1VkxQVk13eEtQ

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

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

+ 10 - 0
mobile/callback/refill_hangtong.php

@@ -0,0 +1,10 @@
+<?php
+
+$content = $_SERVER['post_content'];
+
+$inputs = json_decode($content,true);
+foreach ($inputs as $input) {
+    refill\util::push_notify('hangtong',$input);
+}
+
+echo ('SUCCESS');

+ 10 - 0
mobile/callback/refill_jinfeng.php

@@ -0,0 +1,10 @@
+<?php
+
+$content = $_SERVER['post_content'];
+
+$inputs = json_decode($content,true);
+foreach ($inputs as $input) {
+    refill\util::push_notify('jinfeng',$input);
+}
+
+echo ('SUCCESS');

+ 4 - 0
mobile/callback/refill_zhongst_mix.php

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

+ 42 - 0
test/TestRefill.php

@@ -955,6 +955,48 @@ class TestRefill extends TestCase
 //        $resp = $providers->notify($params);
     }
 
+    public function testZhongst_mix()
+    {
+//        $providers = $this->getProvider('zhongst_mix');
+//        $resp = $providers->balance();
+//        $resp = $providers->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '46291631503985151158']);
+
+        $body = '{"szOrderId":"46291631503985151158","fSalePrice":"29.85","szAgentId":"200053","nFlag":"2","szVerifyString":"be07db2c82b63bc2610eee3eac23245b","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
+        $params = json_decode($body, true);
+        $providers = $this->getProvider('zhongst_mix','RefillCallBack');
+        $ret = $providers->verify($params);
+        $resp = $providers->notify($params);
+    }
+
+    public function testHangtong()
+    {
+//        $providers = $this->getProvider('hangtong');
+//        $resp = $providers->balance();
+//        $resp = $providers->add(13699279618, 4, 100, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '68221631775122967358']);
+
+        $body = '{"phone":"13699279618","orderNo":"F2109161452121045530","status":"success","otherNo":"68221631775122967358","msg":"提交/充值成功","ext":"524501553021467113"}';
+        $params = json_decode($body, true);
+        $providers = $this->getProvider('hangtong','RefillCallBack');
+        $ret = $providers->verify($params);
+        $resp = $providers->notify($params);
+    }
+
+    public function testJinfeng()
+    {
+//        $providers = $this->getProvider('jinfeng');
+//        $resp = $providers->balance();
+//        $resp = $providers->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '78561631769733386091']);
+
+        $body = '{"orderNo":"F2109161322374838924","status":"003","consumerNo":"78561631769733386091","voucherNo":null,"mobile":"18500608333"}';
+        $params = json_decode($body, true);
+        $providers = $this->getProvider('jinfeng','RefillCallBack');
+        $ret = $providers->verify($params);
+        $resp = $providers->notify($params);
+    }
+
     public function testAmingjd()
     {
 //        $providers = new refill\amingjd\RefillPhone([]);