瀏覽代碼

Merge branch 'rfactor' into raccount

stanley-king 3 年之前
父節點
當前提交
b701f0c8cd
共有 53 個文件被更改,包括 1471 次插入467 次删除
  1. 1 1
      admin/control/refill_order_manual.php
  2. 3 0
      admin/control/refill_refund.php
  3. 39 0
      admin/control/refill_successful.php
  4. 1 3
      admin/templates/default/merchant.intercept.php
  5. 130 0
      admin/templates/default/merchant.ratios.php
  6. 1 0
      admin/templates/default/provider.successful.php
  7. 6 1
      admin/templates/default/recharge.manual.add.php
  8. 3 3
      admin/templates/default/refill.order.search.php
  9. 4 0
      admin/templates/default/refill.refund.php
  10. 1 1
      admin/templates/default/set.cancel.order.php
  11. 1 0
      admin/templates/default/system.successful.php
  12. 0 207
      core/framework/libraries/logold.php
  13. 138 54
      data/config/win/refill.ini.php
  14. 142 58
      data/config/xyz/refill.ini.php
  15. 142 58
      data/config/xyzadm/refill.ini.php
  16. 5 0
      data/model/refill_order.model.php
  17. 20 0
      docker/compose/xyz/accip/docker-compose.yml
  18. 127 0
      docker/compose/xyz/conf/nginx/nginxip.conf
  19. 1 0
      helper/refill/CalcMerchantPrice.php
  20. 50 0
      helper/refill/api/xyz/dashang/RefillCallBack.php
  21. 159 0
      helper/refill/api/xyz/dashang/RefillPhone.php
  22. 42 0
      helper/refill/api/xyz/dashang/config.php
  23. 二進制
      helper/refill/api/xyz/dashang/下游对接供货接口.docx
  24. 31 0
      helper/refill/api/xyz/dashang/开户信息-1.txt
  25. 二進制
      helper/refill/api/xyz/guochuang/20210918电信更新.png
  26. 二進制
      helper/refill/api/xyz/guochuang/20210918移动更新.png
  27. 二進制
      helper/refill/api/xyz/guochuang/20210918联通更新.png
  28. 17 17
      helper/refill/api/xyz/guochuang/config.php
  29. 二進制
      helper/refill/api/xyz/guochuang_nation/10-500面值.png
  30. 二進制
      helper/refill/api/xyz/guochuang_nation/小面值.png
  31. 二進制
      helper/refill/api/xyz/guochuang_nation/电信.png
  32. 二進制
      helper/refill/api/xyz/guochuang_nation/移动.png
  33. 二進制
      helper/refill/api/xyz/guochuang_nation/联通.png
  34. 2 1
      helper/refill/api/xyz/jumithird/RefillPhone.php
  35. 42 6
      helper/refill/api/xyz/santi/RefillPhone.php
  36. 6 0
      helper/refill/api/xyz/santi/account.txt
  37. 44 22
      helper/refill/api/xyz/santi/config.php
  38. 二進制
      helper/refill/api/xyz/santi/三网全国报价表-流量.xlsx
  39. 二進制
      helper/refill/api/xyz/santi/单皓流量购接口文档v3.3.10(流量)(1).docx
  40. 5 1
      helper/refill/api/xyz/xunyinoil/config.php
  41. 50 0
      helper/refill/api/xyz/yuanta/RefillCallBack.php
  42. 136 0
      helper/refill/api/xyz/yuanta/RefillPhone.php
  43. 13 0
      helper/refill/api/xyz/yuanta/api.txt
  44. 26 0
      helper/refill/api/xyz/yuanta/config.php
  45. 4 0
      mobile/callback/refill_dashang.php
  46. 1 1
      mobile/callback/refill_hangtong.php
  47. 4 0
      mobile/callback/refill_santi.php
  48. 4 0
      mobile/callback/refill_yuanta.php
  49. 1 1
      mobile/mobile_run.php
  50. 26 26
      mobile/signature.php
  51. 7 0
      test/TestRedis.php
  52. 34 4
      test/TestRefill.php
  53. 2 2
      test/TestRefillThird.php

+ 1 - 1
admin/control/refill_order_manual.php

@@ -153,7 +153,7 @@ class refill_order_manualControl extends SystemControl
                     unset($mch_orderData[$key]);
                 }
                 $order_list[$order_id]['card_type_text'] = $this->scard_type($order['card_type']);
-                $order_list[$order_id]['company_name'] = $merchants[$value['mchid']]['company_name'];
+                $order_list[$order_id]['company_name'] = $merchants[$order['mchid']]['company_name'];
                 if ($order['notify_time'] > 0) {
                     $diff_time = $order['notify_time'] - $order['order_time'];
                 } else {

+ 3 - 0
admin/control/refill_refund.php

@@ -18,6 +18,9 @@ class refill_refundControl extends SystemControl
         if(!empty($_GET['mchid'])) {
             $condition['mchid'] = $_GET['mchid'];
         }
+        if(!empty($_GET['card_no'])) {
+            $condition['card_no'] = $_GET['card_no'];
+        }
         $start_unixtime = intval(strtotime($_GET['query_start_time']));
         $end_unixtime = intval(strtotime($_GET['query_end_time']));
         if ($start_unixtime > 0 && $end_unixtime > $start_unixtime) {

+ 39 - 0
admin/control/refill_successful.php

@@ -110,4 +110,43 @@ class refill_successfulControl extends SystemControl
         echo(json_encode($result));
         exit;
     }
+
+    public function merchant_ratiosOp()
+    {
+        $ins = Cache::getInstance('cacheredis');
+        $json = $ins->get_org('merchant_ratios');
+        $data = json_decode($json);
+        $data = $this->object_array($data);
+        $result = [];
+        if(!empty($data)) {
+            $merchant_list = $this->merchants();
+            foreach ($merchant_list as $value) {
+                $mchid = $value['mchid'];
+                if(array_key_exists($mchid, $data) && is_array($data[$mchid])) {
+                    $result[$mchid]['ratio'] = $data[$mchid];
+                    $result[$mchid]['company_name'] = $value['company_name'];
+                    $result[$mchid]['time_out'] = $value['time_out'];
+                }
+            }
+        }
+
+        Tpl::output('list', $result);
+        Tpl::showpage('merchant.ratios');
+    }
+
+    private function object_array($array)
+    {
+        if(is_object($array))
+        {
+            $array = (array)$array;
+        }
+        if(is_array($array))
+        {
+            foreach($array as $key=>$value)
+            {
+                $array[$key] = $this->object_array($value);
+            }
+        }
+        return $array;
+    }
 }

+ 1 - 3
admin/templates/default/merchant.intercept.php

@@ -62,7 +62,5 @@
                 $("#user_form").submit();
             }
         });
-        $('input:radio[name=sex]')[0].checked = false; //将第一个 radio 设置为不选中
-        $('input:radio[name=sex]')[1].checked = false; //将第2个 radio 设置为不选中
-    });
+ });
 </script>

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

@@ -0,0 +1,130 @@
+<?php defined('InShopNC') or exit('Access Invalid!'); ?>
+<style>
+    .page .fixed-bar .item-title h3 {
+        margin-top:18px !important;
+        margin-bottom:10px !important;
+        font-weight:700 !important;
+    }
+    .tab-base li span {
+        font-size:12px !important;
+    }
+    .layui-form-select .layui-input {
+        height:26px;
+    }
+    input::placeholder{ 
+        color:#333; 
+    }
+</style>
+<div class="page">
+    <div class="fixed-bar">
+        <div class="item-title">
+            <h3>成功率监控列表</h3>
+            <ul class="tab-base">
+                <li><a href="?index.php&act=refill_successful&op=index&type=provider"><span>通道成功率监控</span></a></li>
+                <li><a href="?index.php&act=refill_successful&op=index&type=system"><span>平台成功率监控</span></a></li>
+                <li><a href="JavaScript:void(0);" class="current" ><span>机构成功率统计</span></a></li>
+            </ul>
+        </div>
+    </div>
+    <div class="fixed-empty"></div>
+    <form method="get" name="formSearch" id="formSearch" class="layui-form">
+        <input type="hidden" value="refill_refund" name="act">
+        <input type="hidden" value="merchant_ratios" name="op">
+        <table class="tb-type1 noborder search">
+            <tbody>
+            <tr>
+            </tr>
+            </tbody>
+        </table>
+    </form>
+    <form method="post" id="merchant_name_form">
+        <input type="hidden" name="form_submit" value="ok"/>
+        <table class="table tb-type2">
+            <thead>
+            <tr class="thead">
+                <th class="align-center w10pre">机构编码</th>
+                <th class="align-center w10pre">机构名称</th>
+                <th class="align-center w10pre">超时时间(秒)</th>
+                <th class="align-center w15pre">15分钟</th>
+                <th class="align-center w15pre">30分钟</th>
+                <th class="align-center w15pre">1小时</th>
+                <th class="align-center w10pre">2小时</th>
+                <th class="align-center w10pre">当天</th>
+            </thead>
+            <tbody>
+            <?php if (!empty($output['list']) && is_array($output['list'])) { ?>
+                <?php foreach ($output['list'] as $k => $v) { ?>
+                    <tr class="trFlex">
+                        <td class="align-center"><?php echo $k; ?></td>
+                        <td class="align-center"><?php echo $v['company_name']; ?></td>
+                        <td class="align-center"><?php echo $v['time_out']; ?></td>
+                        <td class="align-center"><?php echo ($v['ratio'][900] * 100); ?>%</td>
+                        <td class="align-center"><?php echo ($v['ratio'][1800] * 100); ?>%</td>
+                        <td class="align-center"><?php echo ($v['ratio'][3600] * 100); ?>%</td>
+                        <td class="align-center"><?php echo ($v['ratio'][7200] * 100); ?>%</td>
+                        <td class="align-center"><?php echo ($v['ratio'][86400] * 100); ?>%</td>
+                    </tr>
+                <?php } ?>
+            <?php } else { ?>
+                <tr class="no_data">
+                    <td colspan="7"><?php echo $lang['nc_no_record']; ?></td>
+                </tr>
+            <?php } ?>
+            </tbody>
+            <tfoot>
+            <tr class="tfoot">
+                <td></td>
+                <td colspan="7">
+                    <div class="pagination"><?php echo $output['show_page']; ?></div>
+                </td>
+            </tr>
+            </tfoot>
+        </table>
+    </form>
+</div>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.edit.js" charset="utf-8"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/laydate/laydate.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"/>
+<script>
+    $(function () {
+        // 日期选择器
+        laydate.render({
+            elem: '#startTime',
+            type: 'datetime'
+        });
+        laydate.render({
+            elem: '#endTime',
+            type: 'datetime'
+        });
+        $('#ncsubmit').click(function () {
+            $('#formSearch').submit();
+        });
+        // 表格hover时背景
+        $('.trFlex').each(function () {
+            $("tbody>tr:odd").css("background-color","#FEF2E8");  
+            $("tbody>tr:even").css("background-color","#ebf1de"); 
+            $(this).hover(function () {
+                $(this)[0].style.backgroundColor = '#cbe9f3'
+            },function() {
+            $("tbody>tr:odd").css("background-color","#FEF2E8");  
+            $("tbody>tr:even").css("background-color","#ebf1de"); 
+            })
+        })
+        // 导出
+        $('#ncexport').click(function () {
+
+            $('input[name="export"]').val('1');
+            $('input[name="op"]').val('index');
+
+            $('#formSearch').submit();
+            $('input[name="export"]').val('');
+            var ii = layer.load();
+            setTimeout(function(){
+                layer.close(ii);
+            }, 800);
+        })
+        
+
+    });
+</script>

+ 1 - 0
admin/templates/default/provider.successful.php

@@ -5,6 +5,7 @@
             <ul class="tab-base">
                 <li><a href="JavaScript:void(0);" class="current" ><span>通道成功率监控</span></a></li>
                 <li><a href="?index.php&act=refill_successful&op=index&type=system"><span>平台成功率监控</span></a></li>
+                <li><a href="?index.php&act=refill_successful&op=merchant_ratios"><span>机构成功率统计</span></a></li>
             </ul>
         </div>
     </div>

+ 6 - 1
admin/templates/default/recharge.manual.add.php

@@ -96,7 +96,7 @@
             <tfoot>
             <tr class="tfoot">
                 <td colspan="2"><a href="JavaScript:void(0);" class="btn"
-                                   onclick="document.form1.submit()"><span><?php echo $lang['nc_submit']; ?></span></a>
+                                   id="submitBtn"><span><?php echo $lang['nc_submit']; ?></span></a>
                 </td>
             </tr>
             </tfoot>
@@ -105,6 +105,11 @@
 </div>
 <script type="text/javascript">
     $(function () {
+        $("#submitBtn").click(function () {
+            if ($("#points_form").valid()) {
+                $("#points_form").submit();
+            }
+        });
         $("#voucher").change(function () {
             $("#textfield1").val($(this).val());
         });

+ 3 - 3
admin/templates/default/refill.order.search.php

@@ -199,7 +199,7 @@
                 <td></td>
                 <td>
                     <a href="#" class="btns" onclick="hCopyCardNo(event)">
-                        <span><i class="icon-edit"></i>拷贝充值卡号+渠道</span>
+                        <span><i class="icon-edit"></i>拷贝充值卡号+渠道单号</span>
                     </a>
                     <a href="#" class="btns" onclick="hCopyOrder(event)">
                         <span><i class="icon-edit"></i>拷贝订单号</span>
@@ -421,8 +421,8 @@
         let str = ''
         $('#tbody tr').each(function () {
             let card_no = $(this).find('td').eq(4).text()
-            let channel_name = $(this).find('td').eq(15).text()
-            str += card_no + '+' + channel_name + '\n'
+            let channel_no = $(this).find('td').eq(14).text()
+            str += card_no + ' ' + channel_no + '\n'
         })
         let oInput = document.createElement("textarea");
         oInput.style.border = "0 none";

+ 4 - 0
admin/templates/default/refill.refund.php

@@ -57,6 +57,10 @@
                         <?php }?>
                     </select>
                 </td>
+                <th><label for="card_no">退款卡号</label></th>
+                <td><input type="text" value="<?php echo $_GET['card_no']; ?>" name="card_no"
+                           id="card_no" class="txt"></td>
+                </td>
 
                 <th><label for="query_start_time">退款日期</label></th>
                 <td>

+ 1 - 1
admin/templates/default/set.cancel.order.php

@@ -88,7 +88,7 @@
             <tr>
                 <th><label>客户名称</label></th>
                 <td class="layui-form">
-                    <select name="mchid" class="querySelect" lay-verify="">
+                    <select name="mchid" class="querySelect" lay-verify="" lay-search>
                         <option value=""><?php echo $lang['nc_please_choose']; ?></option>
                         <?php foreach ($output['merchant_list'] as $merchant) { ?>
                             <option value="<?php echo $merchant['mchid'] ?>"

+ 1 - 0
admin/templates/default/system.successful.php

@@ -5,6 +5,7 @@
             <ul class="tab-base">
                 <li><a href="?index.php&act=refill_successful&op=index&type=provider"><span>通道成功率监控</span></a></li>
                 <li><a href="JavaScript:void(0);" class="current"><span>平台成功率监控</span></a></li>
+                <li><a href="?index.php&act=refill_successful&op=merchant_ratios"><span>机构成功率统计</span></a></li>
             </ul>
         </div>
     </div>

+ 0 - 207
core/framework/libraries/logold.php

@@ -1,207 +0,0 @@
-<?php
-/**
- * 记录日志
- ***/
-defined('InShopNC') or exit('Access Invalid!');
-
-class scope_trace
-{
-    private $mTag;
-
-    public function __construct($tag)
-    {
-        $this->mTag = $tag;
-        Log::record("{$this->mTag} begin----------------------------", Log::DEBUG);
-    }
-
-    public function __destruct()
-    {
-        Log::record("{$this->mTag} end  ----------------------------", Log::DEBUG);
-    }
-}
-
-class Log
-{
-    const open_sql = true;
-    const SQL = 1;
-    const INFO = 2;
-    const DEBUG = 3;
-    const WARING = 4;
-    const ERR = 5;
-    const RUN = 6;
-    const WAIT_HANDLE = 10;
-    const cur_level = self::DEBUG;
-
-    private static $log = [];
-
-    private static $sqlog = false;
-
-    public static function start_sql_log()
-    {
-        self::$sqlog = [];
-    }
-
-    public static function sql_log()
-    {
-        if (is_array(self::$sqlog)) {
-            return self::$sqlog;
-        } else {
-            return [];
-        }
-    }
-
-    public static function end_sql_log()
-    {
-        self::$sqlog = false;
-    }
-
-    private static function add_sql_log($log)
-    {
-        if (is_array(self::$sqlog)) {
-            self::$sqlog[] = $log;
-        }
-    }
-
-    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-    static private $cur_path_file_name = '';
-    static private $cur_path_file;
-
-    public static function record_path($content)
-    {
-        $path_file = BASE_DATA_PATH . '/log/' . date('Ymd', time()) . '_path.log';
-        if (self::$cur_path_file_name != $path_file) {
-            if (self::$cur_path_file != null) {
-                fclose(self::$cur_path_file);
-            }
-            self::$cur_path_file = fopen($path_file, 'a');
-        }
-
-        if (@flock(self::$cur_path_file, LOCK_EX)) {
-            fwrite(self::$cur_path_file, $content);
-            fwrite(self::$cur_path_file, "\r\n");
-            @flock(self::$cur_path_file, LOCK_UN);
-        }
-    }
-
-    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-    public static function record($message, $lev = self::ERR)
-    {
-        $now = date('Y-m-d H:i:s', time());
-        $pid = posix_getpid();
-
-        if ($lev == self::WAIT_HANDLE) {
-            $level = 'WAIT_HANDLE';
-            $log_file = BASE_DATA_PATH . '/log/' . date('Ymd', time()) . '-wait.log';
-            $content = "[{$pid} {$now}] {$level}: {$message}\r\n";
-            file_put_contents($log_file, $content, FILE_APPEND);
-            return;
-        }
-
-        if ($lev == self::SQL) {
-            $level = 'SQL';
-            if (self::open_sql) {
-                self::write($message, $level);
-            }
-            return;
-        }
-
-        if ($lev >= self::cur_level && $lev <= self::RUN) {
-            $level = self::get_level($lev);
-            self::write($message, $level);
-        }
-
-        if ($lev == self::ERR) {
-            self::msg();
-        }
-    }
-
-    private static $cur_file_name;
-    private static $cur_file = null;
-
-    private static function write($message, $level)
-    {
-        $now = @date('Y-m-d H:i:s', time());
-        if(defined('USE_COROUTINE') && USE_COROUTINE === true) {
-            $pid = getmypid();
-            $cid = Swoole\Coroutine::getCid();
-
-            $pid = "{$pid}-{$cid}";
-        }
-        else {
-            $pid = posix_getpid();
-        }
-
-
-        $appid = empty(APP_ID) ? '' : APP_ID;
-
-        $log_file = BASE_DATA_PATH . '/log/' . date('Ymd', time()) . '-' . $appid . '.log';
-        if (self::$cur_file_name != $log_file) {
-            if (self::$cur_file != null) {
-                fclose(self::$cur_file);
-            }
-            self::$cur_file_name = $log_file;
-            self::$cur_file = fopen($log_file, 'a+');
-        }
-
-        $content = "[{$pid} {$now}] {$level}: {$message}\r\n";
-        $ret = fwrite(self::$cur_file, $content);
-        if ($ret === false) {
-            self::$cur_file = fopen($log_file, 'a+');
-            fwrite(self::$cur_file, $content);
-        }
-        fflush(self::$cur_file);
-    }
-
-    public static function endl($lev = self::ERR)
-    {
-        $content = "\r\n";
-
-        if ($lev == self::SQL && self::open_sql) {
-            $log_file = BASE_DATA_PATH . '/log/' . date('Ymd', time()) . '.log';
-            file_put_contents($log_file, $content, FILE_APPEND);
-            return;
-        }
-
-        if ($lev >= self::cur_level) {
-            $log_file = BASE_DATA_PATH . '/log/' . date('Ymd', time()) . '.log';
-            file_put_contents($log_file, $content, FILE_APPEND);
-        }
-    }
-
-    public static function msg()
-    {
-        $debugInfo = debug_backtrace();
-
-        $stack = "[";
-        foreach ($debugInfo as $key => $val) {
-            if (array_key_exists("file", $val)) {
-                $stack .= ",file:" . $val["file"];
-            }
-            if (array_key_exists("line", $val)) {
-                $stack .= ",line:" . $val["line"];
-            }
-            if (array_key_exists("function", $val)) {
-                $stack .= ",function:" . $val["function"];
-            }
-        }
-        $stack .= "]";
-
-        return $stack;
-    }
-
-    private static function get_level($lev)
-    {
-        if ($lev == self::INFO) return 'INFO';
-        if ($lev == self::DEBUG) return 'DEBUG';
-        if ($lev == self::WARING) return 'WARING';
-        if ($lev == self::ERR) return 'ERR';
-        if ($lev == self::RUN) return 'RUN';
-        return 'Unknown';
-    }
-
-    public static function read()
-    {
-        return self::$log;
-    }
-}

+ 138 - 54
data/config/win/refill.ini.php

@@ -1440,35 +1440,35 @@ $lingzhman48_phone = ['name' => 'lingzhman48', 'store_id' => 76, 'qualitys' => '
 $cangbu_phone = ['name' => 'cangbu', 'store_id' => 78,'qualitys' => '1',
     'amount' => [
         10 => [
-            ['goods_id' => 6744, 'price' => 9.55, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6744, 'price' => 9.54, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6744, 'price' => 9.45, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         20 => [
-            ['goods_id' => 6745, 'price' => 19.1, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6745, 'price' => 19.08, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6745, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         30 => [
-            ['goods_id' => 6746, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6746, 'price' => 28.62, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6746, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
         ],
         50 => [
-            ['goods_id' => 6747, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6747, 'price' => 47.7, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6747, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
         ],
         100 => [
-            ['goods_id' => 6748, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6748, 'price' => 95.4, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6748, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6749, 'price' => 191, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6749, 'price' => 190.8, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6749, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         300 => [
-            ['goods_id' => 6750, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6750, 'price' => 286.2, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6750, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         500 => [
-            ['goods_id' => 6751, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6751, 'price' => 477, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6751, 'price' => 472.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ]
     ],
@@ -2130,43 +2130,43 @@ $xianghongruifs_phone = ['name' => 'xianghongruifs', 'store_id' => 116, 'quality
 $yilin_phone = ['name' => 'yilin', 'store_id' => 115, 'qualitys' => '1',
     'amount' => [
         10 => [
-            ['goods_id' => 7003, 'price' => 9.58, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7003, 'price' => 9.57, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7003, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7003, 'price' => 9.54, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7003, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7004, 'price' => 19.16, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7004, 'price' => 19.14, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7004, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7004, 'price' => 19.08, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7004, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 7005, 'price' => 28.74, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7005, 'price' => 28.71, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7005, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7005, 'price' => 28.62, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7005, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7006, 'price' => 47.9, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7006, 'price' => 47.85, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7006, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7006, 'price' => 47.7, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7006, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7007, 'price' => 95.8, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7007, 'price' => 95.7, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7007, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7007, 'price' => 95.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7007, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7008, 'price' => 191.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7008, 'price' => 191.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7008, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7008, 'price' => 190.8, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7008, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 7009, 'price' => 287.4, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7009, 'price' => 287.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7009, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7009, 'price' => 286.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7009, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         500 => [
-            ['goods_id' => 7010, 'price' => 479, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7010, 'price' => 478.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7010, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7010, 'price' => 477, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7010, 'price' => 478, 'quality' => 1, 'card_type' => 'chinatelecom']
         ]
     ],
@@ -2311,82 +2311,82 @@ $yunchonggong_yd_phone = ['name' => 'yunchonggong_yd', 'store_id' => 120, 'quali
 $guochuang_nation_phone = ['name' => 'guochuang_nation', 'store_id' => 121, 'qualitys' => '2',
     'amount' => [
         1  => [
-            ['goods_id' => 7051, 'price' => 1.02, 'quality' => 2, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7051, 'price' => 1.029, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         2  => [
-            ['goods_id' => 7052, 'price' => 2.04, 'quality' => 2, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7052, 'price' => 2.058, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         3  => [
-            ['goods_id' => 7053, 'price' => 3.06, 'quality' => 2, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7053, 'price' => 3.087, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         4  => [
-            ['goods_id' => 7054, 'price' => 4.08, 'quality' => 2, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7054, 'price' => 4.116, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         5  => [
-            ['goods_id' => 7055, 'price' => 5.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7055, 'price' => 5.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7055, 'price' => 5.15, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7055, 'price' => 5.205, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7055, 'price' => 5.145, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7055, 'price' => 5.175, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         6  => [
-            ['goods_id' => 7056, 'price' => 6.18, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7056, 'price' => 6.12, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7056, 'price' => 6.18, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7056, 'price' => 6.206, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7056, 'price' => 6.174, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7056, 'price' => 6.21, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         7  => [
-            ['goods_id' => 7057, 'price' => 7.14, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7057, 'price' => 7.14, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7057, 'price' => 7.21, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7057, 'price' => 7.207, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7057, 'price' => 7.203, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7057, 'price' => 7.245, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         8  => [
-            ['goods_id' => 7058, 'price' => 8.16, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7058, 'price' => 8.16, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7058, 'price' => 8.24, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7058, 'price' => 8.208, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7058, 'price' => 8.232, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7058, 'price' => 8.28, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         9  => [
-            ['goods_id' => 7059, 'price' => 9.18, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7059, 'price' => 9.18, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7059, 'price' => 9.27, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7059, 'price' => 9.209, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7059, 'price' => 9.261, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7059, 'price' => 9.315, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         10 => [
             ['goods_id' => 7060, 'price' => 10.21, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7060, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7060, 'price' => 10.13, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7060, 'price' => 10.21, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
             ['goods_id' => 7061, 'price' => 20.22, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7061, 'price' => 20.52, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7061, 'price' => 20.26, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7061, 'price' => 20.22, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
             ['goods_id' => 7062, 'price' => 30.18, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7062, 'price' => 30.12, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7062, 'price' => 30.39, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7062, 'price' => 30.18, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7063, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 7064, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7064, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7064, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7064, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 7065, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7065, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7065, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7065, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
             ['goods_id' => 7066, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7066, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7066, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7066, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
             ['goods_id' => 7067, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7067, 'price' => 501, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7067, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7067, 'price' => 501, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -2489,6 +2489,88 @@ $hangtong_phone = ['name' => 'hangtong', 'store_id' => 126,'qualitys' => '1',
     ],
     'refill_type' => 'api'];
 
+$dashang_phone = ['name' => 'dashang', 'store_id' => 127, 'qualitys' => '2',
+    'amount' => [
+        10 => [
+            ['goods_id' => 7108, 'price' => 10.05, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7108, 'price' => 9.98, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 7109, 'price' => 20.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7109, 'price' => 19.96, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 7110, 'price' => 30.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7110, 'price' => 29.94, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7111, 'price' => 50.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7111, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7112, 'price' => 100.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7112, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7113, 'price' => 201, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7113, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 7114, 'price' => 301.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7114, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 7115, 'price' => 502.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7115, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$yuanta_phone = ['name' => 'yuanta', 'store_id' => 128, 'qualitys' => '5',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7116, 'price' => 9.18, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7116, 'price' => 9.15, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7116, 'price' => 9.56, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7117, 'price' => 18.36, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7117, 'price' => 18.3, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7117, 'price' => 19.12, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+//        30 => [
+//            ['goods_id' => 7118, 'price' => 27.54, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7118, 'price' => 27.45, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7118, 'price' => 28.68, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+        50 => [
+            ['goods_id' => 7119, 'price' => 45.9, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7119, 'price' => 45.75, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7119, 'price' => 47.8, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7120, 'price' => 91.8, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7120, 'price' => 91.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7120, 'price' => 95.6, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7121, 'price' => 183.6, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7121, 'price' => 183, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7121, 'price' => 191.2, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ]
+//        300 => [
+//            ['goods_id' => 7122, 'price' => 275.4, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7122, 'price' => 274.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7122, 'price' => 286.8, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7123, 'price' => 459, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7123, 'price' => 457.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7123, 'price' => 478, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -2585,6 +2667,8 @@ $phone_providers = [
     ['name' => 'zhongst_mix', 'cfg' => $zhongst_mix_phone],
     ['name' => 'jinfeng', 'cfg' => $jinfeng_phone],
     ['name' => 'hangtong', 'cfg' => $hangtong_phone],
+    ['name' => 'dashang', 'cfg' => $dashang_phone],
+    ['name' => 'yuanta', 'cfg' => $yuanta_phone],
 ];
 $config['phone_providers'] = $phone_providers;
 
@@ -2602,16 +2686,16 @@ $jumithird = ['name' => 'jumithird', 'store_id' => 111,'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$santi_flow = ['name' => 'santi_flow', 'store_id' => 111,'qualitys' => '1',
+$santi = ['name' => 'santi', 'store_id' => 129,'qualitys' => '1',
     'amount' => [
-        100 => [['goods_id' => 6978, 'price' => 99, 'quality' => 1, 'card_type' => 'third']],
+        100 => [['goods_id' => 7124, 'price' => 99, 'quality' => 1, 'card_type' => 'third']],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
 $third_providers = [
     ['name' => 'lingzhthird', 'cfg' => $lingzhthird],
 //    ['name' => 'jumithird', 'cfg' => $jumithird],
-//    ['name' => 'santi_flow', 'cfg' => $santi_flow]
+    ['name' => 'santi', 'cfg' => $santi]
 ];
 $config['third_providers'] = $third_providers;
 

+ 142 - 58
data/config/xyz/refill.ini.php

@@ -199,11 +199,11 @@ $xunyinoil_oil = ['name' => 'xunyinoil', 'store_id' => 109,'qualitys' => '2',
             ['goods_id' => 6965, 'price' => 50.25, 'quality' => 2, 'card_type' => 'petrochina']
         ],
         100 => [
-            ['goods_id' => 6966, 'price' => 101, 'quality' => 2, 'card_type' => 'sinopec'],
+            ['goods_id' => 6966, 'price' => 100.8, 'quality' => 2, 'card_type' => 'sinopec'],
             ['goods_id' => 6966, 'price' => 100.5, 'quality' => 2, 'card_type' => 'petrochina']
         ],
         200 => [
-            ['goods_id' => 6967, 'price' => 202, 'quality' => 2, 'card_type' => 'sinopec'],
+            ['goods_id' => 6967, 'price' => 201.6, 'quality' => 2, 'card_type' => 'sinopec'],
             ['goods_id' => 6967, 'price' => 201, 'quality' => 2, 'card_type' => 'petrochina']
         ],
         500 => [
@@ -1440,35 +1440,35 @@ $lingzhman48_phone = ['name' => 'lingzhman48', 'store_id' => 76, 'qualitys' => '
 $cangbu_phone = ['name' => 'cangbu', 'store_id' => 78,'qualitys' => '1',
     'amount' => [
         10 => [
-            ['goods_id' => 6744, 'price' => 9.55, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6744, 'price' => 9.54, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6744, 'price' => 9.45, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         20 => [
-            ['goods_id' => 6745, 'price' => 19.1, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6745, 'price' => 19.08, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6745, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         30 => [
-            ['goods_id' => 6746, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6746, 'price' => 28.62, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6746, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
         ],
         50 => [
-            ['goods_id' => 6747, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6747, 'price' => 47.7, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6747, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
         ],
         100 => [
-            ['goods_id' => 6748, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6748, 'price' => 95.4, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6748, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6749, 'price' => 191, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6749, 'price' => 190.8, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6749, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         300 => [
-            ['goods_id' => 6750, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6750, 'price' => 286.2, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6750, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         500 => [
-            ['goods_id' => 6751, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6751, 'price' => 477, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6751, 'price' => 472.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ]
     ],
@@ -2130,43 +2130,43 @@ $xianghongruifs_phone = ['name' => 'xianghongruifs', 'store_id' => 116, 'quality
 $yilin_phone = ['name' => 'yilin', 'store_id' => 115, 'qualitys' => '1',
     'amount' => [
         10 => [
-            ['goods_id' => 7003, 'price' => 9.58, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7003, 'price' => 9.57, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7003, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7003, 'price' => 9.54, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7003, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7004, 'price' => 19.16, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7004, 'price' => 19.14, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7004, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7004, 'price' => 19.08, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7004, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 7005, 'price' => 28.74, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7005, 'price' => 28.71, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7005, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7005, 'price' => 28.62, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7005, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7006, 'price' => 47.9, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7006, 'price' => 47.85, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7006, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7006, 'price' => 47.7, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7006, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7007, 'price' => 95.8, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7007, 'price' => 95.7, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7007, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7007, 'price' => 95.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7007, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7008, 'price' => 191.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7008, 'price' => 191.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7008, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7008, 'price' => 190.8, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7008, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 7009, 'price' => 287.4, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7009, 'price' => 287.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7009, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7009, 'price' => 286.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7009, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         500 => [
-            ['goods_id' => 7010, 'price' => 479, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7010, 'price' => 478.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7010, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7010, 'price' => 477, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7010, 'price' => 478, 'quality' => 1, 'card_type' => 'chinatelecom']
         ]
     ],
@@ -2311,82 +2311,82 @@ $yunchonggong_yd_phone = ['name' => 'yunchonggong_yd', 'store_id' => 120, 'quali
 $guochuang_nation_phone = ['name' => 'guochuang_nation', 'store_id' => 121, 'qualitys' => '2',
     'amount' => [
         1  => [
-            ['goods_id' => 7051, 'price' => 1.02, 'quality' => 2, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7051, 'price' => 1.029, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         2  => [
-            ['goods_id' => 7052, 'price' => 2.04, 'quality' => 2, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7052, 'price' => 2.058, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         3  => [
-            ['goods_id' => 7053, 'price' => 3.06, 'quality' => 2, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7053, 'price' => 3.087, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         4  => [
-            ['goods_id' => 7054, 'price' => 4.08, 'quality' => 2, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7054, 'price' => 4.116, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         5  => [
-            ['goods_id' => 7055, 'price' => 5.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7055, 'price' => 5.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7055, 'price' => 5.15, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7055, 'price' => 5.205, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7055, 'price' => 5.145, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7055, 'price' => 5.175, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         6  => [
-            ['goods_id' => 7056, 'price' => 6.18, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7056, 'price' => 6.12, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7056, 'price' => 6.18, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7056, 'price' => 6.206, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7056, 'price' => 6.174, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7056, 'price' => 6.21, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         7  => [
-            ['goods_id' => 7057, 'price' => 7.14, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7057, 'price' => 7.14, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7057, 'price' => 7.21, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7057, 'price' => 7.207, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7057, 'price' => 7.203, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7057, 'price' => 7.245, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         8  => [
-            ['goods_id' => 7058, 'price' => 8.16, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7058, 'price' => 8.16, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7058, 'price' => 8.24, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7058, 'price' => 8.208, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7058, 'price' => 8.232, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7058, 'price' => 8.28, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         9  => [
-            ['goods_id' => 7059, 'price' => 9.18, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7059, 'price' => 9.18, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7059, 'price' => 9.27, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7059, 'price' => 9.209, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7059, 'price' => 9.261, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7059, 'price' => 9.315, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         10 => [
             ['goods_id' => 7060, 'price' => 10.21, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7060, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7060, 'price' => 10.13, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7060, 'price' => 10.21, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
             ['goods_id' => 7061, 'price' => 20.22, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7061, 'price' => 20.52, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7061, 'price' => 20.26, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7061, 'price' => 20.22, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
             ['goods_id' => 7062, 'price' => 30.18, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7062, 'price' => 30.12, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7062, 'price' => 30.39, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7062, 'price' => 30.18, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7063, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 7064, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7064, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7064, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7064, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 7065, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7065, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7065, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7065, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
             ['goods_id' => 7066, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7066, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7066, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7066, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
             ['goods_id' => 7067, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7067, 'price' => 501, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7067, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7067, 'price' => 501, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -2489,6 +2489,88 @@ $hangtong_phone = ['name' => 'hangtong', 'store_id' => 126,'qualitys' => '1',
     ],
     'refill_type' => 'api'];
 
+$dashang_phone = ['name' => 'dashang', 'store_id' => 127, 'qualitys' => '2',
+    'amount' => [
+        10 => [
+            ['goods_id' => 7108, 'price' => 10.05, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7108, 'price' => 9.98, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 7109, 'price' => 20.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7109, 'price' => 19.96, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 7110, 'price' => 30.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7110, 'price' => 29.94, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7111, 'price' => 50.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7111, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7112, 'price' => 100.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7112, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7113, 'price' => 201, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7113, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 7114, 'price' => 301.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7114, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 7115, 'price' => 502.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7115, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$yuanta_phone = ['name' => 'yuanta', 'store_id' => 128, 'qualitys' => '5',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7116, 'price' => 9.18, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7116, 'price' => 9.15, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7116, 'price' => 9.56, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7117, 'price' => 18.36, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7117, 'price' => 18.3, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7117, 'price' => 19.12, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+//        30 => [
+//            ['goods_id' => 7118, 'price' => 27.54, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7118, 'price' => 27.45, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7118, 'price' => 28.68, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+        50 => [
+            ['goods_id' => 7119, 'price' => 45.9, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7119, 'price' => 45.75, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7119, 'price' => 47.8, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7120, 'price' => 91.8, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7120, 'price' => 91.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7120, 'price' => 95.6, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7121, 'price' => 183.6, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7121, 'price' => 183, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7121, 'price' => 191.2, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ]
+//        300 => [
+//            ['goods_id' => 7122, 'price' => 275.4, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7122, 'price' => 274.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7122, 'price' => 286.8, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7123, 'price' => 459, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7123, 'price' => 457.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7123, 'price' => 478, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -2579,12 +2661,14 @@ $phone_providers = [
     ['name' => 'yikatong', 'cfg' => $yikatong_phone],
     ['name' => 'sialan_tax', 'cfg' => $sialan_tax_phone],
     ['name' => 'yunchonggong_yd', 'cfg' => $yunchonggong_yd_phone],
-//    ['name' => 'guochuang_nation', 'cfg' => $guochuang_nation_phone],
+    ['name' => 'guochuang_nation', 'cfg' => $guochuang_nation_phone],
     ['name' => 'tianyanman', 'cfg' => $tianyanman_phone],
     ['name' => 'shimier', 'cfg' => $shimier_phone],
     ['name' => 'zhongst_mix', 'cfg' => $zhongst_mix_phone],
     ['name' => 'jinfeng', 'cfg' => $jinfeng_phone],
     ['name' => 'hangtong', 'cfg' => $hangtong_phone],
+    ['name' => 'dashang', 'cfg' => $dashang_phone],
+    ['name' => 'yuanta', 'cfg' => $yuanta_phone],
 ];
 $config['phone_providers'] = $phone_providers;
 
@@ -2602,16 +2686,16 @@ $jumithird = ['name' => 'jumithird', 'store_id' => 111,'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$santi_flow = ['name' => 'santi_flow', 'store_id' => 111,'qualitys' => '1',
+$santi = ['name' => 'santi', 'store_id' => 129,'qualitys' => '1',
     'amount' => [
-        100 => [['goods_id' => 6978, 'price' => 99, 'quality' => 1, 'card_type' => 'third']],
+        100 => [['goods_id' => 7124, 'price' => 99, 'quality' => 1, 'card_type' => 'third']],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
 $third_providers = [
     ['name' => 'lingzhthird', 'cfg' => $lingzhthird],
 //    ['name' => 'jumithird', 'cfg' => $jumithird],
-//    ['name' => 'santi_flow', 'cfg' => $santi_flow]
+    ['name' => 'santi', 'cfg' => $santi]
 ];
 $config['third_providers'] = $third_providers;
 
@@ -2633,7 +2717,7 @@ $config['merchant_retry_times'] = [
     ],
     10216 => [
         'qualities' => [1 => ['secs' => 530, 'times' => 100], 2 => ['secs' => 70, 'times' => 5]],
-        'lower_ratio' => ['ratio' => 0.6,'period' => 3600]
+        'lower_ratio' => ['ratio' => 0.4,'period' => 3600]
     ],
     10217 => [
         'qualities' => [1 => ['secs' => 530, 'times' => 100], 2 => ['secs' => 70, 'times' => 5]],

+ 142 - 58
data/config/xyzadm/refill.ini.php

@@ -199,11 +199,11 @@ $xunyinoil_oil = ['name' => 'xunyinoil', 'store_id' => 109,'qualitys' => '2',
             ['goods_id' => 6965, 'price' => 50.25, 'quality' => 2, 'card_type' => 'petrochina']
         ],
         100 => [
-            ['goods_id' => 6966, 'price' => 101, 'quality' => 2, 'card_type' => 'sinopec'],
+            ['goods_id' => 6966, 'price' => 100.8, 'quality' => 2, 'card_type' => 'sinopec'],
             ['goods_id' => 6966, 'price' => 100.5, 'quality' => 2, 'card_type' => 'petrochina']
         ],
         200 => [
-            ['goods_id' => 6967, 'price' => 202, 'quality' => 2, 'card_type' => 'sinopec'],
+            ['goods_id' => 6967, 'price' => 201.6, 'quality' => 2, 'card_type' => 'sinopec'],
             ['goods_id' => 6967, 'price' => 201, 'quality' => 2, 'card_type' => 'petrochina']
         ],
         500 => [
@@ -1440,35 +1440,35 @@ $lingzhman48_phone = ['name' => 'lingzhman48', 'store_id' => 76, 'qualitys' => '
 $cangbu_phone = ['name' => 'cangbu', 'store_id' => 78,'qualitys' => '1',
     'amount' => [
         10 => [
-            ['goods_id' => 6744, 'price' => 9.55, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6744, 'price' => 9.54, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6744, 'price' => 9.45, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         20 => [
-            ['goods_id' => 6745, 'price' => 19.1, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6745, 'price' => 19.08, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6745, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         30 => [
-            ['goods_id' => 6746, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6746, 'price' => 28.62, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6746, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
         ],
         50 => [
-            ['goods_id' => 6747, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6747, 'price' => 47.7, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6747, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
         ],
         100 => [
-            ['goods_id' => 6748, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6748, 'price' => 95.4, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6748, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6749, 'price' => 191, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6749, 'price' => 190.8, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6749, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         300 => [
-            ['goods_id' => 6750, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6750, 'price' => 286.2, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6750, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         500 => [
-            ['goods_id' => 6751, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6751, 'price' => 477, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6751, 'price' => 472.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ]
     ],
@@ -2130,43 +2130,43 @@ $xianghongruifs_phone = ['name' => 'xianghongruifs', 'store_id' => 116, 'quality
 $yilin_phone = ['name' => 'yilin', 'store_id' => 115, 'qualitys' => '1',
     'amount' => [
         10 => [
-            ['goods_id' => 7003, 'price' => 9.58, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7003, 'price' => 9.57, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7003, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7003, 'price' => 9.54, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7003, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7004, 'price' => 19.16, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7004, 'price' => 19.14, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7004, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7004, 'price' => 19.08, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7004, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 7005, 'price' => 28.74, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7005, 'price' => 28.71, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7005, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7005, 'price' => 28.62, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7005, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7006, 'price' => 47.9, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7006, 'price' => 47.85, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7006, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7006, 'price' => 47.7, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7006, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7007, 'price' => 95.8, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7007, 'price' => 95.7, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7007, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7007, 'price' => 95.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7007, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7008, 'price' => 191.6, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7008, 'price' => 191.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7008, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7008, 'price' => 190.8, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7008, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 7009, 'price' => 287.4, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7009, 'price' => 287.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7009, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7009, 'price' => 286.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7009, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         500 => [
-            ['goods_id' => 7010, 'price' => 479, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7010, 'price' => 478.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7010, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7010, 'price' => 477, 'quality' => 1, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7010, 'price' => 478, 'quality' => 1, 'card_type' => 'chinatelecom']
         ]
     ],
@@ -2311,82 +2311,82 @@ $yunchonggong_yd_phone = ['name' => 'yunchonggong_yd', 'store_id' => 120, 'quali
 $guochuang_nation_phone = ['name' => 'guochuang_nation', 'store_id' => 121, 'qualitys' => '2',
     'amount' => [
         1  => [
-            ['goods_id' => 7051, 'price' => 1.02, 'quality' => 2, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7051, 'price' => 1.029, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         2  => [
-            ['goods_id' => 7052, 'price' => 2.04, 'quality' => 2, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7052, 'price' => 2.058, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         3  => [
-            ['goods_id' => 7053, 'price' => 3.06, 'quality' => 2, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7053, 'price' => 3.087, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         4  => [
-            ['goods_id' => 7054, 'price' => 4.08, 'quality' => 2, 'card_type' => 'chinaunicom']
+            ['goods_id' => 7054, 'price' => 4.116, 'quality' => 2, 'card_type' => 'chinaunicom']
         ],
         5  => [
-            ['goods_id' => 7055, 'price' => 5.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7055, 'price' => 5.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7055, 'price' => 5.15, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7055, 'price' => 5.205, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7055, 'price' => 5.145, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7055, 'price' => 5.175, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         6  => [
-            ['goods_id' => 7056, 'price' => 6.18, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7056, 'price' => 6.12, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7056, 'price' => 6.18, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7056, 'price' => 6.206, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7056, 'price' => 6.174, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7056, 'price' => 6.21, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         7  => [
-            ['goods_id' => 7057, 'price' => 7.14, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7057, 'price' => 7.14, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7057, 'price' => 7.21, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7057, 'price' => 7.207, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7057, 'price' => 7.203, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7057, 'price' => 7.245, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         8  => [
-            ['goods_id' => 7058, 'price' => 8.16, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7058, 'price' => 8.16, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7058, 'price' => 8.24, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7058, 'price' => 8.208, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7058, 'price' => 8.232, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7058, 'price' => 8.28, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         9  => [
-            ['goods_id' => 7059, 'price' => 9.18, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7059, 'price' => 9.18, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7059, 'price' => 9.27, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7059, 'price' => 9.209, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7059, 'price' => 9.261, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7059, 'price' => 9.315, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         10 => [
             ['goods_id' => 7060, 'price' => 10.21, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7060, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7060, 'price' => 10.13, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7060, 'price' => 10.21, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
             ['goods_id' => 7061, 'price' => 20.22, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7061, 'price' => 20.52, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7061, 'price' => 20.26, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7061, 'price' => 20.22, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
             ['goods_id' => 7062, 'price' => 30.18, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7062, 'price' => 30.12, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7062, 'price' => 30.39, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7062, 'price' => 30.18, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7063, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7063, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 7064, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7064, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7064, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7064, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 7065, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7065, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7065, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7065, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
             ['goods_id' => 7066, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7066, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7066, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7066, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
             ['goods_id' => 7067, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7067, 'price' => 501, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7067, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7067, 'price' => 501, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -2489,6 +2489,88 @@ $hangtong_phone = ['name' => 'hangtong', 'store_id' => 126,'qualitys' => '1',
     ],
     'refill_type' => 'api'];
 
+$dashang_phone = ['name' => 'dashang', 'store_id' => 127, 'qualitys' => '2',
+    'amount' => [
+        10 => [
+            ['goods_id' => 7108, 'price' => 10.05, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7108, 'price' => 9.98, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 7109, 'price' => 20.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7109, 'price' => 19.96, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 7110, 'price' => 30.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7110, 'price' => 29.94, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7111, 'price' => 50.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7111, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7112, 'price' => 100.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7112, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7113, 'price' => 201, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7113, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 7114, 'price' => 301.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7114, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 7115, 'price' => 502.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7115, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$yuanta_phone = ['name' => 'yuanta', 'store_id' => 128, 'qualitys' => '5',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7116, 'price' => 9.18, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7116, 'price' => 9.15, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7116, 'price' => 9.56, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7117, 'price' => 18.36, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7117, 'price' => 18.3, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7117, 'price' => 19.12, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+//        30 => [
+//            ['goods_id' => 7118, 'price' => 27.54, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7118, 'price' => 27.45, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7118, 'price' => 28.68, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+        50 => [
+            ['goods_id' => 7119, 'price' => 45.9, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7119, 'price' => 45.75, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7119, 'price' => 47.8, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7120, 'price' => 91.8, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7120, 'price' => 91.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7120, 'price' => 95.6, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7121, 'price' => 183.6, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7121, 'price' => 183, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7121, 'price' => 191.2, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ]
+//        300 => [
+//            ['goods_id' => 7122, 'price' => 275.4, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7122, 'price' => 274.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7122, 'price' => 286.8, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7123, 'price' => 459, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7123, 'price' => 457.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7123, 'price' => 478, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -2579,12 +2661,14 @@ $phone_providers = [
     ['name' => 'yikatong', 'cfg' => $yikatong_phone],
     ['name' => 'sialan_tax', 'cfg' => $sialan_tax_phone],
     ['name' => 'yunchonggong_yd', 'cfg' => $yunchonggong_yd_phone],
-//    ['name' => 'guochuang_nation', 'cfg' => $guochuang_nation_phone],
+    ['name' => 'guochuang_nation', 'cfg' => $guochuang_nation_phone],
     ['name' => 'tianyanman', 'cfg' => $tianyanman_phone],
     ['name' => 'shimier', 'cfg' => $shimier_phone],
     ['name' => 'zhongst_mix', 'cfg' => $zhongst_mix_phone],
     ['name' => 'jinfeng', 'cfg' => $jinfeng_phone],
     ['name' => 'hangtong', 'cfg' => $hangtong_phone],
+    ['name' => 'dashang', 'cfg' => $dashang_phone],
+    ['name' => 'yuanta', 'cfg' => $yuanta_phone],
 ];
 $config['phone_providers'] = $phone_providers;
 
@@ -2602,16 +2686,16 @@ $jumithird = ['name' => 'jumithird', 'store_id' => 111,'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$santi_flow = ['name' => 'santi_flow', 'store_id' => 111,'qualitys' => '1',
+$santi = ['name' => 'santi', 'store_id' => 129,'qualitys' => '1',
     'amount' => [
-        100 => [['goods_id' => 6978, 'price' => 99, 'quality' => 1, 'card_type' => 'third']],
+        100 => [['goods_id' => 7124, 'price' => 99, 'quality' => 1, 'card_type' => 'third']],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
 $third_providers = [
     ['name' => 'lingzhthird', 'cfg' => $lingzhthird],
 //    ['name' => 'jumithird', 'cfg' => $jumithird],
-//    ['name' => 'santi_flow', 'cfg' => $santi_flow]
+    ['name' => 'santi', 'cfg' => $santi]
 ];
 $config['third_providers'] = $third_providers;
 
@@ -2633,7 +2717,7 @@ $config['merchant_retry_times'] = [
     ],
     10216 => [
         'qualities' => [1 => ['secs' => 530, 'times' => 100], 2 => ['secs' => 70, 'times' => 5]],
-        'lower_ratio' => ['ratio' => 0.6,'period' => 3600]
+        'lower_ratio' => ['ratio' => 0.4,'period' => 3600]
     ],
     10217 => [
         'qualities' => [1 => ['secs' => 530, 'times' => 100], 2 => ['secs' => 70, 'times' => 5]],

+ 5 - 0
data/model/refill_order.model.php

@@ -9,6 +9,11 @@ defined('InShopNC') or exit('Access Invalid!');
 
 class refill_orderModel extends Model
 {
+    public function __construct($table = null)
+    {
+        parent::__construct($table);
+    }
+
     public function getOrderInfo($condition = [], $fields = '*', $master = false, $lock = false)
     {
         $order_info = $this->table('refill_order')->field($fields)->where($condition)->order('')->master($master)->lock($lock)->find();

+ 20 - 0
docker/compose/xyz/accip/docker-compose.yml

@@ -0,0 +1,20 @@
+version: "3.7"
+
+services:
+  nginxipsrv:
+    image: nginx:alpine
+    ports:
+      - "8080:80"
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/nginx/nginxip.conf:/etc/nginx/nginx.conf:ro
+      - /nfs/upload:/var/www/html/data/upload
+    container_name: "panda-nginxip"
+    command: [nginx,'-g','daemon off;']
+    extra_hosts:
+      - "docker.hostip:172.17.0.1"
+    deploy:
+      resources:
+        limits:
+          cpus: '8'

+ 127 - 0
docker/compose/xyz/conf/nginx/nginxip.conf

@@ -0,0 +1,127 @@
+user nginx;
+worker_processes  16;
+error_log   /var/error.log  info;
+worker_rlimit_nofile 10240;
+
+events {
+    worker_connections  8192;
+    multi_accept on;
+    use epoll;
+}
+
+http 
+{
+    include       mime.types;
+    default_type  application/octet-stream;
+    fastcgi_buffer_size 32k;
+    fastcgi_buffers 8 32k;
+    underscores_in_headers on;
+    client_max_body_size 1024M;
+    tcp_nopush on;
+
+    sendfile            on;
+    keepalive_timeout   300;
+
+    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
+                      '$status $body_bytes_sent "$http_referer" '
+                      '"$http_user_agent" "$http_x_forwarded_for"';
+
+    server 
+    {
+    	listen       80;
+        set  $folder_name /var/www/html;
+        server_name 39.99.250.4;
+        root $folder_name;
+        index index.html index.php; 
+    	client_max_body_size 100m;
+    	proxy_connect_timeout 500s;
+        proxy_read_timeout 500s;
+        proxy_send_timeout 500s;
+        fastcgi_connect_timeout 75;
+        fastcgi_read_timeout 600;   
+        fastcgi_send_timeout 600;
+
+        set_real_ip_from 100.64.0.0/10;
+        real_ip_header X-Forwarded-For;
+
+        charset utf-8;
+        
+        location /logs {
+            deny all;
+            return 403;
+        }
+
+        location /data/log {
+            deny all;
+            return 403;
+        }
+        location / {
+            index  index.html index.htm index.php;
+        }
+        
+        location /mshop {
+            root $folder_name;
+            autoindex on;        
+            index  index.html index.htm index.php;
+	        try_files $uri $uri/ /mshop/index.html;
+        }
+
+        location /plot {
+            root $folder_name;
+            proxy_pass         http://172.26.105.126:5000;
+            proxy_redirect     off;
+
+            proxy_set_header   Host                 $host;
+            proxy_set_header   X-Real-IP            $remote_addr;
+            proxy_set_header   X-Forwarded-For      $proxy_add_x_forwarded_for;
+            proxy_set_header   X-Forwarded-Proto    $scheme;
+        }
+
+        location /merchant {
+            root $folder_name;
+            autoindex on;
+            index  index.html index.htm index.php;
+            try_files $uri $uri/ /merchant/index.html;
+        }
+
+        location ~ /mobile/[/\w]+\.php$ {
+            root           $folder_name;
+            fastcgi_pass   docker.hostip:9100;
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            fastcgi_param  SIGN $http_sign;
+            include fastcgi_params;
+        }
+
+        location ~ /mobile/[/\w]+\.html$ {
+            try_files $uri $uri/ /mobile/index.html;
+        }
+
+        location ~ /racc/[/\w]+\.php$ {
+            root           $folder_name;
+            fastcgi_pass   docker.hostip:9101;
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            fastcgi_param  SIGN $http_sign;
+            include fastcgi_params;
+        }
+
+        location ~ /mchsrv/[/\w]+\.php$ {
+            root           $folder_name;
+            fastcgi_pass   172.26.80.6:9102;
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            fastcgi_param SIGN $http_sign;
+            include fastcgi_params;
+        }
+
+        location ~ \.php$ {
+	        add_header Cache-Control no-store;
+            root           $folder_name;
+            fastcgi_pass   172.26.80.6:9000;
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            include        fastcgi_params;
+        }
+    }
+}

+ 1 - 0
helper/refill/CalcMerchantPrice.php

@@ -13,6 +13,7 @@ use Log;
 class CalcMerchantPrice implements ICalc
 {
     private $mPrice;
+
     public function __construct($mchid,$spec,$card_type,$quality,$policy,$other = [])
     {
         if(empty($other) || empty($other['product_code'])) {

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

@@ -0,0 +1,50 @@
+<?php
+namespace refill\dashang;
+
+require_once(BASE_HELPER_RAPI_PATH . '/dashang/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/RefillPhone.php

@@ -0,0 +1,159 @@
+<?php
+declare(strict_types=0);
+
+namespace refill\dashang;
+
+require_once(BASE_HELPER_RAPI_PATH . '/dashang/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, false];
+            } 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']];
+            } 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);
+    }
+}

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

@@ -0,0 +1,42 @@
+<?php
+
+
+namespace refill\dashang;
+
+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= '80800346';
+    const KEY = 'bb9c64bbd8937e03ca73f9d7b29a17af';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_dashang.php";
+
+    const Products = [
+        mtopcard\ChinaUnicomCard =>
+            [
+                10  => 90330010,
+                20  => 90330020,
+                30  => 90330030,
+                50  => 90330050,
+                100 => 90330100,
+                200 => 90330200,
+                300 => 90330300,
+                500 => 90330500
+            ],
+        mtopcard\ChinaTelecomCard =>
+            [
+                10  => 90290010,
+                20  => 90290020,
+                30  => 90290030,
+                50  => 90290050,
+                100 => 90290100,
+                200 => 90290200,
+                300 => 90290300,
+                500 => 90290500
+            ]
+    ];
+}

二進制
helper/refill/api/xyz/dashang/下游对接供货接口.docx


+ 31 - 0
helper/refill/api/xyz/dashang/开户信息-1.txt

@@ -0,0 +1,31 @@
+ 开户信息如下:
+北京国研方略信息科学研究院
+查单平台:http://bm.jiaoyi101.com
+登录名:gyflbill
+初始密码:sup123456
+对接信息
+userId:80800346
+key: bb9c64bbd8937e03ca73f9d7b29a17af
+下单:http://47.114.209.57/unicomAync/buy.do
+查询:http://47.114.209.57/unicomAync/queryBizOrder.do
+余额:http://47.114.209.57/unicomAync/queryBalance.do
+
+
+联通沃支付
+90330010 中国联通-官方10
+90330020 中国联通-官方20
+90330030 中国联通-官方30
+90330050 中国联通-官方50
+90330100 中国联通-官方100
+90330200 中国联通-官方200
+90330300 中国联通-官方300
+90330500 中国联通-官方500
+电信电渠
+90290010 中国电信-电渠10
+90290020 中国电信-电渠20
+90290030 中国电信-电渠30
+90290050 中国电信-电渠50
+90290100 中国电信-电渠100
+90290200 中国电信-电渠200
+90290300 中国电信-电渠300
+90290500 中国电信-电渠500

二進制
helper/refill/api/xyz/guochuang/20210918电信更新.png


二進制
helper/refill/api/xyz/guochuang/20210918移动更新.png


二進制
helper/refill/api/xyz/guochuang/20210918联通更新.png


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

@@ -64,29 +64,29 @@ 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.71, "4-20-6" => 19.42, "4-30-6" => 29.13, "4-50-6" => 48.55, "4-100-6" => 97.1, "4-200-6" => 194.2, "4-300-6" => 291.3, "4-500-6" => 485.5,//辽宁 6
+        "4-10-6" => 9.718, "4-20-6" => 19.436, "4-30-6" => 29.154, "4-50-6" => 48.59, "4-100-6" => 97.18, "4-200-6" => 194.36, "4-300-6" => 291.54, "4-500-6" => 485.9,//辽宁 6
         "4-10-9" => 9.9, "4-20-9" => 19.8, "4-30-9" => 29.7, "4-50-9" => 49.5, "4-100-9" => 99,//上海 9
         "4-10-8" => 9.95, "4-20-8" => 19.9, "4-30-8" => 29.85, "4-50-8" => 49.75, "4-100-8" => 99.5, "4-200-8" => 199, "4-300-8" => 298.5, "4-500-8" => 497.5,//黑龙江 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
-        "4-10-28" => 9.92, "4-20-28" => 19.84, "4-30-28" => 29.76, "4-50-28" => 49.6, "4-100-28" => 99.2, "4-200-28" => 198.4, "4-300-28" => 297.6, "4-500-28" => 496,//甘肃 28
-        "4-10-13" => 10.01, "4-20-13" => 20.02, "4-30-13" => 30.03, "4-50-13" => 50.5, "4-100-13" => 100.1, "4-200-13" => 200.2, "4-300-13" => 300.3, "4-500-13" => 500.5,//福建 13
-        "4-10-5" => 9.97, "4-20-5" => 19.94, "4-30-5" => 29.91, "4-50-5" => 49.85, "4-100-5" => 99.7, "4-200-5" => 199.4, "4-300-5" => 299.1, "4-500-5" => 498.5,//内蒙古 5
-        "4-50-18" => 49.55, "4-100-18" => 99.1, "4-200-18" => 198.2,//湖南 18
-        "4-10-19" => 9.96, "4-20-19" => 19.92, "4-30-19" => 29.88, "4-50-19" => 49.8, "4-100-19" => 99.6, "4-200-19" => 199.2, "4-300-19" => 298.8, "4-500-19" => 498,//广东 19
-        "4-10-7" => 9.93, "4-20-7" => 19.86, "4-30-7" => 29.79, "4-50-7" => 49.65, "4-100-7" => 99.3, "4-200-7" => 198.6, "4-300-7" => 297.9, "4-500-7" => 496.5,//吉林 7
+        "4-10-28" => 9.925, "4-20-28" => 19.85, "4-30-28" => 29.775, "4-50-28" => 49.625, "4-100-28" => 99.25, "4-200-28" => 198.5, "4-300-28" => 297.75, "4-500-28" => 496.25,//甘肃 28
+        "4-10-13" => 10.02, "4-20-13" => 20.04, "4-30-13" => 30.06, "4-50-13" => 51, "4-100-13" => 100.2, "4-200-13" => 200.4, "4-300-13" => 300.6, "4-500-13" => 501,//福建 13
+        "4-10-5" => 9.965, "4-20-5" => 19.93, "4-30-5" => 29.895, "4-50-5" => 49.825, "4-100-5" => 99.65, "4-200-5" => 199.3, "4-300-5" => 298.95, "4-500-5" => 498.25,//内蒙古 5
+        "4-50-18" => 49.575, "4-100-18" => 99.15, "4-200-18" => 198.3,//湖南 18
+        "4-10-19" => 9.965, "4-20-19" => 19.93, "4-30-19" => 29.895, "4-50-19" => 49.825, "4-100-19" => 99.65, "4-200-19" => 199.3, "4-300-19" => 298.95, "4-500-19" => 498.25,//广东 19
+        "4-10-7" => 9.85, "4-20-7" => 19.7, "4-30-7" => 29.55, "4-50-7" => 49.25, "4-100-7" => 98.5, "4-200-7" => 197, "4-300-7" => 295.5, "4-500-7" => 492.5,//吉林 7
         "4-10-1" => 9.99, "4-20-1" => 19.98, "4-30-1" => 29.97, "4-50-1" => 49.95, "4-100-1" => 99.9, "4-200-1" => 199.8, "4-300-1" => 299.7, "4-500-1" => 499.5,//北京 1
-        "4-20-22" => 20, "4-30-22" => 30, "4-50-22" => 50, "4-100-22" => 100, "4-200-22" => 200, "4-300-22" => 300, "4-500-22" => 500,//重庆 22
-        "4-10-15" => 9.94, "4-20-15" => 19.88, "4-30-15" => 29.82, "4-50-15" => 49.7, "4-100-15" => 99.4, "4-200-15" => 198.8, "4-300-15" => 298.2, "4-500-15" => 497,//山东 15
-        "4-10-10" => 9.94, "4-20-10" => 19.88, "4-30-10" => 29.82, "4-50-10" => 49.7, "4-100-10" => 99.4, "4-200-10" => 198.8, "4-300-10" => 298.2, "4-500-10" => 497,//江苏 10
-        "4-10-11" => 9.94, "4-20-11" => 19.88, "4-30-11" => 29.82, "4-50-11" => 49.7, "4-100-11" => 99.4, "4-200-11" => 198.8, "4-300-11" => 298.2, "4-500-11" => 497,//浙江 11
-        "4-10-17" => 9.94, "4-20-17" => 19.88, "4-30-17" => 29.82, "4-50-17" => 49.7, "4-100-17" => 99.4, "4-200-17" => 198.8, "4-300-17" => 298.2, "4-500-17" => 497,//湖北 17
-        "4-30-16" => 29.82, "4-50-16" => 49.7, "4-100-16" => 99.4, "4-200-16" => 198.8,//河南 16
+        "4-20-22" => 20.01, "4-30-22" => 30.015, "4-50-22" => 50.025, "4-100-22" => 100.05, "4-200-22" => 200.1, "4-300-22" => 300.15, "4-500-22" => 500.25,//重庆 22
+        "4-10-15" => 9.945, "4-20-15" => 19.89, "4-30-15" => 29.835, "4-50-15" => 49.725, "4-100-15" => 99.45, "4-200-15" => 198.9, "4-300-15" => 298.35, "4-500-15" => 497.25,//山东 15
+        "4-10-10" => 9.945, "4-20-10" => 19.89, "4-30-10" => 29.835, "4-50-10" => 49.725, "4-100-10" => 99.45, "4-200-10" => 198.9, "4-300-10" => 298.35, "4-500-10" => 497.25,//江苏 10
+        "4-10-11" => 9.945, "4-20-11" => 19.89, "4-30-11" => 29.835, "4-50-11" => 49.725, "4-100-11" => 99.45, "4-200-11" => 198.9, "4-300-11" => 298.35, "4-500-11" => 497.25,//浙江 11
+        "4-10-17" => 9.945, "4-20-17" => 19.89, "4-30-17" => 29.835, "4-50-17" => 49.725, "4-100-17" => 99.45, "4-200-17" => 198.9, "4-300-17" => 298.35, "4-500-17" => 497.25,//湖北 17
+        "4-30-16" => 29.835, "4-50-16" => 49.725, "4-100-16" => 99.45, "4-200-16" => 198.9,//河南 16
         //联通
-        "5-10-19" => 10.02, "5-20-19" => 20.04, "5-30-19" => 30.06, "5-50-19" => 50.1, "5-100-19" => 100.2, "5-200-19" => 200.4, "5-300-19" => 300.6, "5-500-19" => 501,//广东 19
+        "5-10-19" => 10.025, "5-20-19" => 20.05, "5-30-19" => 30.075, "5-50-19" => 50.125, "5-100-19" => 100.25, "5-200-19" => 200.5, "5-300-19" => 300.75, "5-500-19" => 501.25,//广东 19
         "5-10-1" => 9.99, "5-20-1" => 19.98, "5-30-1" => 29.97, "5-50-1" => 49.95, "5-100-1" => 99.9, "5-200-1" => 199.8, "5-300-1" => 299.7, "5-500-1" => 499.5,//北京 1
-        "5-20-22" => 20, "5-30-22" => 30, "5-50-22" => 50, "5-100-22" => 100, "5-200-22" => 200, "5-300-22" => 300, "5-500-22" => 500,//重庆 22
+        "5-20-22" => 20.01, "5-30-22" => 30.015, "5-50-22" => 50.025, "5-100-22" => 100.05, "5-200-22" => 200.1, "5-300-22" => 300.15, "5-500-22" => 500.25,//重庆 22
         //电信
-        "6-10-27" => 9.92, "6-20-27" => 19.84, "6-30-27" => 29.76, "6-50-27" => 49.6, "6-100-27" => 99.2, "6-200-27" => 198.4, "6-300-27" => 297.6, "6-500-27" => 496,//陕西 27
-        "6-10-4" => 9.93, "6-20-4" => 19.86, "6-30-4" => 29.79, "6-50-4" => 49.65, "6-100-4" => 99.3, "6-200-4" => 198.6, "6-300-4" => 297.9, "6-500-4" => 496.5,//山西 4
+        "6-10-27" => 9.925, "6-20-27" => 19.85, "6-30-27" => 29.775, "6-50-27" => 49.625, "6-100-27" => 99.25, "6-200-27" => 198.5, "6-300-27" => 297.75, "6-500-27" => 496.25,//陕西 27
+        "6-10-4" => 9.935, "6-20-4" => 19.87, "6-30-4" => 29.805, "6-50-4" => 49.675, "6-100-4" => 99.35, "6-200-4" => 198.7, "6-300-4" => 298.05, "6-500-4" => 496.75,//山西 4
     ];
 }

二進制
helper/refill/api/xyz/guochuang_nation/10-500面值.png


二進制
helper/refill/api/xyz/guochuang_nation/小面值.png


二進制
helper/refill/api/xyz/guochuang_nation/电信.png


二進制
helper/refill/api/xyz/guochuang_nation/移动.png


二進制
helper/refill/api/xyz/guochuang_nation/联通.png


+ 2 - 1
helper/refill/api/xyz/jumithird/RefillPhone.php

@@ -34,7 +34,8 @@ class RefillPhone extends refill\IRefillPhone
     private function getProductCode($goods_id, $sys_pcode)
     {
         $thrid_refill = Model('thrid_refill');
-        $product = $thrid_refill->getProviderProduct(111, $goods_id, $sys_pcode);
+        $store_id = $this->mStoreID;
+        $product = $thrid_refill->getProviderProduct($store_id, $goods_id, $sys_pcode);
         if (empty($product)) {
             return false;
         } else {

+ 42 - 6
helper/refill/api/xyz/santi/RefillPhone.php

@@ -14,6 +14,35 @@ class RefillPhone extends refill\IRefillPhone
         parent::__construct($cfgs);
     }
 
+    public function goods($quality, int $amount, int $card_type, $regin_no, $other)
+    {
+        [$goods_id, $price] = parent::goods($quality, $amount, $card_type, $regin_no, $other);
+        if ($goods_id <= 0) return [0, 0];
+
+        $store_id = $this->mStoreID;
+        $pcode = $other['product_code'];
+        $thrid_refill = Model('thrid_refill');
+        $product = $thrid_refill->getProviderProduct($store_id, $goods_id, $pcode);
+        if (empty($product)) {
+            Log::record("cannot find provider's produce where name={$this->mName}, goods_id = {$goods_id} pcode={$pcode}", Log::ERR);
+            return [0, 0];
+        } else {
+            return [$goods_id, ncPriceFormat($product['channel_amount'])];
+        }
+    }
+
+    private function getProductCode($goods_id, $sys_pcode)
+    {
+        $thrid_refill = Model('thrid_refill');
+        $store_id = $this->mStoreID;
+        $product = $thrid_refill->getProviderProduct($store_id, $goods_id, $sys_pcode);
+        if (empty($product)) {
+            return false;
+        } else {
+            return $product['channel_code'];
+        }
+    }
+
     private function get_mobile_info(int $phone): array
     {
         $params['appkey'] = config::APP_KEY;
@@ -68,15 +97,12 @@ class RefillPhone extends refill\IRefillPhone
         }
     }
 
-    private function req_params(int $phone, int $amount, int $card_type, string $order_sn)
+    private function req_params(int $phone, string $order_sn)
     {
         $params['appkey'] = config::APP_KEY;
-        $params['prodValue'] = $amount;
         $params['customer'] = $phone;
-        $params['prodPayType'] = 1;
-        $params['prodScope'] = 1;
+        $params['prodPayType'] = 0;
         $params['prodType'] = 1;
-        $params['validate'] = 1;
         $params['notifyUrl'] = config::NOTIFY_URL;
         $params['channelOrderNo'] = $order_sn;
         $params['timestamp'] = time();
@@ -86,7 +112,17 @@ class RefillPhone extends refill\IRefillPhone
     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);
+        $goods_id = intval($params['goods_id']);
+        $product_code = $this->getProductCode($goods_id, $params['product_code']);
+        $product = config::Products[$product_code];
+        if(empty($product)) {
+            return [false, '产品有误', false];
+        }
+
+        $params = $this->req_params($card_no, $order_sn);
+        $params['prodValue'] = $product['prodValue'];
+        $params['prodScope'] = $product['prodScope'];
+        $params['validate']  = $product['validate'];
         $params['sign'] = $this->sign($params);
 
         $resp = http_request(config::ORDER_URL, $params, 'GET', false, [], $net_errno);

+ 6 - 0
helper/refill/api/xyz/santi/account.txt

@@ -0,0 +1,6 @@
+平台:http://www.flowsaas.cn/v2/index/home
+账户:dh_bjgy
+密码:dh_bjgy123
+AppID 288001339
+AppKey 31d97598f492bae8
+AppSecret b873fe4de54d9aa001238937d7061b65

+ 44 - 22
helper/refill/api/xyz/santi/config.php

@@ -2,28 +2,50 @@
 
 namespace refill\santi;
 
-use mtopcard;
-
 class config
 {
-    const GET_MOBILE_INFO_URL = 'http://test-pms.santiyun.com/c/Mobile/getMobileInfo';
-    const GET_PRODUCT_URL = 'http://test-pms.santiyun.com/c/Product/getProductList';
-    const ORDER_URL = 'http://test-pms.santiyun.com/r/Channel/createOrderSyncWithProdValue';
-    const QUERY_URL = 'http://test-pms.santiyun.com/r/Channel/queryOrder';
-    const BALANCE_URL = 'http://test-pms.santiyun.com/r/Channel/queryBalance';
-
-    const APP_KEY = '6da2681d45058b8b';
-    const APP_SECRET = '6c41a870b54abb78efc9874475612345';
-//    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_yikatong.php";
-    const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.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_NO = [
-        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
-    ];
+    const GET_MOBILE_INFO_URL = 'http://pms.liulianggo.com:8051/c/Mobile/getMobileInfo';
+    const GET_PRODUCT_URL = 'http://pms.liulianggo.com:8051/c/Product/getProductList';
+    const ORDER_URL = 'http://pms.liulianggo.com:8051/r/Channel/createOrderSyncWithProdValue';
+    const QUERY_URL = 'http://pms.liulianggo.com:8051/r/Channel/queryOrder';
+    const BALANCE_URL = 'http://pms.liulianggo.com:8051/r/Channel/queryBalance';
+
+    const APP_KEY = '31d97598f492bae8';
+    const APP_SECRET = 'b873fe4de54d9aa001238937d7061b65';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_santi.php";
+
+    const Products =
+        [
+            //流量面值、使用范围、使用期限
+            'ST100747' => ['prodValue' => 1024, 'prodScope' => 1, 'validate' => 1],//	30	移动-1G-当月-全国
+            'ST100748' => ['prodValue' => 2048, 'prodScope' => 1, 'validate' => 1],//	50	移动-2G-当月-全国
+            'ST100749' => ['prodValue' => 3072, 'prodScope' => 1, 'validate' => 1],//	70	移动-3G-当月-全国
+            'ST100750' => ['prodValue' => 5120, 'prodScope' => 1, 'validate' => 1],//	100	移动-5G-当月-全国
+            'ST100751' => ['prodValue' => 10240, 'prodScope' => 1, 'validate' => 1],//	150	移动-10G-当月-全国
+            'ST100752' => ['prodValue' => 15360, 'prodScope' => 1, 'validate' => 1],//	200	移动-15G-当月-全国
+            'ST100753' => ['prodValue' => 30720, 'prodScope' => 1, 'validate' => 1],//	300	移动-30G-当月-全国
+
+            'ST100754' => ['prodValue' => 1024, 'prodScope' => 1, 'validate' => 2],//	5	移动-1G-1天-全国
+            'ST100755' => ['prodValue' => 2048, 'prodScope' => 1, 'validate' => 2],//	8	移动-2G-1天-全国
+            'ST100756' => ['prodValue' => 5120, 'prodScope' => 1, 'validate' => 7],//	15	移动-5G-7天-全国
+
+            'ST100757' => ['prodValue' => 1024, 'prodScope' => 1, 'validate' => 1],//	20	联通-1G-当月-全国
+            'ST100758' => ['prodValue' => 4096, 'prodScope' => 1, 'validate' => 1],//	55	联通-4G-当月-全国
+            'ST100759' => ['prodValue' => 20480, 'prodScope' => 1, 'validate' => 1],//	80	联通-20G-当月-全国
+
+            'ST100760' => ['prodValue' => 500, 'prodScope' => 1, 'validate' => 2],//	5	联通-500M-1天-全国
+            'ST100761' => ['prodValue' => 1024, 'prodScope' => 1, 'validate' => 2],//	7	联通-1G-1天-全国
+            'ST100762' => ['prodValue' => 2048, 'prodScope' => 1, 'validate' => 8],//	12	联通-2G-3天-全国
+            'ST100763' => ['prodValue' => 4096, 'prodScope' => 1, 'validate' => 7],//	16	联通-4G-7天-全国
+            'ST100764' => ['prodValue' => 10240, 'prodScope' => 1, 'validate' => 7],//	30	联通-10G-7天-全国
+
+            'ST100765' => ['prodValue' => 500, 'prodScope' => 1, 'validate' => 1],//	15	电信-500M-当月-全国
+            'ST100766' => ['prodValue' => 2048, 'prodScope' => 1, 'validate' => 1],//	30	电信-2G-当月-全国
+            'ST100767' => ['prodValue' => 6144, 'prodScope' => 1, 'validate' => 1],//	60	电信-6G-当月-全国
+            'ST100768' => ['prodValue' => 10240, 'prodScope' => 1, 'validate' => 1],//	80	电信-10G-当月-全国
+
+            'ST100769' => ['prodValue' => 2048, 'prodScope' => 1, 'validate' => 2],//	15	电信-2G-1天-全国
+            'ST100770' => ['prodValue' => 3072, 'prodScope' => 1, 'validate' => 8],//	20	电信-3G-3天-全国
+            'ST100771' => ['prodValue' => 10240, 'prodScope' => 1, 'validate' => 9],//	30	电信-10G-5天-全国
+        ];
 }

二進制
helper/refill/api/xyz/santi/三网全国报价表-流量.xlsx


二進制
helper/refill/api/xyz/santi/单皓流量购接口文档v3.3.10(流量)(1).docx


+ 5 - 1
helper/refill/api/xyz/xunyinoil/config.php

@@ -24,7 +24,11 @@ class config
             1000 => 15329
         ],
         mtopcard\SinopecCard => [
-            50 => 15312
+            50 => 15312,
+            100 => 15313,
+            200 => 15314,
+            500 => 15315,
+            1000 => 15316
         ]
     ];
 

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

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

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

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

+ 13 - 0
helper/refill/api/xyz/yuanta/api.txt

@@ -0,0 +1,13 @@
+下单地址:http://59.110.225.82:10186/plat/api/old/submitorder
+
+查询地址:http://59.110.225.82:10186/plat/api/old/queryorder
+
+余额地址:http://59.110.225.82:10186/plat/api/old/queryBalance
+
+
+ID:200029
+秘钥:15536053107
+对接文档地址:https://docs.qq.com/doc/DWkV1VkxQVk13eEtQ
+账户;yezi
+密码;123456
+后台地址;http://59.110.225.82:10186/plat/index

+ 26 - 0
helper/refill/api/xyz/yuanta/config.php

@@ -0,0 +1,26 @@
+<?php
+
+
+namespace refill\yuanta;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://59.110.225.82:10186/plat/api/old/submitorder';
+    const QUERY_URL= 'http://59.110.225.82:10186/plat/api/old/queryorder';
+    const BALANCE_URL= 'http://59.110.225.82:10186/plat/api/old/queryBalance';
+
+    const USER_ID= '200029';
+    const KEY = '04096d13de0b4c9b8b491059fbb64ac1';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_yuanta.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
+    ];
+}

+ 4 - 0
mobile/callback/refill_dashang.php

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

+ 1 - 1
mobile/callback/refill_hangtong.php

@@ -2,7 +2,7 @@
 
 $content = $_SERVER['post_content'];
 
-$inputs = json_decode($content,true);
+$inputs = json_decode($content,true) ?? [];
 foreach ($inputs as $input) {
     refill\util::push_notify('hangtong',$input);
 }

+ 4 - 0
mobile/callback/refill_santi.php

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

+ 4 - 0
mobile/callback/refill_yuanta.php

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

+ 1 - 1
mobile/mobile_run.php

@@ -40,7 +40,7 @@ require_once(BASE_HELPER_PATH . '/refill/util.php');
 
 
 function all_channels() {
-    return ['ch_index','activity','goods','refill'];
+    return ['ch_index','activity','goods'];
 }
 
 Base::mobile_init();

+ 26 - 26
mobile/signature.php

@@ -1,27 +1,27 @@
-<?php
-
-//Log::record("This is signatrue file.");
-//
-//$signature = $_GET["signature"];
-//$timestamp = $_GET["timestamp"];
-//$nonce = $_GET["nonce"];
-//$echostr = $_GET["echostr"];
-$data = json_encode($_POST);
-$sign = $_SERVER['HTTP_SIGN'];
-Log::record("signature data : {$data}",Log::DEBUG);
-Log::record("HTTP_SIGN : {$sign}",Log::DEBUG);
-echo ('success');
-
-//echo("{$echostr}");
-//
-//$token = 'stanleykinghelloworld';
-//$tmpArr = [$token, $timestamp, $nonce];
-//sort($tmpArr, SORT_STRING);
-//$tmpStr = implode( $tmpArr );
-//$tmpStr = sha1( $tmpStr );
-//
-//if( $tmpStr == $signature ){
-//    return true;
-//}else{
-//    return false;
+<?php
+
+//Log::record("This is signatrue file.");
+//
+//$signature = $_GET["signature"];
+//$timestamp = $_GET["timestamp"];
+//$nonce = $_GET["nonce"];
+//$echostr = $_GET["echostr"];
+$data = json_encode($_POST);
+$sign = $_SERVER['HTTP_SIGN'];
+Log::record("signature data : {$data}",Log::DEBUG);
+Log::record("HTTP_SIGN : {$sign}",Log::DEBUG);
+echo ('SUCCESS');
+
+//echo("{$echostr}");
+//
+//$token = 'stanleykinghelloworld';
+//$tmpArr = [$token, $timestamp, $nonce];
+//sort($tmpArr, SORT_STRING);
+//$tmpStr = implode( $tmpArr );
+//$tmpStr = sha1( $tmpStr );
+//
+//if( $tmpStr == $signature ){
+//    return true;
+//}else{
+//    return false;
 //}

File diff suppressed because it is too large
+ 7 - 0
test/TestRedis.php


+ 34 - 4
test/TestRefill.php

@@ -865,15 +865,17 @@ class TestRefill extends TestCase
 
     public function testSanti()
     {
-//        $providers = $this->getProvider('santi');
+        $providers = $this->getProvider('santi');
 //        $resp = $providers->get_product(17801048874);
 //        $resp = $providers->add(18500608333, 5, 1024, [
-//            'order_sn' => $this->make_sn()
+//            'order_sn' => $this->make_sn(),
+//            'goods_id' => 7000,
+//            'product_code' => 'XYZ100751'
 //        ]);
-//        $resp = $providers->query(['ch_trade_no' => '1630914690507662']);
+        $resp = $providers->query(['ch_trade_no' => '1631945759171581']);
 //        $resp = $providers->balance();
 
-        $body = '{"channelOrderNo":"38921630914678828649","extraData":"","orderNo":"1630914690507662","orderStatus":"5","providerResultCode":"3004","providerResultReason":"\u5931\u8d25","resultCode":"3004","resultMessage":"\u5931\u8d25","sign":"84845090e3655eb265ae8641dc124968"}';
+        $body = '{"channelOrderNo":"49991631861285846684","extraData":"","orderNo":"1631861288127072","orderStatus":"4","providerResultCode":"3","providerResultReason":"\u5145\u503c\u6210\u529f","resultCode":"1000","resultMessage":"\u6210\u529f","sign":"472490783eaa82c76a1af8702881f04f"}';
         $params = json_decode($body, true);
         $providers = $this->getProvider('santi', 'RefillCallBack');
         $ret = $providers->verify($params);
@@ -997,6 +999,34 @@ class TestRefill extends TestCase
         $resp = $providers->notify($params);
     }
 
+    public function testDashang()
+    {
+//        $providers = $this->getProvider('dashang');
+//        $resp = $providers->balance();
+//        $resp = $providers->add(18074608795, 6, 50, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '63101631784169445345']);
+
+        $body = '{"userId":"80800346","bizId":"90290050","ejId":"90916171545126","downstreamSerialno":"67971631783703671946","status":"3","voucher":"","voucherType":"0","sign":"46b13acf67f271e2f85db189ab9e1391"}';
+        $params = json_decode($body, true);
+        $providers = $this->getProvider('dashang','RefillCallBack');
+        $ret = $providers->verify($params);
+        $resp = $providers->notify($params);
+    }
+
+    public function testYuanta()
+    {
+        $providers = $this->getProvider('yuanta');
+//        $resp = $providers->balance();
+//        $resp = $providers->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
+        $resp = $providers->query(['order_sn' => '61501631786913519186']);
+
+//        $body = '{"szOrderId":"61501631786913519186","fSalePrice":"45.75","szAgentId":"200029","nFlag":"2","szVerifyString":"3a580a84b477efa431d78b505fd7389e","szPhoneNum":"18500608333","szRtnMsg":"110103353072109161810250286803","nDemo":"50"}';
+//        $params = json_decode($body, true);
+//        $providers = $this->getProvider('yuanta','RefillCallBack');
+//        $ret = $providers->verify($params);
+//        $resp = $providers->notify($params);
+    }
+
     public function testAmingjd()
     {
 //        $providers = new refill\amingjd\RefillPhone([]);

+ 2 - 2
test/TestRefillThird.php

@@ -36,8 +36,8 @@ class TestRefillThird extends TestCase
             'order_sn' => $this->make_sn(),
             'notifyurl' => 'https://www.xyzshops.cn/mobile/signature.php',
             'card_type' => 1,
-            'cardno' => '2423503330',
-            'product_code' => 'XYZ100024',
+            'cardno' => '14749398007',
+            'product_code' => 'XYZ100754',
             'quantity' => 1
         ];