stanley-king hace 1 año
padre
commit
259d877289
Se han modificado 58 ficheros con 1818 adiciones y 107 borrados
  1. 82 5
      admin/control/refill_event.php
  2. 12 7
      admin/templates/default/refill_event.index.php
  3. 60 0
      admin/templates/default/refill_event.notify.php
  4. 130 24
      data/config/xyz/refill.ini.php
  5. 46 0
      data/config/yl/refill.ini.php
  6. 9 0
      docker/compose/homecuda/conf/nginx/macc.conf
  7. 1 1
      docker/compose/homecuda/macc/docker-compose.yml
  8. 1 0
      helper/fcgisrv/BaseServer.php
  9. 8 22
      helper/fcgisrv/MerchantServer.php
  10. 2 2
      helper/fcgisrv/RAccServer.php
  11. 17 0
      helper/refill/EventManager.php
  12. BIN
      helper/refill/api/xyz/dongyefs/20231124_yd_liaoning.png
  13. 1 1
      helper/refill/api/xyz/dongyefs/config.php
  14. BIN
      helper/refill/api/xyz/guochuang/20231126_yd_guandong.jpg
  15. 1 1
      helper/refill/api/xyz/guochuang/config.php
  16. 17 0
      helper/refill/api/xyz/miaoxt_fs_three/API.MD
  17. 51 0
      helper/refill/api/xyz/miaoxt_fs_three/RefillCallBack.php
  18. 159 0
      helper/refill/api/xyz/miaoxt_fs_three/RefillPhone.php
  19. 32 0
      helper/refill/api/xyz/miaoxt_fs_three/config.php
  20. 34 0
      helper/refill/api/xyz/weisanhuo/API.MD
  21. 40 0
      helper/refill/api/xyz/weisanhuo/RefillCallBack.php
  22. 147 0
      helper/refill/api/xyz/weisanhuo/RefillPhone.php
  23. BIN
      helper/refill/api/xyz/weisanhuo/code.xlsx
  24. 70 0
      helper/refill/api/xyz/weisanhuo/config.php
  25. BIN
      helper/refill/api/xyz/weisanhuo/help.doc
  26. BIN
      helper/refill/api/xyz/weisanhuo/~$help.doc
  27. 18 0
      helper/refill/api/xyz/yiqian_tax/API.MD
  28. 54 0
      helper/refill/api/xyz/yiqian_tax/RefillCallBack.php
  29. 158 0
      helper/refill/api/xyz/yiqian_tax/RefillPhone.php
  30. 53 0
      helper/refill/api/xyz/yiqian_tax/config.php
  31. 1 1
      helper/refill/api/yl/guochuang/config.php
  32. 14 0
      helper/refill/api/yl/yezipczy/API.MD
  33. 76 0
      helper/refill/api/yl/yezipczy/RefillCallBack.php
  34. 161 0
      helper/refill/api/yl/yezipczy/RefillPhone.php
  35. 13 0
      helper/refill/api/yl/yezipczy/config.php
  36. 37 9
      helper/refill/event/IEventRefill.php
  37. 2 3
      helper/refill/event/card_crash.php
  38. 111 0
      helper/refill/event/cbparams_pick.php
  39. 21 14
      helper/refill/policy/xyz/policy.php
  40. 7 0
      helper/refill/util.php
  41. 0 2
      mchsrv/control/merchant_info.php
  42. 0 2
      mchsrv/control/merchant_login.php
  43. 0 1
      mchsrv/control/merchant_order.php
  44. 0 1
      mchsrv/control/merchant_refill.php
  45. 0 2
      mchsrv/control/refill_evidence.php
  46. 2 1
      mchsrv/index.php
  47. 2 2
      mchsrv/mchsrv_run.php
  48. 4 0
      mobile/callback/refill_miaoxt_fs_three.php
  49. 6 0
      mobile/callback/refill_weisanhuo.php
  50. 4 0
      mobile/callback/refill_yezipczy.php
  51. 4 0
      mobile/callback/refill_yiqian_tax.php
  52. 17 0
      test/TestHttp.php
  53. 29 0
      test/TestRefill.php
  54. 20 4
      test/TestRefillUtil.php
  55. 15 0
      test/mh/TestRefill.php
  56. 65 0
      vapi/framework/function/function.php
  57. 1 0
      vapi/framework/index.html
  58. 3 2
      vapi/index.php

+ 82 - 5
admin/control/refill_event.php

@@ -28,17 +28,18 @@ class refill_eventControl extends SystemControl
         $cacher = Cache::getInstance('cacheredis');
         $cfgs = $cacher->get('event-config', 'refill-');
 
-        if (empty($cfgs))
+        if (!empty($cfgs)) {
+            $cfgs = unserialize($cfgs);
+        }
+
+        if (empty($cfgs['cfgs_crash']))
         {
-            $cfgs['open_crash'] = true;
+            $cfgs['open_crash'] = false;
             $cfgs['cfgs_crash'] = [
                 'channels' => "",
                 'succ_interval' => 900
             ];
         }
-        else {
-            $cfgs = unserialize($cfgs);
-        }
 
         if (chksubmit())
         {
@@ -55,6 +56,82 @@ class refill_eventControl extends SystemControl
         Tpl::showpage('refill_event.index');
     }
 
+    public function notifyOp()
+    {
+        $osns_reader = function ($input)
+        {
+            $sns = [];
+            $data = explode(',', $input);
+            foreach ($data as $val)
+            {
+                $val = trim($val);
+                if (!empty($val)) {
+                    $sns[] = $val;
+                }
+            }
+            return implode(',', $sns);
+        };
+
+        $mchids_reader = function ($input)
+        {
+            $ids = [];
+            $data = explode(',', $input);
+            foreach ($data as $val)
+            {
+                $val = trim($val);
+                $val = intval($val);
+                if ($val > 0) {
+                    $ids[] = $val;
+                }
+            }
+            return implode(',', $ids);
+        };
+
+        $cacher = Cache::getInstance('cacheredis');
+        $cfgs = $cacher->get('event-config', 'refill-');
+
+        if (!empty($cfgs)) {
+            $cfgs = unserialize($cfgs);
+        }
+
+        if (empty($cfgs['cfgs_notify_osn']))
+        {
+            $cfgs['open_notify_osn'] = false;
+            $cfgs['cfgs_notify_osn'] = [
+                'exclude_sns_start' => '',
+                'exclude_mchids' => ''
+            ];
+        }
+
+        if (empty($cfgs['cfgs_sms']))
+        {
+            $cfgs['open_sms'] = false;
+            $cfgs['cfgs_sms'] = [
+                'include_mchids' => ''
+            ];
+        }
+
+        if (chksubmit())
+        {
+            $cfgs['open_notify_osn'] = boolval($_POST['open_notify_osn'] ?? false);
+            $cfgs['cfgs_notify_osn'] = [
+                'exclude_sns_start' => $osns_reader($_POST['exclude_sns_start']),
+                'exclude_mchids' => $mchids_reader($_POST['exclude_mchids'])
+            ];
+
+            $cfgs['open_sms'] = boolval($_POST['open_sms'] ?? false);
+            $cfgs['cfgs_sms'] = [
+                'include_mchids' => $mchids_reader($_POST['include_mchids'])
+            ];
+
+            $cacher->set('event-config', serialize($cfgs), 'refill-');
+            showMessage('编辑成功');
+        }
+
+        Tpl::output('cfgs', $cfgs);
+        Tpl::showpage('refill_event.notify');
+    }
+
     public function delcacheOp()
     {
 

+ 12 - 7
admin/templates/default/refill_event.index.php

@@ -6,6 +6,8 @@
       <h3>订单事件控制</h3>
       <ul class="tab-base">
         <li><a href="JavaScript:void(0);" class="current"><span>防撞(卡号)单控制</span></a></li>
+        <li><a href="index.php?act=refill_event&op=notify"><span>回调详情控制</span></a></li>
+
       </ul>
     </div>
   </div>
@@ -14,20 +16,22 @@
 
   <form method="post" id="form">
     <input type="hidden" name="form_submit" value="ok" />
-    <div style="padding: 20px 0;border-bottom: 1px dotted #CBE9F3;">
+    <div style="padding: 15px 0;border-bottom: 1px dotted #CBE9F3;">
       <label style="display:flex;align-items: center;">
-        <input type="checkbox" name="open_crash" style="margin-right: 8px;" value="true" <?php echo $output['cfgs']['open_crash'] ? 'checked' : '';?> >
+        <input type="checkbox" name="open_crash" id="open_crash" style="margin-right: 8px;" value="true" <?php echo $output['cfgs']['open_crash'] == true ? 'checked' : '';?> >
         <span style="padding-right: 8px;">防撞单控制开关</span>
       </label>
     </div>
-    <div style="display:flex;align-items: center;height: 80px;">
+    <div style="display:flex;align-items: center;height: 50px;padding-left: 25px;">
       <span style="margin-right: 8px;">撞单通道:</span>
-      <input type="text" name="channels" style="width: 600px;" value="<?php echo $output['cfgs']['cfgs_crash']['channels'];?>" id="channels"> 请以英文字符逗号隔开.</input>
+      <input type="text" name="channels" style="width: 600px;" value="<?php echo $output['cfgs']['cfgs_crash']['channels'];?>" id="channels"></input>
+      <span style="padding-left: 8px;"> 请以英文字符逗号隔开.</span>
     </div>
-    <div style="margin-top: 10px;">
+    <div style="margin-top: 5px;padding-left: 25px;">
       <label>
         <span style="padding-right: 8px;">订单睡眠: </span>
-        <input type="number" class="txt2" name="succ_interval" value="<?php echo $output['cfgs']['cfgs_crash']['succ_interval'];?>" id="succ_interval"> 秒</input>
+        <input type="number" class="txt2" name="succ_interval" value="<?php echo $output['cfgs']['cfgs_crash']['succ_interval'];?>" id="succ_interval"></input>
+        <span> 秒</span>
       </label>
     </div>
     <a href="JavaScript:void(0);" class="btn" style="margin-top: 15px" id="submitBtn"><span>提交</span></a>
@@ -35,7 +39,8 @@
 </div>
 
 <script>
-$(function(){
+$(function()
+{
     $('#submitBtn').click(function(){
       if(!$('#channels').val()) {
         alert('请输入撞单通道');

+ 60 - 0
admin/templates/default/refill_event.notify.php

@@ -0,0 +1,60 @@
+<?php defined('InShopNC') or exit('Access Invalid!');?>
+
+<div class="page">
+  <div class="fixed-bar">
+    <div class="item-title">
+      <h3>订单事件控制</h3>
+      <ul class="tab-base">
+          <li><a href="index.php?act=refill_event&op=index"><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="post" id="form">
+    <input type="hidden" name="form_submit" value="ok" />
+    <div style="padding: 15px 0;">
+      <label style="display:flex;align-items: center;">
+        <input type="checkbox" name="open_notify_osn" style="margin-right: 8px;" value="true" <?php echo $output['cfgs']['open_notify_osn'] == true ? 'checked' : '';?>>
+        <span style="padding-right: 8px;">回调流水号控制开关</span>
+      </label>
+    </div>
+
+    <div style="display:flex;align-items: center;height: 20px;padding-left: 25px;margin-bottom: 8px;">
+      <span style="margin-right: 8px;">这些开头的流水号:</span>
+      <input type="text" name="exclude_sns_start" style="width: 500px;" value="<?php echo $output['cfgs']['cfgs_notify_osn']['exclude_sns_start'];?>" />
+      <span style="padding-left: 8px;">回调时不携带.</span>
+    </div>
+    <div style="display:flex;align-items: center;height: 40px;padding-left: 25px;">
+      <span style="margin-right: 8px;">这些机构:</span>
+      <input type="text" name="exclude_mchids" style="width: 500px;" value="<?php echo $output['cfgs']['cfgs_notify_osn']['exclude_mchids'];?>" />
+      <span style="padding-left: 8px;">要带上面的流水号.</span>
+    </div>
+
+    <div style="border-top: 1px dotted #CBE9F3;">
+      <div style="padding:15px 0;">
+        <label style="display:flex;align-items: center;">
+          <input type="checkbox" name="open_sms" style="margin-right: 8px;" value="true" <?php echo $output['cfgs']['open_sms'] == true ? 'checked' : '';?> >
+          <span style="padding-right: 8px;">短信</span>
+        </label>
+      </div>
+
+      <div style="display:flex;align-items: center;height: 20px; padding-left: 25px;">
+        <span style="margin-right: 8px;">这些机构:</span>
+        <input type="text" name="include_mchids" style="width: 500px;" value="<?php echo $output['cfgs']['cfgs_sms']['include_mchids'];?>" />
+        <span style="padding-left: 8px;">需要短信.</span>
+      </div>
+    </div>
+    <a href="JavaScript:void(0);" class="btn" style="margin-top: 15px" id="submitBtn"><span>提交</span></a>
+  </form>
+</div>
+
+<script>
+$(function(){
+    $('#submitBtn').click(function(){
+      $('#form').submit();
+    });
+});
+</script>

+ 130 - 24
data/config/xyz/refill.ini.php

@@ -10065,35 +10065,138 @@ $beirui_sec_phone = ['name' => 'beirui_sec', 'store_id' => 382, 'qualitys' => '1
 //        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
-//
-//$beirui_trd_phone = ['name' => 'beirui_trd', 'store_id' => 383, 'qualitys' => '1',
-//    'amount' => [
-////        10 => [
-////            ['goods_id' => 9001, 'price' => 9.68, 'quality' => 1, 'card_type' => 'chinamobile'],
-////        ],
-////        20 => [
-////            ['goods_id' => 9002, 'price' => 19.36, 'quality' => 1, 'card_type' => 'chinamobile'],
-////        ],
-////        30 => [
-////            ['goods_id' => 9003, 'price' => 29.04, 'quality' => 1, 'card_type' => 'chinamobile'],
-////        ],
-////        50 => [
-////            ['goods_id' => 9004, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile'],
-////        ],
+
+$beirui_trd_phone = ['name' => 'beirui_trd', 'store_id' => 383, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 9001, 'price' => 9.68, 'quality' => 1, 'card_type' => 'chinamobile'],
+//        ],
+//        20 => [
+//            ['goods_id' => 9002, 'price' => 19.36, 'quality' => 1, 'card_type' => 'chinamobile'],
+//        ],
+//        30 => [
+//            ['goods_id' => 9003, 'price' => 29.04, 'quality' => 1, 'card_type' => 'chinamobile'],
+//        ],
+//        50 => [
+//            ['goods_id' => 9004, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+//        ],
 //        100 => [
 //            ['goods_id' => 9005, 'price' => 96.5, 'quality' => 1, 'card_type' => 'chinamobile'],
 //        ],
 //        200 => [
 //            ['goods_id' => 9006, 'price' => 193, 'quality' => 1, 'card_type' => 'chinamobile'],
 //        ],
-////        300 => [
-////            ['goods_id' => 9007, 'price' => 290.4, 'quality' => 1, 'card_type' => 'chinamobile'],
-////        ],
-////        500 => [
-////            ['goods_id' => 9008, 'price' => 484, 'quality' => 1, 'card_type' => 'chinamobile'],
-////        ]
-//    ],
-//    'official_sn' => true, 'refill_type' => 'api'];
+//        300 => [
+//            ['goods_id' => 9007, 'price' => 290.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+//        ],
+//        500 => [
+//            ['goods_id' => 9008, 'price' => 484, 'quality' => 1, 'card_type' => 'chinamobile'],
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$weisanhuo_phone = ['name' => 'weisanhuo', 'store_id' => 384, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 9009, 'price' => 9.68, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9009, 'price' => 9.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9009, 'price' => 9.57, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 9010, 'price' => 19.36, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9010, 'price' => 18.8, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9010, 'price' => 19.14, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        30 => [
+//            ['goods_id' => 9011, 'price' => 29.04, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9011, 'price' => 28.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9011, 'price' => 28.71, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        50 => [
+//            ['goods_id' => 9012, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9012, 'price' => 47, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9012, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+        100 => [
+            ['goods_id' => 9013, 'price' => 95.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9013, 'price' => 94, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9013, 'price' => 95, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 9014, 'price' => 190.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9014, 'price' => 188, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9014, 'price' => 190, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 9015, 'price' => 285.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9015, 'price' => 282, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9015, 'price' => 287.1, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 9016, 'price' => 476, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9016, 'price' => 470, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9016, 'price' => 478.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$yiqian_tax_phone = ['name' => 'yiqian_tax', 'store_id' => 385, 'qualitys' => '2',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 9017, 'price' => 10.39, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9017, 'price' => 10.08, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9017, 'price' => 10.39, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 9018, 'price' => 20.46, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9018, 'price' => 20.16, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9018, 'price' => 20.46, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
+        30 => [
+//            ['goods_id' => 9019, 'price' => 30.36, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9019, 'price' => 29.985, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9019, 'price' => 29.97, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+//            ['goods_id' => 9020, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9020, 'price' => 49.975, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9020, 'price' => 49.95, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 9021, 'price' => 100.1, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9021, 'price' => 99.95, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9021, 'price' => 99.9, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 9022, 'price' => 200.2, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9022, 'price' => 199.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9022, 'price' => 199.8, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 9023, 'price' => 300.3, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9023, 'price' => 299.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9023, 'price' => 299.7, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 9024, 'price' => 500.5, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9024, 'price' => 498.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9024, 'price' => 499.5, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$miaoxt_fs_three_phone = ['name' => 'miaoxt_fs_three', 'store_id' => 386, 'qualitys' => '2',
+    'amount' => [
+        10 => [['goods_id' => 9025, 'price' => 10.05, 'quality' => 2, 'card_type' => 'chinamobile']],
+        20 => [['goods_id' => 9026, 'price' => 20.1, 'quality' => 2, 'card_type' => 'chinamobile']],
+        30 => [['goods_id' => 9027, 'price' => 30.15, 'quality' => 2, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 9028, 'price' => 50.25, 'quality' => 2, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 9029, 'price' => 100.5, 'quality' => 2, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 9030, 'price' => 201, 'quality' => 2, 'card_type' => 'chinamobile']],
+        300 => [['goods_id' => 9031, 'price' => 301.5, 'quality' => 2, 'card_type' => 'chinamobile']],
+        500 => [['goods_id' => 9032, 'price' => 502.5, 'quality' => 2, 'card_type' => 'chinamobile']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
 
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_p hone],
@@ -10399,6 +10502,9 @@ $phone_providers = [
     ['name' => 'miaoxt_tax_seco', 'cfg' => $miaoxt_tax_seco_phone],
     ['name' => 'beirui_sec', 'cfg' => $beirui_sec_phone],
 //    ['name' => 'beirui_trd', 'cfg' => $beirui_trd_phone],
+    ['name' => 'weisanhuo', 'cfg' => $weisanhuo_phone],
+//    ['name' => 'yiqian_tax', 'cfg' => $yiqian_tax_phone],
+    ['name' => 'miaoxt_fs_three', 'cfg' => $miaoxt_fs_three_phone],
 ];
 $config['phone_providers'] = $phone_providers;
 
@@ -10656,7 +10762,7 @@ $third_jumps = [
 $config['third_jumps'] = $third_jumps;
 
 #油需要发短信的机构
-$config['sms_mchids'] = [1090,10116];
+//$config['sms_mchids'] = [1090,10116];
 
 #风险流水号管理
 $config['risk_official_sn'] = [

+ 46 - 0
data/config/yl/refill.ini.php

@@ -7896,6 +7896,51 @@ $beirui_trd_phone = ['name' => 'beirui_trd', 'store_id' => 306, 'qualitys' => '1
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$yezipczy_phone = ['name' => 'yezipczy', 'store_id' => 307, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 8466, 'price' => 10.025, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8466, 'price' => 10.05, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 8466, 'price' => 10.17, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 8468, 'price' => 20.05, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8468, 'price' => 20.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 8468, 'price' => 20.34, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 8469, 'price' => 30, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8469, 'price' => 30.03, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 8469, 'price' => 30.51, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 8470, 'price' => 50, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 8470, 'price' => 50, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8470, 'price' => 50, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 8471, 'price' => 100, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 8471, 'price' => 100, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8471, 'price' => 100, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 8472, 'price' => 200, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 8472, 'price' => 200, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8472, 'price' => 200, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 8473, 'price' => 300, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8473, 'price' => 300.3, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 8473, 'price' => 300.3, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 8474, 'price' => 500, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8474, 'price' => 500.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 8474, 'price' => 500.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -8149,6 +8194,7 @@ $phone_providers = [
     ['name' => 'miaoxt_tax_sec', 'cfg' => $miaoxt_tax_sec_phone],
     ['name' => 'liantuo_nation_trd', 'cfg' => $liantuo_nation_trd_phone],
     ['name' => 'beirui_trd', 'cfg' => $beirui_trd_phone],
+    ['name' => 'yezipczy', 'cfg' => $yezipczy_phone],
 ];
 
 $config['phone_providers'] = $phone_providers;

+ 9 - 0
docker/compose/homecuda/conf/nginx/macc.conf

@@ -59,6 +59,15 @@ http
             include fastcgi_params;
         }
 
+        location ~ /vapi/[/\w]+\.php$ {
+            root           $folder_name;
+            fastcgi_pass   vapi:9000;
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            fastcgi_param  SIGN $http_sign;
+            include fastcgi_params;
+        }
+
         location / {
             deny all;
             return 403;

+ 1 - 1
docker/compose/homecuda/macc/docker-compose.yml

@@ -47,6 +47,6 @@ services:
       - ${SHOP_LOG_PATH}:${SHOP_ROOT_PATH}/data/log
       - ../conf/php/spwan-start:/usr/local/bin/spwan-start
     container_name: "${CONTAINER_PREFIX}-vapi"
-    command: [ spwan-start,"/vapi/vapi_run.php","16" ]
+    command: [ spwan-start,"/vapi/vapi_run.php","1" ]
     networks:
       - ${DOCKER_NET_NAME}

+ 1 - 0
helper/fcgisrv/BaseServer.php

@@ -14,6 +14,7 @@ use request_helper;
 abstract class BaseServer
 {
     public function __construct() {
+        $this->mExFiles = [];
     }
 
     protected $mExFiles;

+ 8 - 22
helper/fcgisrv/MerchantServer.php

@@ -25,7 +25,6 @@ use session;
 use Base;
 use UnloginException;
 use Exception;
-use merchantControl;
 use errcode;
 
 class MerchantServer extends BaseServer
@@ -59,28 +58,15 @@ class MerchantServer extends BaseServer
         try
         {
             fcgi_header("Content-Type: text/html; charset=UTF-8");
+
             if(file_exists($file))
             {
-                if($this->is_exclude($file)) {
-                    include $file;
-                }
-                else
-                {
-                    if(!isset($_GET['act'])) {
-                        $_GET['act'] = 'index';
-                    }
-                    if(!isset($_GET['op'])) {
-                        $_GET['op'] = 'index';
-                    }
-                    if(!isset($_POST['act'])) {
-                        $_POST['act'] = 'index';
-                    }
-                    if(!isset($_POST['op'])) {
-                        $_POST['op'] = 'index';
-                    }
-
-                    //部分控制器不需要使用session.
+                if ($this->isIndex($file)) {
                     Base::mobile_control();
+                } elseif ($this->is_exclude($file)) {
+                    include $file;
+                } else {
+                    echo "You cannot access this file.";
                 }
             }
             else
@@ -90,10 +76,10 @@ class MerchantServer extends BaseServer
             }
         }
         catch (UnloginException $ex) {
-            merchantControl::outerr(errcode::ErrUnLogin,errcode::msg(errcode::ErrUnLogin));
+            joutput_error(errcode::ErrUnLogin,errcode::msg(errcode::ErrUnLogin));
         }
         catch (Exception $ex) {
-            merchantControl::outerr($ex->getCode(),$ex->getMessage());
+            joutput_error($ex->getCode(),$ex->getMessage());
             Log::record("run_looper exception catch code={$ex->getCode()} msg={$ex->getMessage()} trace={$ex->getTraceAsString()}",Log::ERR);
         }
         session::instance()->end();

+ 2 - 2
helper/fcgisrv/RAccServer.php

@@ -87,10 +87,10 @@ class RAccServer extends BaseServer
             }
         }
         catch (UnSignException $ex) {
-            joutput_error(errcode::ErrUnLogin,errcode::msg(errcode::ErrUnLogin));
+            joutput_error(errcode::ErrSignParamter,errcode::msg(errcode::ErrSignParamter));
         }
         catch (Exception $ex) {
-            joutput_error($ex->getCode(),$ex->getMessage());
+            joutput_error($ex->getCode(),'异常错误');
             Log::record("run_looper exception catch code={$ex->getCode()} msg={$ex->getMessage()} trace={$ex->getTraceAsString()}", Log::ERR);
         }
     }

+ 17 - 0
helper/refill/EventManager.php

@@ -5,8 +5,10 @@ namespace refill;
 require_once(BASE_HELPER_PATH . '/refill/event/IEventRefill.php');
 require_once(BASE_HELPER_PATH . '/refill/event/crash.php');
 require_once(BASE_HELPER_PATH . '/refill/event/card_crash.php');
+require_once(BASE_HELPER_PATH . '/refill/event/cbparams_pick.php');
 
 use refill\event\card_crash;
+use refill\event\cbparams_pick;
 use Cache;
 use Log;
 
@@ -49,12 +51,20 @@ class EventManager
 
         Log::record("card_crash load open_crash={$cfgs['open_crash']}.", Log::DEBUG);
 
+        //卡号碰撞控制
         $open_crash = $cfgs['open_crash'] ?? false;
         if($open_crash) {
             $crash = new card_crash();
             $crash->load($cfgs['cfgs_crash'] ?? []);
             $this->mStubs[] = $crash;
         }
+
+        //流水号和短信透传控制
+        if($cfgs['open_notify_osn'] || $cfgs['open_sms']) {
+            $event = new cbparams_pick();
+            $event->load($cfgs);
+            $this->mStubs[] = $event;
+        }
     }
 
     public function onBeforeSubmit(order $order)
@@ -120,4 +130,11 @@ class EventManager
             $stub->onComplete($refill_info, $order_info, $success);
         }
     }
+    public function onEventCallback($refill_info, $mch_info, &$ctls)
+    {
+        $stubs = $this->mStubs;
+        foreach ($stubs as $stub) {
+            $stub->onEventCallback($refill_info, $mch_info, $ctls);
+        }
+    }
 }

BIN
helper/refill/api/xyz/dongyefs/20231124_yd_liaoning.png


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

@@ -103,7 +103,7 @@ class config
     //key格式 卡类型-面值-regin_no
     const Price = [
         //移动
-        "4-10-6" => 9.89, "4-20-6" => 19.78, "4-30-6" => 29.67, "4-50-6" => 49.45, "4-100-6" => 98.9, "4-200-6" => 197.8, "4-300-6" => 296.7, "4-500-6" => 494.5,//辽宁 6
+        "4-10-6" => 9.725, "4-20-6" => 19.45, "4-30-6" => 29.175, "4-50-6" => 48.625, "4-100-6" => 97.25, "4-200-6" => 194.5, "4-300-6" => 291.75, "4-500-6" => 486.25,//辽宁 6
         "4-30-7" => 29.73, "4-50-7" => 49.55, "4-100-7" => 99.1, "4-200-7" => 198.2, "4-300-7" => 297.3, "4-500-7" => 495.5,//吉林 7
         "4-10-9" => 9.91, "4-20-9" => 19.82, "4-30-9" => 29.73, "4-50-9" => 49.55, "4-100-9" => 99.1, "4-200-9" => 198.2, "4-300-9" => 297.3, "4-500-9" => 495.5,//上海 9
         "4-10-13" => 9.89, "4-20-13" => 19.78, "4-30-13" => 29.67, "4-50-13" => 49.45, "4-100-13" => 98.9, "4-200-13" => 197.8, "4-300-13" => 296.7, "4-500-13" => 494.5,//福建 13

BIN
helper/refill/api/xyz/guochuang/20231126_yd_guandong.jpg


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

@@ -72,7 +72,7 @@ class config
         "4-10-13" => 9.965, "4-20-13" => 19.93, "4-30-13" => 29.895, "4-50-13" => 49.825, "4-100-13" => 99.65, "4-200-13" => 199.3, "4-300-13" => 298.95, "4-500-13" => 498.25,//福建 13
         "4-10-5" => 10.035, "4-20-5" => 20.07, "4-30-5" => 30.09, "4-50-5" => 50.15, "4-100-5" => 100.3, "4-200-5" => 200.4, "4-300-5" => 300.6, "4-500-5" => 501,//内蒙古 5
         "4-30-18" => 29.835, "4-50-18" => 49.725, "4-100-18" => 99.45, "4-200-18" => 198.3,//湖南 18
-        "4-10-19" => 10.1, "4-20-19" => 20.2, "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-19" => 10.1, "4-20-19" => 20.2, "4-30-19" => 29.97, "4-50-19" => 49.95, "4-100-19" => 99.9, "4-200-19" => 199.8, "4-300-19" => 299.7, "4-500-19" => 499.5,//广东 19
         "4-10-7" => 9.93, "4-20-7" => 19.86, "4-30-7" => 29.52, "4-50-7" => 49.2, "4-100-7" => 98.4, "4-200-7" => 196.8, "4-300-7" => 295.2, "4-500-7" => 492,//吉林 7
         "4-10-1" => 10.31, "4-20-1" => 20.32, "4-30-1" => 30.33, "4-50-1" => 50.35, "4-100-1" => 100.4, "4-200-1" => 200.3, "4-300-1" => 300.45, "4-500-1" => 500.75,//北京 1
         "4-10-22" => 10.015, "4-20-22" => 20.03, "4-30-22" => 30.045, "4-50-22" => 50.075, "4-100-22" => 100.15, "4-200-22" => 200.3, "4-300-22" => 300.45, "4-500-22" => 500.75,//重庆 22

+ 17 - 0
helper/refill/api/xyz/miaoxt_fs_three/API.MD

@@ -0,0 +1,17 @@
+## 秒信通分分省3号
+### 账号信息
+- 账户:112901
+- 密码:gy123456
+- 秘钥:06f547ff6c1a4a3ab888f23b48238e0c
+- ID:200138
+- 前台:http://47.118.46.242:10186/plat/index
+### 接口信息
+- 话费下单地址:http://47.118.46.242:10186/plat/api/old/submitorder
+- 查询地址:http://47.118.46.242:10186/plat/api/old/queryorder
+- 查询余额地址:http://47.118.46.242:10186/plat/api/old/queryBalance
+- 文档地址:https://docs.qq.com/doc/DWkV1VkxQVk13eEtQ
+### 店铺账号
+- miaoxt_fs_three
+- miaoxt_fs_three67890
+### 面额&折扣
+> 辽宁移动,10-500,折扣100.5

+ 51 - 0
helper/refill/api/xyz/miaoxt_fs_three/RefillCallBack.php

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

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

@@ -0,0 +1,159 @@
+<?php
+
+namespace refill\miaoxt_fs_three;
+
+require_once(BASE_HELPER_RAPI_PATH . '/miaoxt_fs_three/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        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];
+        $key = "{$card_type}-{$amount}-{$regin_no}";
+        $price = config::Price[$key];
+        if(empty($price)) {
+            Log::record("channel cannot find price where name={$this->mName}, goods_id = {$goods_id} card_type={$card_type} amount={$amount} regin_no={$regin_no}",Log::ERR);
+            return [0,0];
+        } else {
+            return [$goods_id,ncPriceFormat($price)];
+        }
+    }
+
+    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)) {
+                if($nRtn === 2003) {
+                    refill\util::set_black($card_no);
+                }
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999])) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], true];
+            } else {
+                $err = 998;
+                $net_errno = "HTTP-{$err}";
+                return [false, $resp['szRtnCode'], true];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['szAgentId'] = config::USER_ID;
+        $params['szOrderId'] = $refill_info['order_sn'];
+        $key = config::KEY;
+        $content = "szAgentId={$params['szAgentId']}&szOrderId={$params['szOrderId']}&szKey={$key}";
+        $params['szVerifyString'] = md5($content);
+
+        $resp = http_request(config::QUERY_URL, $params, 'POST', false, config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '网络错误', ''];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误', ''];
+            }
+            $official_sn = '';
+
+            $status = intval($resp['nRtn']);
+            if ($status === 5012) {
+                $official_sn = $resp['szRtnMsg'];
+                $updata['official_sn'] = $official_sn;
+                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;
+            } elseif ($status === 5005 && (time() - $refill_info['commit_time'] >= 300)) {
+                $order_state = ORDER_STATE_NOEXIST;
+            } else {
+                return [false, $status, ''];
+            }
+            return [true, $order_state, $official_sn];
+        }
+    }
+
+    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);
+    }
+}

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

@@ -0,0 +1,32 @@
+<?php
+
+
+namespace refill\miaoxt_fs_three;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://47.118.46.242:10186/plat/api/old/submitorder';
+    const QUERY_URL= 'http://47.118.46.242:10186/plat/api/old/queryorder';
+    const BALANCE_URL = 'http://47.118.46.242:10186/plat/api/old/queryBalance';
+
+    const USER_ID= '200138';
+    const KEY = '06f547ff6c1a4a3ab888f23b48238e0c';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_miaoxt_fs_three.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
+    ];
+
+    //key格式 卡类型-面值-regin_no
+    const Price = [
+        //移动
+        "4-10-6" => 10.05, "4-20-6" => 20.1, "4-30-6" => 30.15, "4-50-6" => 50.25, "4-100-6" => 100.5, "4-200-6" => 201, "4-300-6" => 301.5, "4-500-6" => 502.5,//辽宁 6
+    ];
+}

+ 34 - 0
helper/refill/api/xyz/weisanhuo/API.MD

@@ -0,0 +1,34 @@
+
+## 微三活 普充
+
+### 账号:
+- 用户名:bjfqs
+- 密码:bjfqs@2023
+- 密钥ID(secretId):231c9717118f4413b1611a3a87221795
+- 密钥值(secretKey):0109d2f30b414832a0f1e8c29720eff3
+### 后台地址:
+> http://124.70.69.117:50080
+
+## 店铺
+- 账号:weisanhuo
+- 密码:weisanhuo67890
+
+### 编码
+序号 商品名称 商品代码 面值 商品类型 品牌
+1 全国电信200元 k-dx-200 200 元 手机话费 电信
+2 全国电信100元 k-dx-100 100 元 手机话费 电信
+3 全国电信50元 k-dx-50 50 元 手机话费 电信
+4 全国电信30元 k-dx-30 30 元 手机话费 电信
+5 全国移动500元 k-yd-500 500 元 手机话费 移动
+6 全国移动300元 k-yd-300 300 元 手机话费 移动
+7 全国移动200元 k-yd-200 200 元 手机话费 移动
+8 全国移动100元 k-yd-100 100 元 手机话费 移动
+9 全国移动50元 k-yd-50 50 元 手机话费 移动
+10 全国移动30元 k-yd-30 30 元 手机话费 移动
+11 全国联通200元 k-lt-200 200 元 手机话费 联通
+12 全国联通100元 k-lt-100 100 元 手机话费 联通
+13 全国联通50元 k-lt-50 50 元 手机话费 联通
+14 全国联通30元 k-lt-30 30 元 手机话费 联通
+
+### 测试代码
+- cshf1

+ 40 - 0
helper/refill/api/xyz/weisanhuo/RefillCallBack.php

@@ -0,0 +1,40 @@
+<?php
+namespace refill\weisanhuo;
+
+require_once(BASE_HELPER_RAPI_PATH . '/weisanhuo/config.php');
+
+use refill;
+
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $sign = config::sign($params, ['sign']);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    public function notify($params): array
+    {
+        $status = $params['status'];
+        $order_sn = $params['outTradeNo'];
+        $order_info = Model('vr_order')->getOrderInfoForNotify(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false, false, ''];
+        }
+
+        $order_id = $order_info['order_id'];
+        if ($status == 'success') {
+            $official_sn = $params['operatorTradeNo'];
+            Model('refill_order')->edit($order_id, ['official_sn' => $official_sn, 'ch_trade_no' => $params['inTradeNo']]);
+            return [$order_id, true, false, true, $official_sn];
+        } elseif ($status == 'failed') {
+            return [$order_id, false, true, true, ''];
+        } else {
+            return [$order_id, false, false, false, ''];
+        }
+    }
+}

+ 147 - 0
helper/refill/api/xyz/weisanhuo/RefillPhone.php

@@ -0,0 +1,147 @@
+<?php
+
+namespace refill\weisanhuo;
+
+require_once(BASE_HELPER_RAPI_PATH . '/weisanhuo/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $card_no, int $card_type, string $order_sn, int $amount): array
+    {
+        $params['outTradeNo'] = $order_sn;
+        $params['secretId'] = config::SECRET_ID;
+        $params['account'] = $card_no;
+
+        $product_id = config::ProductIdS[$card_type][$amount] ?? false;
+        if ($product_id === false){
+            return [];
+        }
+        $params['packageCode'] = $product_id;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params, &$net_errno = 0): array
+    {
+        $params = $this->req_params($card_no, $card_type, $params['order_sn'], $amount);
+        if (empty($params)){
+            return [false, '产品编码错误', false];
+        }
+
+        $sign = config::sign($params,['outTradeNo']);
+        $params['sign'] = $sign;
+
+        $params = json_encode($params);
+        $resp = http_post_data(config::ORDER_URL, $params , config::ExtHeaders, $net_errno);
+        if (empty($resp)) {
+            return [false, '系统错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+
+            $resp = json_decode($resp ,true);
+            if (empty($resp)) {
+                return [false, '系统错误', true];
+            }
+            if ($resp['success'] === false){
+                return [false, $resp['returnMessage'], false];
+            }
+
+            $status = $resp['data']['status'];
+            if ($status == 'waiting') {
+                return [true, $resp['data']['inTradeNo'], false];
+            } else {
+                return [false, $resp['data']['statusDesc'], false];
+            }
+        }
+    }
+
+    public function query($refill_info): array
+    {
+        $params['secretId'] = config::SECRET_ID;
+        $params['outTradeNo'] = $refill_info['order_sn'];
+        $sign = config::sign($params, ['outTradeNo']);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::QUERY_URL, $params, 'GET');
+        if (empty($resp)) {
+            return [false, '网络错误', ''];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+
+            $resp = json_decode($resp, true);
+            if (empty($resp))
+            {
+                return [false, '网络错误', ''];
+            }
+            elseif ($resp['success'] === true)
+            {
+                $offical_sn = '';
+
+                if(!empty($resp['data']))
+                {
+                    $status = $resp['data']['status'];
+                    if ($status == 'success') {
+                        $offical_sn = $resp['data']['operatorTradeNo'];
+                        $ch_trade_no = $resp['data']['inTradeNo'];
+                        Model('refill_order')->edit($refill_info['order_id'], ['official_sn' => $offical_sn,'ch_trade_no' => $ch_trade_no]);
+                        $order_state = ORDER_STATE_SUCCESS;
+                    } elseif ($status == 'failed') {
+                        $ch_trade_no = $resp['data']['inTradeNo'];
+                        Model('refill_order')->edit($refill_info['order_id'], ['ch_trade_no' => $ch_trade_no]);
+                        $order_state = ORDER_STATE_CANCEL;
+                    } elseif ($status == 'waiting') {
+                        $order_state = ORDER_STATE_SEND;
+                    } else {
+                        return [false, $status, $offical_sn];
+                    }
+
+                    return [true, $order_state, $offical_sn];
+                }
+                elseif ((time() - $refill_info['commit_time']) >= 600) {
+                    return [true, ORDER_STATE_NOEXIST, $offical_sn];
+                }
+                else {
+                    return [true, ORDER_STATE_SEND, $offical_sn];
+                }
+            }
+            else
+            {
+                return [false, $resp['returnMessage'], ''];
+            }
+        }
+    }
+
+    public function balance(): array
+    {
+        $params['secretId'] = config::SECRET_ID;
+
+        $sign = config::sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::BALANCE_URL, $params);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        } else {
+            Log::record($resp, Log::DEBUG);
+
+            $resp = json_decode($resp, true);
+            if ($resp['success'] === true) {
+                return [true, $resp['data']];
+            } else {
+                return [false, $resp['returnMessage']];
+            }
+        }
+    }
+}

BIN
helper/refill/api/xyz/weisanhuo/code.xlsx


+ 70 - 0
helper/refill/api/xyz/weisanhuo/config.php

@@ -0,0 +1,70 @@
+<?php
+namespace refill\weisanhuo;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://124.70.69.117:50050/api/v1/rest/multi/charge/single';
+    const QUERY_URL = 'http://124.70.69.117:50050/api/v1/rest/multi/charge/report/query';
+    const BALANCE_URL = 'http://124.70.69.117:50050/api/v1/rest/multi/charge/balance';
+
+    const SECRET_ID = '231c9717118f4413b1611a3a87221795';
+    const SECRET_KEY = '0109d2f30b414832a0f1e8c29720eff3';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_weisanhuo.php";
+    const ExtHeaders = ['Content-Type: application/json;charset=UTF-8'];
+
+    const ProductIdS = [
+        mtopcard\ChinaMobileCard =>
+            [
+                30 => 'k-yd-30',
+                50 => 'k-yd-50',
+                100 => 'k-yd-100',
+                200 => 'k-yd-200',
+                300 => 'k-yd-300',
+                500 => 'k-yd-500'
+            ],
+        mtopcard\ChinaUnicomCard =>
+            [
+                30 => 'k-lt-30',
+                50 => 'k-lt-50',
+                100 => 'k-lt-100',
+                200 => 'k-lt-200'
+            ],
+        mtopcard\ChinaTelecomCard =>
+            [
+                30 => 'k-dx-30',
+                50 => 'k-dx-50',
+                100 => 'k-dx-100',
+                200 => 'k-dx-200'
+            ]
+    ];
+
+    public static function sign(array $params, array $ignore = []): string
+    {
+        ksort($params);
+        $content = '';
+        foreach ($params as $key => $value) {
+            if (in_array($key, $ignore)) {
+                continue;
+            }
+
+            if(self::check_empty($value) === false) {
+                $key = strtolower($key);
+                $value = urlencode($value);
+                $content .= "$key=$value&";
+            }
+        }
+        $content .= "secretkey=" . config::SECRET_KEY;
+        return md5($content);
+    }
+
+    public static function check_empty($value): bool
+    {
+        if (!isset($value))
+            return true;
+        if (trim($value) === "null")
+            return true;
+
+        return false;
+    }
+}

BIN
helper/refill/api/xyz/weisanhuo/help.doc


BIN
helper/refill/api/xyz/weisanhuo/~$help.doc


+ 18 - 0
helper/refill/api/xyz/yiqian_tax/API.MD

@@ -0,0 +1,18 @@
+
+## 壹仟含税
+
+- 用户编号(userId): 261
+- 密钥(privateKey):c739d5f68333deaeb6ae04d30e60e836896587968219656fcf66c1708c76f9d7
+
+- 登录名: youlaiyouwang
+- 登录密码:sup123456
+- 后台地址:47.94.208.3:616
+
+- 接口文档地址: https://shimo.im/docs/5bqnr2OZw9SDz4qy/read
+- 查询地址:http://47.94.208.3:6160/unicomAync/buy.do
+- 下单地址:http://47.94.208.3:6160/unicomAync/queryBizOrder.do
+- 余额地址:http://47.94.208.3:6160/unicomAync/queryBalance.do
+
+## 店铺
+- 账号:yiqian_tax
+- 密码:yiqian_tax67890

+ 54 - 0
helper/refill/api/xyz/yiqian_tax/RefillCallBack.php

@@ -0,0 +1,54 @@
+<?php
+namespace refill\yiqian_tax;
+
+require_once(BASE_HELPER_RAPI_PATH . '/yiqian_tax/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): string
+    {
+        $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): array
+    {
+        $status = intval($params['status']);
+        $order_sn = $params['downstreamSerialno'];
+        $order_info = Model('vr_order')->getOrderInfoForNotify(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false, false, ''];
+        }
+        $order_id = $order_info['order_id'];
+
+        if ($status === 2) {
+            $official_sn = strtolower($params['voucher']) == 'null' ? '' : $params['voucher'];
+            $ch_trade_no = $params['ejId'];
+
+            $data['official_sn'] = $official_sn;
+            $data['ch_trade_no'] = $ch_trade_no;
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true, $official_sn];
+        }
+        elseif ($status === 3) {
+            return [$order_id, false, true, true, ''];
+        }
+        else {
+            return [$order_id, false, false, false, ''];
+        }
+    }
+}

+ 158 - 0
helper/refill/api/xyz/yiqian_tax/RefillPhone.php

@@ -0,0 +1,158 @@
+<?php
+declare(strict_types=0);
+
+namespace refill\yiqian_tax;
+
+require_once(BASE_HELPER_RAPI_PATH . '/yiqian_tax/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): array
+    {
+        $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): array
+    {
+        $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 = refill\util::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, 50])) {
+                $net_errno = "HTTP-{$code}";
+                return [false, $code, true];
+            } else {
+                return [false, $code, false];
+            }
+        }
+    }
+
+    public function query($refill_info): array
+    {
+        $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 = refill\util::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')
+                {
+                    $official_sn = '';
+
+                    $status = intval($resp['data']['status']);
+                    if ($status === 2) {
+                        $official_sn = $resp['data']['outOrderNo'];
+                        $ch_trade_no = $resp['data']['id'];
+                        Model('refill_order')->edit($refill_info['order_id'], ['official_sn' => $official_sn,'ch_trade_no' => $ch_trade_no]);
+                        $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, $official_sn];
+                }
+                elseif ($code === '22' && (time() - $refill_info['commit_time'] >= 600)) {
+                    return [true, ORDER_STATE_NOEXIST, ''];
+                }
+                else {
+                    return [false, $code, ''];
+                }
+            }
+        }
+    }
+
+    public function balance(): array
+    {
+        $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 = refill\util::xmlToArray($resp);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            } elseif ($resp['status'] === 'success' && $resp['code'] === '00') {
+                return [true, $resp['balance']/1000];
+            } else {
+                return [false, $resp['code']];
+            }
+        }
+    }
+
+    private function sign($params): string
+    {
+        $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);
+    }
+}

+ 53 - 0
helper/refill/api/xyz/yiqian_tax/config.php

@@ -0,0 +1,53 @@
+<?php
+
+
+namespace refill\yiqian_tax;
+
+use mtopcard;
+class config
+{
+    //回调地址需配置
+    const ORDER_URL = 'http://47.94.208.3:6160/unicomAync/buy.do';
+    const QUERY_URL= 'http://47.94.208.3:6160/unicomAync/queryBizOrder.do';
+    const BALANCE_URL = 'http://47.94.208.3:6160/unicomAync/queryBalance.do';
+
+    const USER_ID= '261';
+    const KEY = 'c739d5f68333deaeb6ae04d30e60e836896587968219656fcf66c1708c76f9d7';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_yiqian_tax.php";
+
+    const Products = [
+        mtopcard\ChinaMobileCard =>
+            [
+                10  => 90440010,
+                20  => 90440020,
+                30  => 90440030,
+                50  => 90440050,
+                100 => 90440100,
+                200 => 90440200,
+                300 => 90440300,
+                500 => 90440500
+            ],
+        mtopcard\ChinaUnicomCard =>
+            [
+                10  => 90460010,
+                20  => 90460020,
+                30  => 90460030,
+                50  => 90460050,
+                100 => 90460100,
+                200 => 90460200,
+                300 => 90460300,
+                500 => 90460500
+            ],
+        mtopcard\ChinaTelecomCard =>
+            [
+                10  => 90290010,
+                20  => 90290020,
+                30  => 90290030,
+                50  => 90290050,
+                100 => 90290100,
+                200 => 90290200,
+                300 => 90290300,
+                500 => 90290500
+            ]
+    ];
+}

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

@@ -72,7 +72,7 @@ class config
         "4-10-13" => 9.965, "4-20-13" => 19.93, "4-30-13" => 29.895, "4-50-13" => 49.825, "4-100-13" => 99.65, "4-200-13" => 199.3, "4-300-13" => 298.95, "4-500-13" => 498.25,//福建 13
         "4-10-5" => 10.035, "4-20-5" => 20.07, "4-30-5" => 30.09, "4-50-5" => 50.15, "4-100-5" => 100.3, "4-200-5" => 200.4, "4-300-5" => 300.6, "4-500-5" => 501,//内蒙古 5
         "4-30-18" => 29.835, "4-50-18" => 49.725, "4-100-18" => 99.45, "4-200-18" => 198.3,//湖南 18
-        "4-10-19" => 10.1, "4-20-19" => 20.2, "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-19" => 10.1, "4-20-19" => 20.2, "4-30-19" => 29.97, "4-50-19" => 49.95, "4-100-19" => 99.9, "4-200-19" => 199.8, "4-300-19" => 299.7, "4-500-19" => 499.5,//广东 19
         "4-10-7" => 9.93, "4-20-7" => 19.86, "4-30-7" => 29.52, "4-50-7" => 49.2, "4-100-7" => 98.4, "4-200-7" => 196.8, "4-300-7" => 295.2, "4-500-7" => 492,//吉林 7
         "4-10-1" => 10.31, "4-20-1" => 20.32, "4-30-1" => 30.33, "4-50-1" => 50.35, "4-100-1" => 100.4, "4-200-1" => 200.3, "4-300-1" => 300.45, "4-500-1" => 500.75,//北京 1
         "4-10-22" => 10.015, "4-20-22" => 20.03, "4-30-22" => 30.045, "4-50-22" => 50.075, "4-100-22" => 100.15, "4-200-22" => 200.3, "4-300-22" => 300.45, "4-500-22" => 500.75,//重庆 22

+ 14 - 0
helper/refill/api/yl/yezipczy/API.MD

@@ -0,0 +1,14 @@
+### 椰子普充专用
+- 接口地址:https://admin.xyzshops.cn/merchant/#/login
+
+### 机构账号
+- yezipczy
+- dfsc_783x
+- 10496
+
+### 店铺账号
+- yezipczy
+- yezipczy67890
+- 
+### 密钥
+b701a31d53d9bd0776cf98423cde87e1

+ 76 - 0
helper/refill/api/yl/yezipczy/RefillCallBack.php

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

+ 161 - 0
helper/refill/api/yl/yezipczy/RefillPhone.php

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

+ 13 - 0
helper/refill/api/yl/yezipczy/config.php

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

+ 37 - 9
helper/refill/event/IEventRefill.php

@@ -4,14 +4,42 @@ namespace refill\event;
 
 use refill\order;
 
-interface IEventRefill
+class IEventRefill
 {
-    public function load(array $cfgs);
-    public function onBeforeSubmit(order $order);
-    public function onSubmit(order $order);
-    public function onBeforeCommit(order $order, $ch_name): bool;
-    public function onCommit(order $order, $ch_name);
-    public function onNeterror(order $order, $ch_name);
-    public function onNotify($refill_info, $order_info, $success);
-    public function onComplete($refill_info, $order_info, $success);
+    public function load(array $cfgs)
+    {
+
+    }
+    public function onBeforeSubmit(order $order) : bool
+    {
+        return true;
+    }
+    public function onSubmit(order $order)
+    {
+
+    }
+    public function onBeforeCommit(order $order, $ch_name): bool
+    {
+        return true;
+    }
+    public function onCommit(order $order, $ch_name)
+    {
+
+    }
+    public function onNeterror(order $order, $ch_name)
+    {
+
+    }
+    public function onNotify($refill_info, $order_info, $success)
+    {
+
+    }
+    public function onComplete($refill_info, $order_info, $success)
+    {
+
+    }
+    public function onEventCallback($refill_info, $mch_info, &$ctls)
+    {
+
+    }
 }

+ 2 - 3
helper/refill/event/card_crash.php

@@ -8,7 +8,7 @@ use mtopcard;
 use Log;
 
 # 规避相同手机卡号撞单问题解
-class card_crash implements IEventRefill
+class card_crash extends IEventRefill
 {
     use crash;
     public const cache_name = 'card_crash';
@@ -32,7 +32,7 @@ class card_crash implements IEventRefill
         $this->mSuccInterval = intval($cfgs['succ_interval'] ?? 900);
     }
 
-    public function onBeforeSubmit(order $order)
+    public function onBeforeSubmit(order $order) : bool
     {
         if(!$order->is_phone()) {
             return true;
@@ -136,5 +136,4 @@ class card_crash implements IEventRefill
 
         $this->complete($card_no, $oid, $ch_name, $success);
     }
-
 }

+ 111 - 0
helper/refill/event/cbparams_pick.php

@@ -0,0 +1,111 @@
+<?php
+/**
+ *   cb_filter.php
+ *   stanley-king
+ *   2023/11/29
+ *   PhpStorm
+ *   PHPProject
+ */
+
+namespace refill\event;
+
+class cbparams_pick extends IEventRefill
+{
+    private $mOpenOSN = false;
+    private $mOsnStarts = [];
+    private $mOsnMchids = [];
+
+    private $mOpenSMS = false;
+    private $mSmsMchids = [];
+
+    public function load(array $cfgs)
+    {
+        $osns_reader = function ($input)
+        {
+            $sns = [];
+            $data = explode(',', $input);
+            foreach ($data as $val)
+            {
+                $val = trim($val);
+                if (!empty($val)) {
+                    $sns[] = strtolower($val);
+                }
+            }
+
+            return $sns;
+        };
+
+        $ids_reader = function ($input)
+        {
+            $ids = [];
+            $data = explode(',', $input);
+            foreach ($data as $val)
+            {
+                $val = trim($val);
+                $val = intval($val);
+                if ($val > 0) {
+                    $ids[] = $val;
+                }
+            }
+
+            return $ids;
+        };
+
+
+        $this->mOpenOSN = $cfgs['open_notify_osn'] ?? false;
+        if ($this->mOpenOSN) {
+            $this->mOsnStarts = $osns_reader($cfgs['cfgs_notify_osn']['exclude_sns_start'] ?? []);
+            $this->mOsnMchids = $ids_reader($cfgs['cfgs_notify_osn']['exclude_mchids'] ?? []);
+        }
+
+        $this->mOpenSMS = $cfgs['open_sms'] ?? false;
+        if ($this->mOpenSMS) {
+            $this->mSmsMchids = $ids_reader($cfgs['cfgs_sms']['include_mchids'] ?? []);
+        }
+    }
+
+    public function onEventCallback($refill_info, $mch_info, &$ctls)
+    {
+        $start_with = function ($haystack, $needle) {
+            $length = strlen($needle);
+            return (substr($haystack, 0, $length) === $needle);
+        };
+
+        $snNeedExclude = function ($osn) use ($start_with)
+        {
+            $osn = strtolower($osn);
+            foreach ($this->mOsnStarts as $header)
+            {
+                if ($start_with($osn, $header)) {
+                    return true;
+                }
+            }
+            return false;
+        };
+
+
+        $mchid = $refill_info['mchid'];
+
+        $need_osn = true;
+        if($this->mOpenOSN)
+        {
+            $osn = $refill_info['official_sn'] ?? "";
+            $snEx = $snNeedExclude($osn);
+            $mchNeed = in_array($mchid,$this->mOsnMchids);
+
+            if ($snEx and !$mchNeed) {
+                $need_osn = false;
+            }
+        }
+        $ctls['osn'] = $need_osn;
+
+        $need_sms = false;
+        if($this->mOpenSMS)
+        {
+            if(in_array($mchid,$this->mSmsMchids)) {
+                $need_sms = true;
+            }
+        }
+        $ctls['sms'] = $need_sms;
+    }
+}

+ 21 - 14
helper/refill/policy/xyz/policy.php

@@ -520,6 +520,15 @@ class policy extends ProviderManager implements IPolicy
             $err_msg = 'fail';
         }
 
+        $ctls = ['osn' => true, 'sms' => false];
+        util::onEventCallback($refill_info, $mch_info, $ctls);
+
+        if($ctls['osn']) {
+            $osn = $refill_info['official_sn'] ?? "";
+        } else {
+            $osn = "";
+        }
+
         $params = [
             "mchid" => $refill_info['mchid'],
             "order_sn" => $refill_info['mch_order'],
@@ -529,13 +538,16 @@ class policy extends ProviderManager implements IPolicy
             "trade_no" => $refill_info['order_sn'],
             "idcard" => $refill_info['idcard'] ?? "",
             "card_name" => $refill_info['card_name'] ?? "",
-            'official_sn' => $refill_info['official_sn'] ?? "",
+            'official_sn' => $osn,
             'message' => $err_msg,
             "state" => $state];
 
-        [$has_sms,$sms] = $this->sms($refill_info);
-        if($has_sms) {
-            $params['sms'] = $sms;
+        if($ctls['sms'])
+        {
+            [$has_sms,$sms] = $this->sms($refill_info);
+            if($has_sms) {
+                $params['sms'] = $sms;
+            }
         }
 
         $secure_key = $mch_info['secure_key'];
@@ -546,16 +558,11 @@ class policy extends ProviderManager implements IPolicy
 
     private function sms($refill_info)
     {
-        global $config;
-
-        $mchids = $config['sms_mchids'];
-        $mchid = $refill_info['mchid'];
         $official_sn = $refill_info['official_sn'] ?? "";
         $card_type = $refill_info['card_type'];
         $card_no = $refill_info['card_no'];
         $amount = intval($refill_info['refill_amount']);
-
-        if(in_array($mchid,$mchids) && !empty($official_sn) && $card_type == mtopcard\SinopecCard && !empty($card_no))
+        if(!empty($official_sn) && $card_type == mtopcard\SinopecCard && !empty($card_no))
         {
             $short_no = substr($card_no,-6);
             $ret = preg_match('/\d{4}(?P<month>\d{2})(?P<day>\d{2})(?P<hour>\d{2})(?P<min>\d{2})\d{4}/u', $official_sn, $matches);
@@ -577,15 +584,15 @@ class policy extends ProviderManager implements IPolicy
         foreach ($params as $k => $v) {
             if (false === $this->check_empty($v) && "@" != substr($v, 0, 1)) {
                 if ($i == 0) {
-                    $body .= "{$k}" . "=" . urlencode($v);
+                    $body .= "$k" . "=" . urlencode($v);
                 } else {
-                    $body .= "&" . "{$k}" . "=" . urlencode($v);
+                    $body .= "&" . "$k" . "=" . urlencode($v);
                 }
                 $i++;
             }
         }
-        $body .= "&key={$key}";
-        Log::record("notify body={$body}",Log::DEBUG);
+        $body .= "&key=$key";
+        Log::record("notify_body=$body", Log::DEBUG);
 
         return md5($body);
     }

+ 7 - 0
helper/refill/util.php

@@ -474,6 +474,11 @@ class util
         Log::record("onEvent complete uid=$uid channel=$ch_name success=$success", Log::DEBUG);
         EventManager::instance()->onComplete($refill_info, $order_info, $success);
     }
+
+    public static function onEventCallback($refill_info, $mch_info, &$ctls)
+    {
+        EventManager::instance()->onEventCallback($refill_info, $mch_info, $ctls);
+    }
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     public static function set_order_channels($mchid,$mchorder,$datas)
     {
@@ -751,6 +756,7 @@ class util
             sleep(3);
             while (true)
             {
+                $net_errno = 0;
                 $resp = http_request($url,['status' => $status,'order_sn' => $order_sn],'GET', false, [], $net_errno);
                 if($resp == 'SUCCESS') {
                     break;
@@ -776,6 +782,7 @@ class util
             sleep(3);
             while (true)
             {
+                $net_errno = 0;
                 $resp = http_request($url,['status' => $status,'order_sn' => $order_sn],'GET', false, [], $net_errno);
                 if($resp == 'SUCCESS') {
                     break;

+ 0 - 2
mchsrv/control/merchant_info.php

@@ -1,6 +1,4 @@
 <?php
-require_once(BASE_ROOT_PATH . '/mobile/control/merchantweb.php');
-
 class merchant_infoControl extends mbMerchantControl
 {
     public function __construct()

+ 0 - 2
mchsrv/control/merchant_login.php

@@ -1,7 +1,5 @@
 <?php
 
-require_once(BASE_ROOT_PATH . '/mobile/control/merchantweb.php');
-
 //商户后台登录
 class merchant_loginControl extends merchantwebControl
 {

+ 0 - 1
mchsrv/control/merchant_order.php

@@ -2,7 +2,6 @@
 
 use task\manager;
 
-require_once(BASE_ROOT_PATH . '/mobile/control/merchantweb.php');
 require_once(BASE_HELPER_PATH . '/task/task_helper.php');
 
 class merchant_orderControl extends mbMerchantControl

+ 0 - 1
mchsrv/control/merchant_refill.php

@@ -1,6 +1,5 @@
 <?php
 
-require_once(BASE_ROOT_PATH . '/mobile/control/merchantweb.php');
 require_once(BASE_HELPER_PATH . '/refill/RefillFactory.php');
 require_once(BASE_HELPER_PATH . '/mtopcard/mtopcard.php');
 

+ 0 - 2
mchsrv/control/refill_evidence.php

@@ -1,6 +1,4 @@
 <?php
-require_once(BASE_ROOT_PATH . '/mobile/control/merchantweb.php');
-
 class refill_evidenceControl extends mbMerchantControl
 {
     public function __construct()

+ 2 - 1
mchsrv/index.php

@@ -9,4 +9,5 @@
 require_once(BASE_PATH . '/config/config.ini.php');
 require_once(BASE_HELPER_PATH . '/errcode.php');
 require_once(BASE_PATH . '/control/merchant.php');
-require_once(BASE_PATH . '/framework/function/function.php');
+require_once(BASE_PATH . '/framework/function/function.php');
+require_once(BASE_PATH . '/control/merchantweb.php');

+ 2 - 2
mchsrv/mchsrv_run.php

@@ -35,7 +35,7 @@ require_once(BASE_ROOT_PATH . '/helper/third_author/wxauthor.php');
 require_once(BASE_ROOT_PATH . '/helper/fcode/present_manager.php');
 require_once(BASE_ROOT_PATH . '/helper/url_helper.php');
 require_once(BASE_ROOT_PATH . '/helper/activity_helper.php');
-require_once(BASE_HELPER_PATH . '/fcgisrv/RAccServer.php');
+require_once(BASE_HELPER_PATH . '/fcgisrv/MerchantServer.php');
 require_once(BASE_HELPER_PATH . '/refill/util.php');
 
 
@@ -52,4 +52,4 @@ StatesHelper::init();
 $listener = new message\subscriber($gMessageStates);
 $listener->start();
 
-fcgisrv\RAccServer::instance()->run_looper();
+fcgisrv\MerchantServer::instance()->run_looper();

+ 4 - 0
mobile/callback/refill_miaoxt_fs_three.php

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

+ 6 - 0
mobile/callback/refill_weisanhuo.php

@@ -0,0 +1,6 @@
+<?php
+$content = $_SERVER['post_content'] ?? [];
+$input = json_decode($content,true);
+refill\util::push_notify('weisanhuo',$input);
+
+echo ('success');

+ 4 - 0
mobile/callback/refill_yezipczy.php

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

+ 4 - 0
mobile/callback/refill_yiqian_tax.php

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

+ 17 - 0
test/TestHttp.php

@@ -85,4 +85,21 @@ class TestHttp extends TestCase
             [$x,$y,$z,$a] = $val;
         }
     }
+
+    public function testGoods()
+    {
+//        $params = [ 'mchid' => 10384,
+//            "op"  => "goods",
+//            'act' => 'refill'
+//        ];
+
+        //$resp = $proxy->send("https://www.xyzshops.cn/mobile/index.php", $params);
+
+        $params = [ 'mchid' => 10384,
+            "op"  => "goods",
+            'act' => 'refill'
+        ];
+        $proxy = new refill_proxy("682240597a865cfba5214a0c8477bd76");
+        $resp = $proxy->send("https://ylapi.xyzshops.cn/mobile/index.php", $params);
+    }
 }

+ 29 - 0
test/TestRefill.php

@@ -5808,6 +5808,35 @@ class TestRefill extends TestCase
         $provider = $this->getProvider('beirui_trd');
         $resp = $provider->balance();
     }
+
+    public function testweisanhuo()
+    {
+        $provider = $this->getProvider('weisanhuo');
+        $resp = $provider->balance();
+//        $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
+        $resp = $provider->query(['order_sn' => '24271700815859899563']);
+
+//        $post = '{"operatorTradeNo":"","statusDesc":"交易成功","phone":"18780103116","outTradeNo":"202309250000000006","sign":"d793406757c1bb920fe518e9673a28ea","inTradeNo":"202309251766523539","status":"success","reportTime":"1695607732705"}';
+//        $data = json_decode($post, true);
+//        $provider = $this->getProvider('weisanhuo', 'RefillCallBack');
+//
+//        $ret = $provider->verify($data);
+//        $resp = $provider->notify($data);
+    }
+
+    public function testyiqian_tax()
+    {
+        $provider = $this->getProvider('yiqian_tax');
+        $resp = $provider->balance();
+//        $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
+//        $resp = $provider->query(['order_sn' => '24271700815859899563']);
+    }
+
+    public function testmiaoxt_fs_three()
+    {
+        $provider = $this->getProvider('miaoxt_fs_three');
+        $resp = $provider->balance();
+    }
 }
 
 

+ 20 - 4
test/TestRefillUtil.php

@@ -12,10 +12,11 @@ require_once(BASE_ROOT_PATH . '/fooder.php');
 
 require_once(BASE_HELPER_PATH . '/refill/XYZRefillFactory.php');
 
-//require_once(BASE_HELPER_PATH . '/refill/util.php');
-//require_once(BASE_HELPER_PATH . '/refill/EventManager.php');
-//require_once(BASE_HELPER_PATH . '/refill/event/test_crash.php');
-//require_once(BASE_HELPER_PATH . '/refill/order.php');
+require_once(BASE_HELPER_PATH . '/refill/util.php');
+require_once(BASE_HELPER_PATH . '/refill/EventManager.php');
+require_once(BASE_HELPER_PATH . '/refill/event/test_crash.php');
+require_once(BASE_HELPER_PATH . '/refill/event/cbparams_pick.php');
+require_once(BASE_HELPER_PATH . '/refill/order.php');
 
 class TestRefillUtil extends TestCase
 {
@@ -102,6 +103,21 @@ class TestRefillUtil extends TestCase
         $crasher->testCommit($card_no_a,$oid_a,'b');
     }
 
+    public function testCbparamsPick()
+    {
+        $cacher = Cache::getInstance('cacheredis');
+        $cfgs = $cacher->get('event-config', 'refill-');
+        if(!empty($cfgs)) {
+            $cfgs = unserialize($cfgs);
+        }
+
+        if($cfgs['open_notify_osn'] || $cfgs['open_sms']) {
+            $event = new refill\event\cbparams_pick();
+            $event->load($cfgs);
+            $event->onEventCallback(['official_sn' => '1002','mchid' => 1093],[],$ctls);
+        }
+    }
+
     public function testGetDetail()
     {
         $mod_refill = Model('refill_order');

+ 15 - 0
test/mh/TestRefill.php

@@ -147,4 +147,19 @@ class TestRefill extends TestCase
     {
         $microtime = intval(microtime(true) * 1000);
     }
+
+    public function testweisanhuo()
+    {
+        $provider = $this->getProvider('weisanhuo');
+//        $resp = $provider->balance();
+//        $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
+        $resp = $provider->query(['order_sn' => '24271700815859899563-9']);
+
+        $post = '{"operatorTradeNo":"","statusDesc":"交易成功","phone":"18780103116","outTradeNo":"202309250000000006","sign":"d793406757c1bb920fe518e9673a28ea","inTradeNo":"202309251766523539","status":"success","reportTime":"1695607732705"}';
+        $data = json_decode($post, true);
+        $provider = $this->getProvider('weisanhuo', 'RefillCallBack');
+
+        $ret = $provider->verify($data);
+//        $resp = $provider->notify($data);
+    }
 }

+ 65 - 0
vapi/framework/function/function.php

@@ -0,0 +1,65 @@
+<?php
+/**
+ * mobile公共方法
+ *
+ * 公共方法
+ *
+ */
+defined('InShopNC') or exit('Access Invalid!');
+
+
+require_once(BASE_CORE_PATH . '/framework/libraries/model.php');
+require_once(BASE_DATA_PATH . '/model/member.model.php');
+
+function joutput_data($datas,$type='')
+{
+    $data = [];
+
+    $code = errcode::Success;
+    $data['code'] = $code;
+    $data['message'] = errcode::msg($code);
+
+    $data['datas'] = $datas;
+
+    if($_SESSION['client_type'] != 'ajax')
+    {
+        $contents = ob_get_clean();
+        if(!empty($contents)) {
+            Log::record($contents,Log::ERR);
+        }
+        ob_start();
+    }
+
+    if(!empty($type) && $type == 'web') {
+        echo(json_encode($data,JSON_UNESCAPED_UNICODE));
+    } else {
+        echo(json_encode($data));
+    }
+}
+
+function joutput_error($code,$message = '',$type='')
+{
+    if(empty($message)) {
+        $message = errcode::msg($code);
+    }
+
+    $data = [];
+    $data['code'] = $code;
+    $data['message'] =  $message;
+    $data['datas'] = [];
+
+    if($_SESSION['client_type'] != 'ajax')
+    {
+        $contents = ob_get_clean();
+        if(!empty($contents)) {
+            Log::record($contents,Log::ERR);
+        }
+        ob_start();
+    }
+    Log::record("code = {$code} message = {$message}",Log::ERR);
+    if(!empty($type) && $type == 'web') {
+        echo(json_encode($data,JSON_UNESCAPED_UNICODE));
+    } else {
+        echo(json_encode($data,JSON_UNESCAPED_UNICODE));
+    }
+}

+ 1 - 0
vapi/framework/index.html

@@ -0,0 +1 @@
+ 

+ 3 - 2
vapi/index.php

@@ -4,6 +4,7 @@
  *
  *
  */
-
+require_once(BASE_HELPER_PATH . '/errcode.php');
+require_once(BASE_PATH . '/framework/function/function.php');
 require_once(BASE_PATH . '/control/vbase.php');
-require_once(BASE_PATH . '/control/merchant.php');
+require_once(BASE_PATH . '/control/merchant.php');