Procházet zdrojové kódy

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

stanley-king před 3 roky
rodič
revize
9d79a0a91a
40 změnil soubory, kde provedl 980 přidání a 228 odebrání
  1. 5 0
      admin/control/order_search.php
  2. 3 0
      admin/control/ordersendlist.php
  3. 1 0
      admin/control/provider.php
  4. 1 0
      admin/control/refill_order_manual.php
  5. 3 0
      admin/templates/default/merchant.ratios.php
  6. 4 2
      admin/templates/default/provider.amount.php
  7. 3 0
      admin/templates/default/provider.price.php
  8. 31 5
      admin/templates/default/refill.order.index.php
  9. 29 3
      admin/templates/default/refill.order.manual.index.php
  10. 20 1
      admin/templates/default/refill.order.search.php
  11. 49 1
      admin/templates/default/refill.order.send.index.php
  12. 57 35
      data/config/win/refill.ini.php
  13. 57 35
      data/config/xyz/refill.ini.php
  14. 57 35
      data/config/xyzadm/refill.ini.php
  15. 1 0
      helper/PHPExcel/PHPExcel/Shared/CodePage.php
  16. 11 0
      helper/refill/api/xyz/dashang/config.php
  17. 50 0
      helper/refill/api/xyz/dashang_normal/RefillCallBack.php
  18. 159 0
      helper/refill/api/xyz/dashang_normal/RefillPhone.php
  19. 47 0
      helper/refill/api/xyz/dashang_normal/config.php
  20. binární
      helper/refill/api/xyz/dashang_normal/下游对接供货接口.docx
  21. 34 0
      helper/refill/api/xyz/dashang_normal/开户信息.txt
  22. binární
      helper/refill/api/xyz/guochuang/20211104辽宁移动.png
  23. 1 1
      helper/refill/api/xyz/guochuang/config.php
  24. binární
      helper/refill/api/xyz/guochuang_nation/20211104电信.png
  25. binární
      helper/refill/api/xyz/guochuang_nation/20211104移动.png
  26. 6 8
      helper/refill/api/xyz/yikatong/RefillCallBack.php
  27. 58 59
      helper/refill/api/xyz/yikatong/RefillPhone.php
  28. 10 14
      helper/refill/api/xyz/yikatong/config.php
  29. 12 0
      helper/refill/api/xyz/yikatong/国椰.txt
  30. 0 12
      helper/refill/api/xyz/yikatong/国研椰子-开户信息.txt
  31. binární
      helper/refill/api/xyz/yikatong/话费分销系统接口文档.doc
  32. 4 1
      helper/refill/api/xyz/yunling/RefillPhone.php
  33. 4 2
      helper/refill/api/xyz/yunlingfs/RefillPhone.php
  34. 4 0
      mobile/callback/refill_dashang_normal.php
  35. 7 2
      mobile/callback/refill_yikatong.php
  36. 1 0
      test/TestAccount.php
  37. 0 1
      test/TestBigData.php
  38. 34 11
      test/TestRefill.php
  39. 212 0
      test/TestRefillUtil.php
  40. 5 0
      test/TestTime.php

+ 5 - 0
admin/control/order_search.php

@@ -38,6 +38,11 @@ class order_searchControl extends SystemControl
             $order_sns = trim($_GET['order_sns'], ',');
             $condition['refill_order.order_sn'] = ['in', $order_sns];
         }
+        if (!empty($_GET['card_type'])) {
+            if (in_array($_GET['card_type'], ['1', '2', '4', '5', '6', '7'])) {
+                $condition['refill_order.card_type'] = intval($_GET['card_type']);
+            }
+        }
 
         if(!empty($condition)) {
             $condition['refill_order.inner_status'] = 0;

+ 3 - 0
admin/control/ordersendlist.php

@@ -88,6 +88,9 @@ class ordersendlistControl extends SystemControl
 
         if (!empty($_GET['mchid'])) {
             $base_cond['refill_order.mchid'] = $_GET['mchid'];
+        } elseif(!empty($_GET['no_mchid'])) {
+            $no_mchid = explode(',', $_GET['no_mchid']);
+            $base_cond['refill_order.mchid'] = ['not in', $no_mchid];
         } elseif(!empty($mch_cond)) {
             $base_cond = array_merge($base_cond,$mch_cond);
         }

+ 1 - 0
admin/control/provider.php

@@ -137,6 +137,7 @@ class providerControl extends SystemControl
         $input['memeber_id'] = $provider_info['account_id'];
         $input['amount'] = $params['pointsnum'];
         $input['operation'] = $params['operation'];
+        $input['add_time'] = time();
 
         return Model('provider_amount')->addAmount($input);
     }

+ 1 - 0
admin/control/refill_order_manual.php

@@ -182,6 +182,7 @@ class refill_order_manualControl extends SystemControl
                 $mchid = $order['mchid'];
                 $mch_order = $order['mch_order'];
                 refill\util::set_cancel_order($mchid,$mch_order);
+                $this->log("拦截订单,订单号:{$order['order_sn']},商家单号:{$mch_order},机构编码:{$mchid}", 1);
             }
         }
         showMessage('操作成功');

+ 3 - 0
admin/templates/default/merchant.ratios.php

@@ -38,6 +38,9 @@
     .scrollTable .fixed-bar {
         top: 115px!important;
     }
+    .tbodyd tr:last-child   {
+        margin-bottom: 550px;
+    }
 </style>
 <div class="page">
     <div class="fixed-bar">

+ 4 - 2
admin/templates/default/provider.amount.php

@@ -60,6 +60,7 @@
                 <th>通道ID</th>
                 <th class="align-center">调整金额</th>
                 <th class="align-center">操作人</th>
+                <th class="align-left">操作日期</th>
             </tr>
             </thead>
             <tbody>
@@ -72,18 +73,19 @@
                         <td><?php echo $v['provider_id']; ?></td>
                         <td class="align-center"><?php echo $v['amount']; ?></td>
                         <td class="align-center"><?php echo $v['operation']; ?></td>
+                        <td class="align-left"><?php echo $v['add_time'] ? date('Y-m-d H:i', $v['add_time']) : $lang['no_limit']; ?></td>
                     </tr>
                 <?php } ?>
             <?php } else { ?>
                 <tr class="no_data">
-                    <td colspan="5"><?php echo $lang['nc_no_record']; ?></td>
+                    <td colspan="6"><?php echo $lang['nc_no_record']; ?></td>
                 </tr>
             <?php } ?>
             </tbody>
             <tfoot>
             <tr class="tfoot">
                 <td></td>
-                <td colspan="5">
+                <td colspan="6">
                     <div class="pagination"><?php echo $output['show_page']; ?></div>
                 </td>
             </tr>

+ 3 - 0
admin/templates/default/provider.price.php

@@ -33,6 +33,9 @@
     .scrollTable .fixed-bar {
         top: 115px!important;
     }
+    .tbodyd tr:last-child {
+        margin-bottom: 552px;
+    }
     .tbodyd tr:hover { background-color : #cbe9f3!important;}
     .tbodyd tr:hover td { background : none!important;}
 

+ 31 - 5
admin/templates/default/refill.order.index.php

@@ -537,7 +537,7 @@
                     <td class="align-center"><?php echo $order['commit_times']; ?></td>
                     <td class="align-center"><?php echo $order['org_quality_text']; ?></td>
                     <!--                    <td class="align-center">--><?php //echo $order['mch_amount']; ?><!--</td>-->
-                    <td class="align-center">
+                    <td class="align-center" id="Manual">
 
                         <?php if( ($order['order_state'] == ORDER_STATE_CANCEL || $order['order_state'] == ORDER_STATE_SUCCESS) && $order['is_retrying'] == 0){?>
                         <a class="covercolor" href="index.php?act=merchant&op=notify_merchant&order_id=<?php echo $order['order_id']; ?>">
@@ -545,16 +545,16 @@
                         <?php }?>
 
                         <?php if($order['order_state'] == ORDER_STATE_SEND){?>
-                            <a class="covercolor" href="index.php?act=merchant&op=notify_manual_merchant&type=cancel&order_id=<?php echo $order['order_id']; ?>">
+                            <a class="covercolor" id="cancel" order_id="<?php echo $order['order_id']; ?>" href="#">
                                 手动失败</a>
                             |
-                            <a class="covercolor" href="index.php?act=merchant&op=notify_manual_merchant&type=success&order_id=<?php echo $order['order_id']; ?>">
+                            <a class="covercolor" id="success" order_id="<?php echo $order['order_id']; ?>" href="#">
                                 手动成功</a>
                         <?php }?>
 
                         <?php if($order['card_type'] == mtopcard\ThirdRefillCard){?>
                             |
-                            <a class="covercolor" href="#" class="examine" data-order="<?php echo $order['order_id']; ?>">
+                            <a class="covercolor" href="#" id="examine" data-order="<?php echo $order['order_id']; ?>">
                                 查看</a>
                         <?php }?>
                     </td>
@@ -589,7 +589,7 @@
 <script type="text/javascript">
     $(function () {
         //查看
-    $('.examine').click(function () {
+    $('#examine').click(function () {
       let order_id = $(this).attr('data-order')
       $.get('index.php?act=refill_order&op=refill_third_info',
         {
@@ -669,6 +669,32 @@
       }
     })
   })
+    // 手动失败 成功
+    $('#Manual #cancel').each(function (index, item) {
+        $(item).click(function () {
+            let order_id = $(this).attr("order_id")
+            layer.confirm('您确实要手动失败', {
+                btn: ['确定', '取消'],
+                title: '手动失败'
+            }, function () {
+                window.location.href = `index.php?act=merchant&op=notify_manual_merchant&type=cancel&order_id= ${order_id}`
+            }, function() {}
+            )
+        })
+    })
+    // 手动成功
+    $('#Manual #success').each(function (index, item) {
+        $(item).click(function () {
+            let order_id = $(this).attr("order_id")
+            layer.confirm('您确实要手动成功', {
+                btn: ['确定', '取消'],
+                title: '手动成功'
+            }, function () {
+                window.location.href = `index.php?act=merchant&op=notify_manual_merchant&type=success&order_id= ${order_id}`
+            }, function() {}
+            )
+        })
+    })
 
      // 获取不包含客户
     let selest_nc

+ 29 - 3
admin/templates/default/refill.order.manual.index.php

@@ -126,11 +126,11 @@
                     <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>-->
-                    <td class="w144 align-center">
-                        <a href="index.php?act=refill_order_manual&op=notify_manual_merchant&type=cancel&order_id=<?php echo $order['order_id']; ?>">
+                    <td class="w144 align-center" id="Manual">
+                        <a id="cancel" order_id="<?php echo $order['order_id']; ?>" href="#">
                             手动失败</a>
                         |
-                        <a href="index.php?act=refill_order_manual&op=notify_manual_merchant&type=success&order_id=<?php echo $order['order_id']; ?>">
+                        <a id="success" order_id="<?php echo $order['order_id']; ?>" href="#">
                             手动成功</a>
                     </td>
 
@@ -173,5 +173,31 @@
                 $(this)[0].style.backgroundColor = '#fff'
             })
         })
+    // 手动失败 成功
+    $('#Manual #cancel').each(function (index, item) {
+        $(item).click(function () {
+            let order_id = $(this).attr("order_id")
+            layer.confirm('您确实要手动失败', {
+                btn: ['确定', '取消'],
+                title: '手动失败'
+            }, function () {
+                window.location.href = `index.php?act=refill_order_manual&op=notify_manual_merchant&type=cancel&order_id= ${order_id}`
+            }, function() {}
+            )
+        })
+    })
+    // 手动成功
+    $('#Manual #success').each(function (index, item) {
+        $(item).click(function () {
+            let order_id = $(this).attr("order_id")
+            layer.confirm('您确实要手动成功', {
+                btn: ['确定', '取消'],
+                title: '手动成功'
+            }, function () {
+                window.location.href = `index.php?act=refill_order_manual&op=notify_manual_merchant&type=success&order_id=  ${order_id}`
+            }, function() {}
+            )
+        })
+    })
     })
 </script> 

+ 20 - 1
admin/templates/default/refill.order.search.php

@@ -220,7 +220,26 @@
                               rows="10"><?php echo $_GET['card_nos']; ?></textarea></td>
                 <th><label class="query_ors">商家单号(多行查询)</label></th>
                 <td><textarea name="mch_orders" id="mch_orders" cols="30"
-                              rows="10"><?php echo $_GET['mch_orders']; ?></textarea></td>
+                              rows="10"><?php echo $_GET['mch_orders']; ?></textarea>
+                            </td>
+                <th><label>充值类型</label></th>
+                <td>
+                    <select name="card_type" class="querySelect" style="height: 29px;">
+                        <option value=""><?php echo $lang['nc_please_choose']; ?></option>
+                        <option value="1"
+                                <?php if ($_GET['card_type'] == '1'){ ?>selected<?php } ?>>中石油</option>
+                        <option value="2"
+                                <?php if ($_GET['card_type'] == '2'){ ?>selected<?php } ?>>中石化</option>
+                        <option value="4"
+                                <?php if ($_GET['card_type'] == '4'){ ?>selected<?php } ?>>中国移动</option>
+                        <option value="5"
+                                <?php if ($_GET['card_type'] == '5'){ ?>selected<?php } ?>>中国联通</option>
+                        <option value="6"
+                                <?php if ($_GET['card_type'] == '6'){ ?>selected<?php } ?>>中国电信</option>
+                        <option value="7"
+                                <?php if ($_GET['card_type'] == '7'){ ?>selected<?php } ?>>增值业务</option>
+                    </select>
+                </td>
                 <td>
                     <a href="javascript:void(0);" id="ncsubmit" class="btn-search "
                        title="<?php echo $lang['nc_query']; ?>">&nbsp;

+ 49 - 1
admin/templates/default/refill.order.send.index.php

@@ -56,6 +56,9 @@
     .db-top {
         padding: 0 30px;
     }
+    #selest_nc {
+        width: 220px
+    }
 </style>
 
 <?php defined('InShopNC') or exit('Access Invalid!'); ?>
@@ -75,6 +78,8 @@
         <input type="hidden" name="act" value="OrderSendList"/>
         <input type="hidden" name="op" value="index"/>
         <input type="hidden" name="order_query" value=""/>
+        <input type="hidden" name="no_mchid" value=""/>
+        <input type="hidden" name="default_no_mch" value="<?php echo $_GET['no_mchid']; ?>"/>
         <table class="tb-type1 noborder search">
             <tr>
                 <th><label>客户名称</label></th>
@@ -196,8 +201,12 @@
                         </option>
                     </select>
                 </td>
+                <th><label style="width: 73px;">不包含客户</label></th>
+                <td>
+                    <div id="selest_nc"></div>
+                </td>
                 <td>
-                    <a href="javascript:void(0);" id="ncsubmit" class="btn-search "
+                    <a style="margin-left:15px;" href="javascript:void(0);" id="ncsubmit" class="btn-search "
                        title="<?php echo $lang['nc_query']; ?>">&nbsp;
                     </a>
                 </td>
@@ -343,6 +352,7 @@
 <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/i18n/zh-CN.js"
         charset="utf-8"></script>
 <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/layer.js"></script>
+<script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/js/xm-select.js"></script>
 <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/layui/layui.js"></script>
 <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css"/>
 <link rel="stylesheet" type="text/css"
@@ -350,6 +360,14 @@
 <script type="text/javascript">
     $(function () {
         $('#ncsubmit').click(function () {
+            
+        let selectArr = selest_nc.getValue();
+        let selectStr = ''
+        for (let i = 0; i < selectArr.length; i++) {
+             selectStr += selectArr[i].value+','
+        }
+        selectStr = selectStr.substr(0, selectStr.length-1)
+        $('input[name="no_mchid"]').val(selectStr);
             $('#formSearch').submit();
         });
         $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
@@ -408,6 +426,36 @@
                 }
             })
         })
+
+        // 获取不包含客户
+        let selest_nc
+        let default_no_mch = $('input[name="default_no_mch"]').val().split(',');
+        $.get('index.php?act=refill_order&op=merchant_data', function (data) {
+         data = JSON.parse(data)
+         if (default_no_mch) {
+           for (let index = 0; index < default_no_mch.length; index++) {
+             for (let j = 0; j < data.length; j++) {
+               if (default_no_mch[index] == data[j].value) {
+                 data[j].selected = true
+               }
+             }
+           }
+         }
+         selest_nc = xmSelect.render({
+           el: '#selest_nc',
+           size: 'mini',
+           filterable: true,
+           autoRow: true,
+           height: '500px',
+           style: {
+             minHeight: '27px',
+             lineHeight: '27px',
+             marginLeft: '4px'
+           },
+           language: 'zn',
+           data: data
+         })
+        })
         let isWring = '<?php echo $output['count'][1];?>';
         let setTimer
         let num

+ 57 - 35
data/config/win/refill.ini.php

@@ -617,8 +617,8 @@ $wantong_phone = ['name' => 'wantong', 'store_id' => 36, 'qualitys' => '4',
 $zhongst_phone = ['name' => 'zhongst', 'store_id' => 39, 'qualitys' => '2',
     'amount' => [
         10 => [
-            ['goods_id' => 6464, 'price' => 10.04, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6464, 'price' => 10.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6464, 'price' => 10.25, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6464, 'price' => 10.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6464, 'price' => 10.01, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
@@ -1885,17 +1885,17 @@ $miaoxt_phone = ['name' => 'miaoxt', 'store_id' => 101, 'qualitys' => '2',
     'amount' => [
         10 => [
             ['goods_id' => 6901, 'price' => 10.03, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6901, 'price' => 10.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6901, 'price' => 10.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6901, 'price' => 10.03, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
             ['goods_id' => 6902, 'price' => 20.06, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6902, 'price' => 20.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6902, 'price' => 20.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6902, 'price' => 20.06, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
             ['goods_id' => 6903, 'price' => 30.06, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6903, 'price' => 30.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6903, 'price' => 30.12, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6903, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
@@ -2395,69 +2395,69 @@ $guochuang_nation_phone = ['name' => 'guochuang_nation', 'store_id' => 121, 'qua
             ['goods_id' => 7054, 'price' => 4.124, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         5  => [
-            ['goods_id' => 7055, 'price' => 5.205, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7055, 'price' => 5.255, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7055, 'price' => 5.155, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7055, 'price' => 5.205, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7055, 'price' => 5.255, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         6  => [
-            ['goods_id' => 7056, 'price' => 6.2064, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7056, 'price' => 6.2562, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7056, 'price' => 6.186, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7056, 'price' => 6.246, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7056, 'price' => 6.2562, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         7  => [
-            ['goods_id' => 7057, 'price' => 7.2072, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7057, 'price' => 7.2569, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7057, 'price' => 7.217, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7057, 'price' => 7.287, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7057, 'price' => 7.2569, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         8  => [
-            ['goods_id' => 7058, 'price' => 8.208, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7058, 'price' => 8.2584, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7058, 'price' => 8.248, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7058, 'price' => 8.328, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7058, 'price' => 8.2584, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         9  => [
-            ['goods_id' => 7059, 'price' => 9.2088, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7059, 'price' => 9.2592, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7059, 'price' => 9.279, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7059, 'price' => 9.369, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7059, 'price' => 9.2592, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         10 => [
-            ['goods_id' => 7060, 'price' => 10.24, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7060, 'price' => 10.07, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7060, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7060, 'price' => 10.045, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7060, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7061, 'price' => 20.48, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7061, 'price' => 20.27, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7061, 'price' => 20.52, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7061, 'price' => 20.62, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
             ['goods_id' => 7062, 'price' => 30.21, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7062, 'price' => 30.381, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['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.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7063, 'price' => 50.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7063, 'price' => 50.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 7064, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7064, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7064, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7064, 'price' => 100.45, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 7065, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7065, 'price' => 200.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7065, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7065, 'price' => 200.5, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
             ['goods_id' => 7066, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7066, 'price' => 300.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7066, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7066, 'price' => 300.75, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
             ['goods_id' => 7067, 'price' => 502, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7067, 'price' => 501.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7067, 'price' => 502, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7067, 'price' => 501.25, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
@@ -2564,34 +2564,42 @@ $hangtong_phone = ['name' => 'hangtong', 'store_id' => 126,'qualitys' => '1',
 $dashang_phone = ['name' => 'dashang', 'store_id' => 127, 'qualitys' => '2',
     'amount' => [
         10 => [
-            ['goods_id' => 7108, 'price' => 9.99, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7108, 'price' => 9.98, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7108, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7108, 'price' => 10.08, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7108, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7109, 'price' => 19.98, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7109, 'price' => 19.96, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7109, 'price' => 20.52, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7109, 'price' => 20.16, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7109, 'price' => 20.32, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 7110, 'price' => 29.97, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7110, 'price' => 29.94, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7110, 'price' => 30.36, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7110, 'price' => 30.24, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7110, 'price' => 30.66, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
+//            ['goods_id' => 7111, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7111, 'price' => 49.875, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7111, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
+//            ['goods_id' => 7112, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7112, 'price' => 99.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7112, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
+//            ['goods_id' => 7113, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7113, 'price' => 199.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7113, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
+//            ['goods_id' => 7114, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7114, 'price' => 299.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7114, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
+//            ['goods_id' => 7115, 'price' => 502, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7115, 'price' => 498.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7115, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
@@ -2711,17 +2719,17 @@ $chizeng_phone = ['name' => 'chizeng', 'store_id' => 133, 'qualitys' => '1',
             ['goods_id' => 7149, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7150, 'price' => 47.45, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7150, 'price' => 47.85, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7150, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7150, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7151, 'price' => 94.9, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7151, 'price' => 95.7, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7151, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7151, 'price' => 95, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7152, 'price' => 189.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7152, 'price' => 191.4, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7152, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7152, 'price' => 190, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
@@ -2875,7 +2883,7 @@ $xiaoniu_hf_phone = ['name' => 'xiaoniu_hf', 'store_id' => 141, 'qualitys' => '3
 
 $shuoruan_phone = ['name' => 'shuoruan', 'store_id' => 142, 'qualitys' => '2',
     'amount' => [
-//        10 => [['goods_id' => 7219, 'price' => 9.97, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        10 => [['goods_id' => 7219, 'price' => 10.3, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        20 => [['goods_id' => 7220, 'price' => 19.94, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        30 => [['goods_id' => 7221, 'price' => 29.91, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
         50 => [['goods_id' => 7222, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
@@ -2986,6 +2994,19 @@ $feimingyu_phone = ['name' => 'feimingyu', 'store_id' => 147, 'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$dashang_normal_phone = ['name' => 'dashang_normal', 'store_id' => 148, 'qualitys' => '1',
+    'amount' => [
+        10 => [['goods_id' => 7267, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 7268, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7269, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7270, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7271, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7272, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        300 => [['goods_id' => 7273, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        500 => [['goods_id' => 7274, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -3097,7 +3118,8 @@ $phone_providers = [
     ['name' => 'shuoruan', 'cfg' => $shuoruan_phone],
     ['name' => 'linzhu', 'cfg' => $linzhu_phone],
     ['name' => 'huafutongman', 'cfg' => $huafutongman_phone],
-    ['name' => 'feimingyu', 'cfg' => $feimingyu_phone]
+    ['name' => 'feimingyu', 'cfg' => $feimingyu_phone],
+    ['name' => 'dashang_normal', 'cfg' => $dashang_normal_phone]
 ];
 $config['phone_providers'] = $phone_providers;
 

+ 57 - 35
data/config/xyz/refill.ini.php

@@ -617,8 +617,8 @@ $wantong_phone = ['name' => 'wantong', 'store_id' => 36, 'qualitys' => '4',
 $zhongst_phone = ['name' => 'zhongst', 'store_id' => 39, 'qualitys' => '2',
     'amount' => [
         10 => [
-            ['goods_id' => 6464, 'price' => 10.04, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6464, 'price' => 10.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6464, 'price' => 10.25, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6464, 'price' => 10.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6464, 'price' => 10.01, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
@@ -1885,17 +1885,17 @@ $miaoxt_phone = ['name' => 'miaoxt', 'store_id' => 101, 'qualitys' => '2',
     'amount' => [
         10 => [
             ['goods_id' => 6901, 'price' => 10.03, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6901, 'price' => 10.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6901, 'price' => 10.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6901, 'price' => 10.03, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
             ['goods_id' => 6902, 'price' => 20.06, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6902, 'price' => 20.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6902, 'price' => 20.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6902, 'price' => 20.06, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
             ['goods_id' => 6903, 'price' => 30.06, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6903, 'price' => 30.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6903, 'price' => 30.12, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6903, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
@@ -2395,69 +2395,69 @@ $guochuang_nation_phone = ['name' => 'guochuang_nation', 'store_id' => 121, 'qua
             ['goods_id' => 7054, 'price' => 4.124, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         5  => [
-            ['goods_id' => 7055, 'price' => 5.205, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7055, 'price' => 5.255, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7055, 'price' => 5.155, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7055, 'price' => 5.205, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7055, 'price' => 5.255, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         6  => [
-            ['goods_id' => 7056, 'price' => 6.2064, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7056, 'price' => 6.2562, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7056, 'price' => 6.186, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7056, 'price' => 6.246, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7056, 'price' => 6.2562, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         7  => [
-            ['goods_id' => 7057, 'price' => 7.2072, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7057, 'price' => 7.2569, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7057, 'price' => 7.217, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7057, 'price' => 7.287, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7057, 'price' => 7.2569, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         8  => [
-            ['goods_id' => 7058, 'price' => 8.208, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7058, 'price' => 8.2584, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7058, 'price' => 8.248, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7058, 'price' => 8.328, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7058, 'price' => 8.2584, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         9  => [
-            ['goods_id' => 7059, 'price' => 9.2088, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7059, 'price' => 9.2592, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7059, 'price' => 9.279, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7059, 'price' => 9.369, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7059, 'price' => 9.2592, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         10 => [
-            ['goods_id' => 7060, 'price' => 10.24, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7060, 'price' => 10.07, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7060, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7060, 'price' => 10.045, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7060, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7061, 'price' => 20.48, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7061, 'price' => 20.27, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7061, 'price' => 20.52, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7061, 'price' => 20.62, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
             ['goods_id' => 7062, 'price' => 30.21, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7062, 'price' => 30.381, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['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.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7063, 'price' => 50.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7063, 'price' => 50.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 7064, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7064, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7064, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7064, 'price' => 100.45, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 7065, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7065, 'price' => 200.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7065, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7065, 'price' => 200.5, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
             ['goods_id' => 7066, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7066, 'price' => 300.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7066, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7066, 'price' => 300.75, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
             ['goods_id' => 7067, 'price' => 502, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7067, 'price' => 501.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7067, 'price' => 502, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7067, 'price' => 501.25, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
@@ -2564,34 +2564,42 @@ $hangtong_phone = ['name' => 'hangtong', 'store_id' => 126,'qualitys' => '1',
 $dashang_phone = ['name' => 'dashang', 'store_id' => 127, 'qualitys' => '2',
     'amount' => [
         10 => [
-            ['goods_id' => 7108, 'price' => 9.99, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7108, 'price' => 9.98, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7108, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7108, 'price' => 10.08, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7108, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7109, 'price' => 19.98, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7109, 'price' => 19.96, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7109, 'price' => 20.52, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7109, 'price' => 20.16, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7109, 'price' => 20.32, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 7110, 'price' => 29.97, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7110, 'price' => 29.94, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7110, 'price' => 30.36, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7110, 'price' => 30.24, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7110, 'price' => 30.66, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
+//            ['goods_id' => 7111, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7111, 'price' => 49.875, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7111, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
+//            ['goods_id' => 7112, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7112, 'price' => 99.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7112, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
+//            ['goods_id' => 7113, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7113, 'price' => 199.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7113, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
+//            ['goods_id' => 7114, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7114, 'price' => 299.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7114, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
+//            ['goods_id' => 7115, 'price' => 502, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7115, 'price' => 498.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7115, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
@@ -2711,17 +2719,17 @@ $chizeng_phone = ['name' => 'chizeng', 'store_id' => 133, 'qualitys' => '1',
             ['goods_id' => 7149, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7150, 'price' => 47.45, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7150, 'price' => 47.85, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7150, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7150, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7151, 'price' => 94.9, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7151, 'price' => 95.7, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7151, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7151, 'price' => 95, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7152, 'price' => 189.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7152, 'price' => 191.4, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7152, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7152, 'price' => 190, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
@@ -2875,7 +2883,7 @@ $xiaoniu_hf_phone = ['name' => 'xiaoniu_hf', 'store_id' => 141, 'qualitys' => '3
 
 $shuoruan_phone = ['name' => 'shuoruan', 'store_id' => 142, 'qualitys' => '2',
     'amount' => [
-//        10 => [['goods_id' => 7219, 'price' => 9.97, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        10 => [['goods_id' => 7219, 'price' => 10.3, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        20 => [['goods_id' => 7220, 'price' => 19.94, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        30 => [['goods_id' => 7221, 'price' => 29.91, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
         50 => [['goods_id' => 7222, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
@@ -2986,6 +2994,19 @@ $feimingyu_phone = ['name' => 'feimingyu', 'store_id' => 147, 'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$dashang_normal_phone = ['name' => 'dashang_normal', 'store_id' => 148, 'qualitys' => '1',
+    'amount' => [
+        10 => [['goods_id' => 7267, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 7268, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7269, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7270, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7271, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7272, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        300 => [['goods_id' => 7273, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        500 => [['goods_id' => 7274, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -3097,7 +3118,8 @@ $phone_providers = [
     ['name' => 'shuoruan', 'cfg' => $shuoruan_phone],
     ['name' => 'linzhu', 'cfg' => $linzhu_phone],
     ['name' => 'huafutongman', 'cfg' => $huafutongman_phone],
-    ['name' => 'feimingyu', 'cfg' => $feimingyu_phone]
+    ['name' => 'feimingyu', 'cfg' => $feimingyu_phone],
+    ['name' => 'dashang_normal', 'cfg' => $dashang_normal_phone]
 ];
 $config['phone_providers'] = $phone_providers;
 

+ 57 - 35
data/config/xyzadm/refill.ini.php

@@ -617,8 +617,8 @@ $wantong_phone = ['name' => 'wantong', 'store_id' => 36, 'qualitys' => '4',
 $zhongst_phone = ['name' => 'zhongst', 'store_id' => 39, 'qualitys' => '2',
     'amount' => [
         10 => [
-            ['goods_id' => 6464, 'price' => 10.04, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6464, 'price' => 10.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6464, 'price' => 10.25, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6464, 'price' => 10.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6464, 'price' => 10.01, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
@@ -1885,17 +1885,17 @@ $miaoxt_phone = ['name' => 'miaoxt', 'store_id' => 101, 'qualitys' => '2',
     'amount' => [
         10 => [
             ['goods_id' => 6901, 'price' => 10.03, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6901, 'price' => 10.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6901, 'price' => 10.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6901, 'price' => 10.03, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
             ['goods_id' => 6902, 'price' => 20.06, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6902, 'price' => 20.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6902, 'price' => 20.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6902, 'price' => 20.06, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
             ['goods_id' => 6903, 'price' => 30.06, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6903, 'price' => 30.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6903, 'price' => 30.12, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6903, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
@@ -2395,69 +2395,69 @@ $guochuang_nation_phone = ['name' => 'guochuang_nation', 'store_id' => 121, 'qua
             ['goods_id' => 7054, 'price' => 4.124, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         5  => [
-            ['goods_id' => 7055, 'price' => 5.205, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7055, 'price' => 5.255, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7055, 'price' => 5.155, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7055, 'price' => 5.205, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7055, 'price' => 5.255, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         6  => [
-            ['goods_id' => 7056, 'price' => 6.2064, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7056, 'price' => 6.2562, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7056, 'price' => 6.186, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7056, 'price' => 6.246, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7056, 'price' => 6.2562, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         7  => [
-            ['goods_id' => 7057, 'price' => 7.2072, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7057, 'price' => 7.2569, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7057, 'price' => 7.217, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7057, 'price' => 7.287, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7057, 'price' => 7.2569, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         8  => [
-            ['goods_id' => 7058, 'price' => 8.208, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7058, 'price' => 8.2584, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7058, 'price' => 8.248, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7058, 'price' => 8.328, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7058, 'price' => 8.2584, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         9  => [
-            ['goods_id' => 7059, 'price' => 9.2088, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7059, 'price' => 9.2592, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7059, 'price' => 9.279, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7059, 'price' => 9.369, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7059, 'price' => 9.2592, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         10 => [
-            ['goods_id' => 7060, 'price' => 10.24, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7060, 'price' => 10.07, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7060, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7060, 'price' => 10.045, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7060, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7061, 'price' => 20.48, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7061, 'price' => 20.27, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7061, 'price' => 20.52, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7061, 'price' => 20.62, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
             ['goods_id' => 7062, 'price' => 30.21, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7062, 'price' => 30.381, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['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.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7063, 'price' => 50.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7063, 'price' => 50.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 7064, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7064, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7064, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7064, 'price' => 100.45, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 7065, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7065, 'price' => 200.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7065, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7065, 'price' => 200.5, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
             ['goods_id' => 7066, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7066, 'price' => 300.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7066, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7066, 'price' => 300.75, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
             ['goods_id' => 7067, 'price' => 502, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7067, 'price' => 501.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7067, 'price' => 502, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7067, 'price' => 501.25, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
@@ -2564,34 +2564,42 @@ $hangtong_phone = ['name' => 'hangtong', 'store_id' => 126,'qualitys' => '1',
 $dashang_phone = ['name' => 'dashang', 'store_id' => 127, 'qualitys' => '2',
     'amount' => [
         10 => [
-            ['goods_id' => 7108, 'price' => 9.99, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7108, 'price' => 9.98, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7108, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7108, 'price' => 10.08, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7108, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7109, 'price' => 19.98, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7109, 'price' => 19.96, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7109, 'price' => 20.52, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7109, 'price' => 20.16, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7109, 'price' => 20.32, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 7110, 'price' => 29.97, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7110, 'price' => 29.94, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7110, 'price' => 30.36, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7110, 'price' => 30.24, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7110, 'price' => 30.66, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
+//            ['goods_id' => 7111, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7111, 'price' => 49.875, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7111, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
+//            ['goods_id' => 7112, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7112, 'price' => 99.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7112, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
+//            ['goods_id' => 7113, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7113, 'price' => 199.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7113, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
+//            ['goods_id' => 7114, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7114, 'price' => 299.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7114, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
+//            ['goods_id' => 7115, 'price' => 502, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7115, 'price' => 498.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7115, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
@@ -2711,17 +2719,17 @@ $chizeng_phone = ['name' => 'chizeng', 'store_id' => 133, 'qualitys' => '1',
             ['goods_id' => 7149, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7150, 'price' => 47.45, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7150, 'price' => 47.85, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7150, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7150, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7151, 'price' => 94.9, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7151, 'price' => 95.7, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7151, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7151, 'price' => 95, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7152, 'price' => 189.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7152, 'price' => 191.4, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 7152, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7152, 'price' => 190, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
@@ -2875,7 +2883,7 @@ $xiaoniu_hf_phone = ['name' => 'xiaoniu_hf', 'store_id' => 141, 'qualitys' => '3
 
 $shuoruan_phone = ['name' => 'shuoruan', 'store_id' => 142, 'qualitys' => '2',
     'amount' => [
-//        10 => [['goods_id' => 7219, 'price' => 9.97, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        10 => [['goods_id' => 7219, 'price' => 10.3, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        20 => [['goods_id' => 7220, 'price' => 19.94, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        30 => [['goods_id' => 7221, 'price' => 29.91, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
         50 => [['goods_id' => 7222, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
@@ -2986,6 +2994,19 @@ $feimingyu_phone = ['name' => 'feimingyu', 'store_id' => 147, 'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$dashang_normal_phone = ['name' => 'dashang_normal', 'store_id' => 148, 'qualitys' => '1',
+    'amount' => [
+        10 => [['goods_id' => 7267, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 7268, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7269, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7270, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7271, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7272, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        300 => [['goods_id' => 7273, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        500 => [['goods_id' => 7274, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -3097,7 +3118,8 @@ $phone_providers = [
     ['name' => 'shuoruan', 'cfg' => $shuoruan_phone],
     ['name' => 'linzhu', 'cfg' => $linzhu_phone],
     ['name' => 'huafutongman', 'cfg' => $huafutongman_phone],
-    ['name' => 'feimingyu', 'cfg' => $feimingyu_phone]
+    ['name' => 'feimingyu', 'cfg' => $feimingyu_phone],
+    ['name' => 'dashang_normal', 'cfg' => $dashang_normal_phone]
 ];
 $config['phone_providers'] = $phone_providers;
 

+ 1 - 0
helper/PHPExcel/PHPExcel/Shared/CodePage.php

@@ -85,6 +85,7 @@ class PHPExcel_Shared_CodePage
 			case 10000:	return 'MAC';				break;	//	Apple Roman
 			case 10006:	return 'MACGREEK';			break;	//	Macintosh Greek
 			case 10007:	return 'MACCYRILLIC';		break;	//	Macintosh Cyrillic
+            case 10008: return 'MAC';
 			case 10029:	return 'MACCENTRALEUROPE';	break;	//	Macintosh Central Europe
 			case 10079: return 'MACICELAND';		break;	//	Macintosh Icelandic
 			case 10081: return 'MACTURKISH';		break;	//	Macintosh Turkish

+ 11 - 0
helper/refill/api/xyz/dashang/config.php

@@ -16,6 +16,17 @@ class config
     const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_dashang.php";
 
     const Products = [
+        mtopcard\ChinaMobileCard =>
+            [
+                10  => 90440010,
+                20  => 90440020,
+                30  => 90440030,
+                50  => 90440050,
+                100 => 90440100,
+                200 => 90440200,
+                300 => 90440300,
+                500 => 90440500
+            ],
         mtopcard\ChinaUnicomCard =>
             [
                 10  => 90460010,

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

@@ -0,0 +1,50 @@
+<?php
+namespace refill\dashang_normal;
+
+require_once(BASE_HELPER_RAPI_PATH . '/dashang_normal/config.php');
+
+use refill;
+
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $sign = $this->sign($params);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "{$params['bizId']}{$params['downstreamSerialno']}{$params['ejId']}{$params['status']}{$userid}{$key}";
+        return md5($content);
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['status']);
+        $order_sn = $params['downstreamSerialno'];
+        $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['voucher']) == 'null' ? '' : $params['voucher'];
+            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];
+        }
+    }
+}

+ 159 - 0
helper/refill/api/xyz/dashang_normal/RefillPhone.php

@@ -0,0 +1,159 @@
+<?php
+declare(strict_types=0);
+
+namespace refill\dashang_normal;
+
+require_once(BASE_HELPER_RAPI_PATH . '/dashang_normal/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, int $card_type, string $order_sn)
+    {
+        $params['userId'] = config::USER_ID;
+        $params['itemId'] = config::Products[$card_type][$amount];
+        $params['checkItemFacePrice'] = $amount * 1000;
+        $params['amt'] = 1;
+        $params['uid'] = $phone;
+        $params['serialno'] = $order_sn;
+        $params['dtCreate'] = date("YmdHis");
+
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn);
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, 'GET', false, [], $net_errno);
+
+        if (empty($resp)) {
+            return [false, '网络错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = $this->xmlToArray($resp);
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            }
+            $status = $resp['status'];
+            $code   = $resp['code'];
+
+            if (!in_array($status, ['success', 'failed'])) {
+                return [false, '网络错误', true];
+            } elseif ($code === '00') {
+                return [true, $resp['bizOrderId'], false];
+            } elseif (in_array($code, [23, 31])) {
+                $net_errno = "HTTP-{$code}";
+                return [false, $code, true];
+            } else {
+                return [false, $code, false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['userId'] = config::USER_ID;
+        $params['serialno'] = $refill_info['order_sn'];
+        $key = config::KEY;
+        $content = "{$params['userId']}{$params['serialno']}{$key}";
+        $params['sign'] = md5($content);
+
+        $resp = http_request(config::QUERY_URL, $params);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = $this->xmlToArray($resp);
+            if (empty($resp))
+            {
+                return [false, '网络错误'];
+            }
+            else
+            {
+                $status = $resp['status'];
+                $code   = $resp['code'];
+
+                if (!in_array($status, ['success', 'failed'])) {
+                    return [false, $status];
+                }
+                elseif($code === '00')
+                {
+                    $status = intval($resp['data']['status']);
+                    if ($status === 2) {
+                        Model('refill_order')->edit($refill_info['order_id'], ['official_sn' => $resp['data']['outOrderNo']]);
+                        $order_state = ORDER_STATE_SUCCESS;
+                    } elseif ($status === 3) {
+                        $order_state = ORDER_STATE_CANCEL;
+                    } elseif (in_array($status, [0, 1, 4, 9])) {
+                        $order_state = ORDER_STATE_SEND;
+                    } else {
+                        return [false, $status];
+                    }
+                    return [true, $order_state];
+                }
+                elseif ($code === '22' && (time() - $refill_info['commit_time'] >= 600)) {
+                    return [true, ORDER_STATE_NOEXIST];
+                }
+                else {
+                    return [false, $code];
+                }
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['userId'] = config::USER_ID;
+        $key = config::KEY;
+        $body = "{$params['userId']}{$key}";
+        $params['sign'] = md5($body);
+
+        $resp = http_request(config::BALANCE_URL, $params);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = $this->xmlToArray($resp);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            } elseif ($resp['status'] === 'success' && $resp['code'] === '00') {
+                return [true, $resp['balance']/1000];
+            } else {
+                return [false, $resp['code']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "{$params['amt']}{$params['checkItemFacePrice']}{$params['dtCreate']}{$params['itemId']}{$params['itemPrice']}{$params['serialno']}";
+        $content .= "{$params['uid']}{$userid}{$key}";
+        return md5($content);
+    }
+
+    public function xmlToArray($xml)
+    {
+        return json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
+    }
+}

+ 47 - 0
helper/refill/api/xyz/dashang_normal/config.php

@@ -0,0 +1,47 @@
+<?php
+
+
+namespace refill\dashang_normal;
+
+use mtopcard;
+class config
+{
+    //回调地址需配置
+    const ORDER_URL = 'http://47.114.209.57/unicomAync/buy.do';
+    const QUERY_URL= 'http://47.114.209.57/unicomAync/queryBizOrder.do';
+    const BALANCE_URL = 'http://47.114.209.57/unicomAync/queryBalance.do';
+
+    const USER_ID= '80800357';
+    const KEY = '1d3a51d49c3b0ba2685389b52f26bffb';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_dashang_normal.php";
+
+    const Products = [
+        mtopcard\ChinaMobileCard =>
+            [
+                10  => 60030010,
+                20  => 60030020,
+                30  => 60030030,
+                50  => 60030050,
+                100 => 60030100,
+                200 => 60030200
+            ],
+        mtopcard\ChinaUnicomCard =>
+            [
+                10  => 60050010,
+                20  => 60050020,
+                30  => 60050030,
+                50  => 60050050,
+                100 => 60050100,
+                200 => 60050200
+            ],
+        mtopcard\ChinaTelecomCard =>
+            [
+                10  => 60040010,
+                20  => 60040020,
+                30  => 60040030,
+                50  => 60040050,
+                100 => 60040100,
+                200 => 60040200
+            ]
+    ];
+}

binární
helper/refill/api/xyz/dashang_normal/下游对接供货接口.docx


+ 34 - 0
helper/refill/api/xyz/dashang_normal/开户信息.txt

@@ -0,0 +1,34 @@
+ 开户信息如下:
+北京国研方略信息科学研究院
+查单平台:http://bm.jiaoyi101.com
+登录名:gyflbilldj
+初始密码:sup123456
+对接信息
+userId:80800357
+key: 1d3a51d49c3b0ba2685389b52f26bffb
+下单:http://47.114.209.57/unicomAync/buy.do
+查询:http://47.114.209.57/unicomAync/queryBizOrder.do
+余额:http://47.114.209.57/unicomAync/queryBalance.do
+
+
+话费低价产品编码
+60040010 全国电信10
+60040020 全国电信20
+60040030 全国电信30
+60040050 全国电信50
+60040100 全国电信100
+60040200 全国电信200
+
+60050010 全国联通10
+60050020 全国联通20
+60050030 全国联通30
+60050050 全国联通50
+60050100 全国联通100
+60050200 全国联通200
+
+60030010 全国移动10
+60030020 全国移动20
+60030030 全国移动30
+60030050 全国移动50
+60030100 全国移动100
+60030200 全国移动200

binární
helper/refill/api/xyz/guochuang/20211104辽宁移动.png


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

@@ -64,7 +64,7 @@ class config
     const Price = [
         //移动
         "4-10-2" => 9.94, "4-20-2" => 19.88, "4-30-2" => 29.82, "4-50-2" => 49.7, "4-100-2" => 99.4, "4-200-2" => 198.8, "4-300-2" => 298.2, "4-500-2" => 497,//天津 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.723, "4-20-6" => 19.446, "4-30-6" => 29.169, "4-50-6" => 48.615, "4-100-6" => 97.23, "4-200-6" => 194.46, "4-300-6" => 291.69, "4-500-6" => 486.15,//辽宁 6
         "4-10-9" => 9.93, "4-20-9" => 19.86, "4-30-9" => 29.79, "4-50-9" => 49.65, "4-100-9" => 99.3,//上海 9
         "4-10-8" => 10.012, "4-20-8" => 20.024, "4-30-8" => 30.036, "4-50-8" => 50.06, "4-100-8" => 100.12, "4-200-8" => 200.24, "4-300-8" => 300.36, "4-500-8" => 500.6,//黑龙江 8
         "4-10-29" => 9.82, "4-20-29" => 19.64, "4-30-29" => 29.46, "4-50-29" => 49.1, "4-100-29" => 98.2, "4-200-29" => 196.4, "4-300-29" => 294.6, "4-500-29" => 491,//青海 29

binární
helper/refill/api/xyz/guochuang_nation/20211104电信.png


binární
helper/refill/api/xyz/guochuang_nation/20211104移动.png


+ 6 - 8
helper/refill/api/xyz/yikatong/RefillCallBack.php

@@ -9,7 +9,7 @@ class RefillCallBack implements refill\IRefillCallBack
     public function verify($params): bool
     {
         $sign = $this->sign($params);
-        if ($params['szVerifyString'] == $sign) {
+        if ($params['sign'] == $sign) {
             return true;
         } else {
             return false;
@@ -18,17 +18,15 @@ class RefillCallBack implements refill\IRefillCallBack
 
     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}";
+        $content  = config::USER_ID . $params['ordernum'] . $params['timestamp'] . config::KEY;
         return md5($content);
     }
 
+    //[$order_id, $success, $can_try, $need_handle]
     public function notify($params)
     {
-        $status = intval($params['nFlag']);
-        $order_sn = $params['szOrderId'];
+        $status = intval($params['state']);
+        $order_sn = $params['ordernum'];
         $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
         if (empty($order_info)) {
             return [false, false, false,false];
@@ -36,7 +34,7 @@ class RefillCallBack implements refill\IRefillCallBack
 
         $order_id = $order_info['order_id'];
         if ($status === 2) {
-            $data['official_sn'] = strtolower($params['szRtnMsg']) == 'null' ? '' : $params['szRtnMsg'];
+            $data['official_sn'] = strtolower($params['serialno']) == 'null' ? '' : $params['serialno'];
             Model('refill_order')->edit($order_id, $data);
             return [$order_id, true, false, true];
         } elseif ($status === 3) {

+ 58 - 59
helper/refill/api/xyz/yikatong/RefillPhone.php

@@ -6,6 +6,7 @@ require_once(BASE_HELPER_RAPI_PATH . '/yikatong/config.php');
 
 use refill;
 use Log;
+use mtopcard;
 
 class RefillPhone extends refill\IRefillPhone
 {
@@ -14,90 +15,87 @@ class RefillPhone extends refill\IRefillPhone
         parent::__construct($cfgs);
     }
 
-    private function req_params(int $phone, int $amount, int $card_type, string $order_sn)
+    private function req_params(int $phone,int $card_type,int $amount, 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;
+        $params['userid'] = config::USER_ID;
+        $params['orderid'] = $order_sn;
+        $params['echo'] = rand(100000,999999);
+        $params['timestamp'] = date("YmdHis");
+        $params['version'] = '1.0';
+        $params['packcode'] = $amount;
+        $params['mobile'] = $phone;
+        $params['flowtype'] = 'fee_quick';
+        $params['callback_url'] = config::NOTIFY_URL;
+        $params['channelcode'] = config::ChannelCode[$card_type];
         return $params;
     }
 
+    //成功/失败,错误信息,是否是网络错误
     public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
     {
-        $order_sn = $params['order_sn'];
-        $params = $this->req_params($card_no, $amount, $card_type, $order_sn);
-
+        $params = $this->req_params($card_no, $card_type, $amount, $params['order_sn']);
         $sign = $this->sign($params);
-        $params['szVerifyString'] = $sign;
+        $params['chargeSign'] = $sign;
 
-        $resp = http_request(config::ORDER_URL, $params, 'POST', false, config::ExtHeaders, $net_errno);
+        $params = json_encode($params);
+        $resp = http_post_data(config::ORDER_URL, $params , config::ExtHeaders, $net_errno);
 
         if (empty($resp)) {
-            return [false, '网络错误', true];
+            return [false, '系统错误', true];
         }
         else
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
-
-            $nRtn = $resp['nRtn'];
+            $code = $resp['code'];
+            $desc = urldecode($resp['desc']);
             if (empty($resp)) {
-                return [false, '网络错误', true];
-            } elseif ($nRtn === 0) {
+                return [false, '系统错误', true];
+            } elseif ($code === '0000' || $code === '2000') {
                 return [true, '', false];
-            } elseif (in_array($nRtn, config::ERR_NOS, true)) {
-                return [false, $resp['szRtnCode'], false];
-            } elseif (in_array($nRtn, [2050, 999], true)) {
-                $net_errno = "HTTP-{$nRtn}";
-                return [false, $resp['szRtnCode'], true];
+            } elseif ($code === '0006' || $code === '0010') {
+                $net_errno = "HTTP-{$code}";
+                return [false, $desc, true];
             } else {
-                $err = 998;
-                $net_errno = "HTTP-{$err}";
-                return [false, $resp['szRtnCode'], true];
+                return [false, $desc, 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);
+        $params['userid'] = config::USER_ID;
+        $params['timestamp'] = date("YmdHis");
+        $params['orderid'] = $refill_info['order_sn'];
+        $content = $params['userid'] . $params['orderid'] . $params['timestamp'] . config::KEY;
+        $params['sign'] = md5($content);
+        $params = json_encode($params);
 
-        $resp = http_request(config::QUERY_URL, $params, 'POST', false, config::ExtHeaders);
+        $resp = http_post_data(config::QUERY_URL, $params , config::ExtHeaders);
 
         if (empty($resp)) {
-            return [false, '网络错误'];
+            return [false, '系统错误'];
         }
         else
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
-            if (empty($resp)) {
-                return [false, '网络错误'];
-            }
+            $desc = urldecode($resp['desc']);
 
-            $status = $resp['nRtn'];
-            if ($status === 5012) {
-                $updata['official_sn'] = $resp['szRtnMsg'];
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            } elseif ($resp['code'] === '0000') {
+                $updata['official_sn'] = $resp['serialno'];
                 Model('refill_order')->edit($refill_info['order_id'], $updata);
                 $order_state = ORDER_STATE_SUCCESS;
-            } elseif ($status === 5013) {
+            } elseif ($resp['code'] === '0004') {
                 $order_state = ORDER_STATE_CANCEL;
-            } elseif (in_array($status, [5011,5019],true)) {
+            } elseif ($resp['code'] === '0002' || $resp['code'] === '0003') {
                 $order_state = ORDER_STATE_SEND;
-            } elseif ($status === 5005 && (time() - $refill_info['commit_time'] >= 300)) {
+            } elseif ($resp['code'] === '0005' && time() - $refill_info['commit_time'] > 600) {
                 $order_state = ORDER_STATE_NOEXIST;
             } else {
-                return [false, $resp['szRtnMsg']];
+                return [false, $desc];
             }
 
             return [true, $order_state];
@@ -106,36 +104,37 @@ class RefillPhone extends refill\IRefillPhone
 
     public function balance()
     {
-        $params['szAgentId'] = config::USER_ID;
-        $key = config::KEY;
-        $content = "szAgentId={$params['szAgentId']}&szKey={$key}";
-        $params['szVerifyString'] = md5($content);
+        $params['userid'] = config::USER_ID;
+        $params['timestamp'] = date("YmdHis");
+        $content = $params['userid'] . $params['timestamp'] . config::KEY;
+        $params['sign'] = md5($content);
+        $params = json_encode($params);
 
-        $resp = http_request(config::BALANCE_URL, $params, 'POST', false, config::ExtHeaders);
+        $resp = http_post_data(config::BALANCE_URL, $params , config::ExtHeaders);
 
         if (empty($resp)) {
-            return [false, '网络错误'];
+            return [false, '系统错误'];
         }
         else
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
+            $desc = urldecode($resp['desc']);
+
             if (empty($resp)) {
-                return [false, '网络错误'];
-            } elseif ($resp['nRtn'] === 0) {
-                return [true, $resp['fBalance']];
+                return [false, '系统错误'];
+            } elseif ($resp['code'] === '0000') {
+                return [true, $resp['balance']];
             } else {
-                return [false, $resp['szRtnCode']];
+                return [false, $desc];
             }
         }
     }
 
     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}";
+        $content  = $params['userid'] . $params['orderid'] . config::KEY . $params['echo'] . $params['timestamp'];
         return md5($content);
     }
+
 }

+ 10 - 14
helper/refill/api/xyz/yikatong/config.php

@@ -6,22 +6,18 @@ use mtopcard;
 
 class config
 {
-    //yd95 lt/dx 945
-    const ORDER_URL = 'http://47.96.90.165:10186/plat/api/old/submitorder';
-    const QUERY_URL = 'http://47.96.90.165:10186/plat/api/old/queryorder';
-    const BALANCE_URL = 'http://47.96.90.165:10186/plat/api/old/queryBalance';
+    const ORDER_URL = 'http://47.104.76.103:8080/fee/api/charge.do';
+    const QUERY_URL = 'http://47.104.76.103:8080/fee/api/query_state.do';
+    const BALANCE_URL = 'http://47.104.76.103:8080/fee/api/query_balance.do';
 
-    const USER_ID = '200001';
-    const KEY = '6723bcb59e574050bc65feeca937af2b';
+    const USER_ID = '04f46671c696436aa30d';
+    const KEY = '29defd3a5a634b6a9988';
     const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_yikatong.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
+    const ExtHeaders = ['Content-Type: application/json'];
+    const ChannelCode = [
+        mtopcard\ChinaMobileCard => 'cmcc',
+        mtopcard\ChinaUnicomCard => 'cucc',
+        mtopcard\ChinaTelecomCard => 'ctcc'
     ];
 }

+ 12 - 0
helper/refill/api/xyz/yikatong/国椰.txt

@@ -0,0 +1,12 @@
+ID:04f46671c696436aa30d
+秘钥:29defd3a5a634b6a9988
+提单地址:http://47.104.76.103:8080/fee/api/charge.do
+
+查询地址:http://47.104.76.103:8080/fee/api/query_state.do
+
+余额地址:http://47.104.76.103:8080/fee/api/query_balance.do
+
+http://47.104.76.103:8080/fee/
+账号:guoyanyezi
+密码:123456   (登录后请立即修改)
+

+ 0 - 12
helper/refill/api/xyz/yikatong/国研椰子-开户信息.txt

@@ -1,12 +0,0 @@
-对接文档地址:https://docs.qq.com/doc/DWkV1VkxQVk13eEtQ
-ID:200001
-秘钥:6723bcb59e574050bc65feeca937af2b
-
-正式环境:
-话费下单地址:http://47.96.90.165:10186/plat/api/old/submitorder
-查询地址:http://47.96.90.165:10186/plat/api/old/queryorder
-查询余额地址:http://47.96.90.165:10186/plat/api/old/queryBalance
-
-客户端地址:http://47.96.90.165:10186/plat/index
-账号:guoyanheyezi
-密码:123456      (登录后请立即修改)

binární
helper/refill/api/xyz/yikatong/话费分销系统接口文档.doc


+ 4 - 1
helper/refill/api/xyz/yunling/RefillPhone.php

@@ -53,6 +53,9 @@ class RefillPhone extends refill\IRefillPhone
             $resultno = intval($resp['resultno']);
             if (in_array($resultno, [0,2])) {
                 return [true, $resp['orderid'], false];
+            } elseif (in_array($resultno, [5006, 9999])){
+                $net_errno = "HTTP-{$resultno}";
+                return [false, $resultno, true];
             } else {
                 return [false, $resultno, false];
             }
@@ -85,7 +88,7 @@ class RefillPhone extends refill\IRefillPhone
                 $order_state = ORDER_STATE_CANCEL;
             } elseif (in_array($resultno, [0,2])) {
                 $order_state = ORDER_STATE_SEND;
-            } elseif ($resultno === 5007) {
+            } elseif ($resultno === 5007 && (time() - $refill_info['commit_time'] >= 600)) {
                 $order_state = ORDER_STATE_NOEXIST;
             } else {
                 return [false, $resp['message']];

+ 4 - 2
helper/refill/api/xyz/yunlingfs/RefillPhone.php

@@ -50,6 +50,9 @@ class RefillPhone extends refill\IRefillPhone
             $resultno = intval($resp['resultno']);
             if (in_array($resultno, [0,2])) {
                 return [true, $resp['orderid'], false];
+            } elseif (in_array($resultno, [5006, 9999])){
+                $net_errno = "HTTP-{$resultno}";
+                return [false, $resultno, true];
             } else {
                 return [false, $resultno, false];
             }
@@ -73,7 +76,6 @@ class RefillPhone extends refill\IRefillPhone
             if (empty($resp)) {
                 return [false, '网络错误'];
             }
-
             $resultno = intval($resp['resultno']);
             if ($resultno === 1) {
                 $order_state = ORDER_STATE_SUCCESS;
@@ -83,7 +85,7 @@ class RefillPhone extends refill\IRefillPhone
                 $order_state = ORDER_STATE_CANCEL;
             } elseif (in_array($resultno, [0,2])) {
                 $order_state = ORDER_STATE_SEND;
-            } elseif ($resultno === 5007) {
+            } elseif ($resultno === 5007 && (time() - $refill_info['commit_time'] >= 600)) {
                 $order_state = ORDER_STATE_NOEXIST;
             } else {
                 return [false, $resp['message']];

+ 4 - 0
mobile/callback/refill_dashang_normal.php

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

+ 7 - 2
mobile/callback/refill_yikatong.php

@@ -1,4 +1,9 @@
 <?php
 
-refill\util::push_notify('yikatong',$_POST);
-echo ('ok');
+$content = $_SERVER['post_content'];
+$inputs = json_decode($content,true);
+refill\util::push_notify('yikatong',$inputs);
+
+$response = ["code" => "0000", "desc" => ""];
+$body = json_encode($response);
+echo($body);

+ 1 - 0
test/TestAccount.php

@@ -9,6 +9,7 @@ define('BASE_ROOT_PATH', str_replace('/test', '', dirname(__FILE__)));
 require_once(BASE_ROOT_PATH . '/global.php');
 require_once(BASE_CORE_PATH . '/lrlz.php');
 require_once(BASE_ROOT_PATH . '/fooder.php');
+require_once(BASE_HELPER_PATH . '/PHPExcel/PHPExcel.php');
 
 class TestAccount extends TestCase
 {

+ 0 - 1
test/TestBigData.php

@@ -71,5 +71,4 @@ class TestBigData extends TestCase
         $speeds = json_decode($content,true);
         refill\RefillFactory::instance()->UpdateSpeeds($speeds);
     }
-
 }

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 34 - 11
test/TestRefill.php


+ 212 - 0
test/TestRefillUtil.php

@@ -0,0 +1,212 @@
+<?php
+
+
+use PHPUnit\Framework\TestCase;
+
+define('APP_ID', 'test');
+define('BASE_ROOT_PATH', str_replace('/test', '', dirname(__FILE__)));
+
+require_once(BASE_ROOT_PATH . '/global.php');
+require_once(BASE_CORE_PATH . '/lrlz.php');
+require_once(BASE_ROOT_PATH . '/fooder.php');
+require_once(BASE_HELPER_PATH . '/PHPExcel/PHPExcel.php');
+require_once(BASE_HELPER_PATH . '/refill/RefillFactory.php');
+
+class TestRefillUtil extends TestCase
+{
+    public static function setUpBeforeClass(): void
+    {
+        Base::run_util();
+    }
+
+    //docker-compose run phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillUtil::testRefillFromExecl)( .*)?$/" --test-suffix TestRefillUtil.php /var/www/html/test
+    public function testRefillFromExecl()
+    {
+        $filename = BASE_ROOT_PATH . "/data/upload/refill/cards.xls";
+        if(!file_exists($filename)) {
+            Log::record("{$filename} not exists.",Log::ERR);
+            return false;
+        }
+
+        $field_reader = function ($filename)
+        {
+            $fileType = PHPExcel_IOFactory::identify($filename);
+            $objReader = PHPExcel_IOFactory::createReader($fileType);
+            $objPHPExcel = $objReader->load($filename);
+
+            foreach ($objPHPExcel->getWorkSheetIterator() as $sheet)
+            {
+                foreach ($sheet->getRowIterator() as $row)
+                {
+                    $items = [];
+                    foreach ($row->getCellIterator() as $cell) {
+                        $items[] = $cell->getValue();
+                    }
+
+                    yield $items;
+                }
+            }
+        };
+
+        $cardno_checker = function ($card_no)
+        {
+            $card_no = trim($card_no);
+            $ret = preg_match("/^\d{11}$/i",$card_no) > 0;
+            if($ret) {
+                return $card_no;
+            } else {
+                return false;
+            }
+        };
+
+        $amount_checker = function ($amount)
+        {
+            $amount = floatval($amount) + 0.0005;
+            $amount = intval($amount);
+            if($amount > 0) {
+                return $amount;
+            } else {
+                return false;
+            }
+        };
+
+        $mchid = 10239;
+        $buyer_id = 66221;
+        $sender = function ($card_no, $amount, $order_sn) use ($mchid, $buyer_id)
+        {
+            $params = [ 'mchid' => $mchid,
+                'buyer_id' => $buyer_id,
+                'amount' => $amount,
+                'mch_order' => $order_sn,
+                'card_no' => $card_no
+            ];
+
+            $ret = refill\util::push_add($params);
+            return $ret;
+        };
+
+        $record_csv = fopen(BASE_ROOT_PATH . "/data/upload/refill/record.csv", 'a+');
+        $items = $field_reader($filename);
+
+        foreach ($items as $item)
+        {
+            Log::record("{$item[0]}:{$item[1]}", Log::DEBUG);
+
+            $card_no = $cardno_checker($item[0]);
+            $amount = $amount_checker($item[1]);
+
+            if ($card_no != false && $amount != false) {
+                $order_sn = $this->make_sn();
+                $ret = $sender($card_no, $amount, $order_sn);
+                Log::record("{$order_sn}:{$card_no}:{$amount}:{$ret}", Log::DEBUG);
+
+                $order_time = date('Y-m-d H:i:S',time());
+                $row = [$order_sn,$card_no, $amount,$order_time];
+                if($ret) {
+                    $row[] = 'SUCC';
+                } else {
+                    $row[] = 'FAIL';
+                }
+                fputcsv($record_csv,$row);
+            }
+            sleep(1);
+        }
+        fclose($record_csv);
+    }
+
+    private function make_sn()
+    {
+        return mt_rand(1000, 9999)
+            . sprintf('%010d', time())
+            . sprintf('%06d', (float)microtime() * 1000000);
+    }
+
+    public function testDiffFromExecl()
+    {
+        $field_reader = function ($filename)
+        {
+            $fileType = PHPExcel_IOFactory::identify($filename);
+            $objReader = PHPExcel_IOFactory::createReader($fileType);
+            $objPHPExcel = $objReader->load($filename);
+
+            foreach ($objPHPExcel->getWorkSheetIterator() as $sheet)
+            {
+                foreach ($sheet->getRowIterator() as $row)
+                {
+                    $items = [];
+                    foreach ($row->getCellIterator() as $cell) {
+                        $items[] = $cell->getValue();
+                    }
+
+                    yield $items;
+                }
+            }
+        };
+
+        $cardno_checker = function ($card_no)
+        {
+            $card_no = trim($card_no);
+            $ret = preg_match("/^\d{11}$/i",$card_no) > 0;
+            if($ret) {
+                return $card_no;
+            } else {
+                return false;
+            }
+        };
+
+        $differ = function ($left,$right)
+        {
+            $result = [];
+
+            $ll = count($left);
+            $lr = count($right);
+            $i = $j = 0;
+
+            while ($i < $ll && $j < $lr)
+            {
+                if ($left[$i] > $right[$j]) {
+                    $j += 1;
+                } elseif ($left[$i] === $right[$j]) {
+                    $i += 1;
+                    $j += 1;
+                } else {
+                    $result[] = $left[$i];
+                    $i += 1;
+                }
+            }
+
+            for (; $i < $ll; $i++) {
+                $result[] = $left[$i];
+            }
+
+            return $result;
+        };
+
+        $filename = BASE_ROOT_PATH . "/data/upload/refill/all.xls";
+        if(!file_exists($filename)) {
+            Log::record("{$filename} not exists.",Log::ERR);
+            return false;
+        }
+
+        $items = $field_reader($filename);
+
+        $left = [];
+        $right = [];
+        foreach ($items as $item) {
+            $noa = $cardno_checker($item[0]);
+            $nob = $cardno_checker($item[2]);
+            if ($noa != false) $left[] = $noa;
+            if ($nob != false) $right[] = $noa;
+        }
+        sort($left);
+        sort($right);
+        $result = $differ($left,$right);
+
+        $csv = fopen(BASE_ROOT_PATH . "/data/upload/refill/diff.csv", 'a+');
+        foreach ($result as $item) {
+            $row = [$item,10];
+            fputcsv($csv,$row);
+        }
+        fclose($csv);
+    }
+}

+ 5 - 0
test/TestTime.php

@@ -220,4 +220,9 @@ class TestTime extends TestCase
     {
         $ret = refill\functional::isDay();
     }
+
+    public function testFormat()
+    {
+        $x = date("Y-m-d H:i:s");
+    }
 }