浏览代码

Merge branch 'raccount' into rprofit

stanley-king 2 年之前
父节点
当前提交
cda31e1b9d
共有 45 个文件被更改,包括 1855 次插入75 次删除
  1. 136 33
      data/config/xyz/refill.ini.php
  2. 53 19
      data/config/yl/refill.ini.php
  3. 2 2
      data/model/retail.model.php
  4. 22 0
      docker/compose/homecuda/admin_vendor/docker-compose.yml
  5. 155 0
      docker/compose/homecuda/conf/nginx/nginx_vendor.conf
  6. 2 2
      docker/compose/xyz/conf/nginx/nginx_admin.conf
  7. 16 2
      docker/compose/yl/conf/nginx/nginx_admin.conf
  8. 1 0
      docker/compose/yl/yladmin/docker-compose.yml
  9. 50 0
      helper/refill/api/xyz/bodian_yd/RefillCallBack.php
  10. 140 0
      helper/refill/api/xyz/bodian_yd/RefillPhone.php
  11. 15 0
      helper/refill/api/xyz/bodian_yd/api.txt
  12. 27 0
      helper/refill/api/xyz/bodian_yd/config.php
  13. 50 0
      helper/refill/api/xyz/dazhanggui_fs/RefillCallBack.php
  14. 161 0
      helper/refill/api/xyz/dazhanggui_fs/RefillPhone.php
  15. 30 0
      helper/refill/api/xyz/dazhanggui_fs/api.txt
  16. 72 0
      helper/refill/api/xyz/dazhanggui_fs/config.php
  17. 48 0
      helper/refill/api/xyz/feimingyu_high/RefillCallBack.php
  18. 155 0
      helper/refill/api/xyz/feimingyu_high/RefillPhone.php
  19. 36 0
      helper/refill/api/xyz/feimingyu_high/config.php
  20. 21 0
      helper/refill/api/xyz/feimingyu_high/对接文档-yezi.txt
  21. 二进制
      helper/refill/api/xyz/guochuang/20220922广东移动调价函.png
  22. 二进制
      helper/refill/api/xyz/guochuang/20220922黑龙江移动调价函.png
  23. 二进制
      helper/refill/api/xyz/guochuang/20220924广东移动调价函.jpg
  24. 二进制
      helper/refill/api/xyz/guochuang/20220925广东移动调价函.jpg
  25. 2 2
      helper/refill/api/xyz/guochuang/config.php
  26. 4 1
      helper/refill/api/xyz/lechong/account.txt
  27. 3 2
      helper/refill/api/xyz/lechong/config.php
  28. 50 0
      helper/refill/api/yl/dazhanggui_fs/RefillCallBack.php
  29. 161 0
      helper/refill/api/yl/dazhanggui_fs/RefillPhone.php
  30. 30 0
      helper/refill/api/yl/dazhanggui_fs/api.txt
  31. 72 0
      helper/refill/api/yl/dazhanggui_fs/config.php
  32. 48 0
      helper/refill/api/yl/feimingyu_high/RefillCallBack.php
  33. 155 0
      helper/refill/api/yl/feimingyu_high/RefillPhone.php
  34. 36 0
      helper/refill/api/yl/feimingyu_high/config.php
  35. 21 0
      helper/refill/api/yl/feimingyu_high/对接文档-yezi.txt
  36. 2 2
      helper/refill/api/yl/guochuang/config.php
  37. 3 2
      helper/refill/api/yl/lechong/config.php
  38. 6 6
      helper/refill/ops/order_clear.php
  39. 2 1
      helper/refill/policy/ctl_itemex.php
  40. 4 0
      mobile/callback/refill_bodian_yd.php
  41. 4 0
      mobile/callback/refill_dazhanggui_fs.php
  42. 4 0
      mobile/callback/refill_feimingyu_high.php
  43. 42 0
      test/TestRefill.php
  44. 2 1
      test/TestRefillClear.php
  45. 12 0
      test/TestRefillYl.php

+ 136 - 33
data/config/xyz/refill.ini.php

@@ -1899,22 +1899,28 @@ $lechong_phone = ['name' => 'lechong', 'store_id' => 99, 'qualitys' => '1',
 //        10 => [['goods_id' => 6885, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        20 => [['goods_id' => 6886, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
         30 => [
-            ['goods_id' => 6887, 'price' => 28.8, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6887, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6887, 'price' => 28.95, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6887, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6887, 'price' => 28.62, 'quality' => 1, 'card_type' => 'chinatelecom'],
         ],
         50 => [
-            ['goods_id' => 6888, 'price' => 48, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6888, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6888, 'price' => 48.25, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6888, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6888, 'price' => 47.7, 'quality' => 1, 'card_type' => 'chinatelecom'],
         ],
         100 => [
-            ['goods_id' => 6889, 'price' => 96, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6889, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6889, 'price' => 96.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6889, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6889, 'price' => 95.4, 'quality' => 1, 'card_type' => 'chinatelecom'],
         ],
         200 => [
-            ['goods_id' => 6890, 'price' => 192, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6890, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6890, 'price' => 193, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6890, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6890, 'price' => 190.8, 'quality' => 1, 'card_type' => 'chinatelecom'],
+        ],
+        300 => [
+            ['goods_id' => 6891, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom']
         ],
-//        300 => [['goods_id' => 6891, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        500 => [['goods_id' => 6892, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -5055,49 +5061,72 @@ $ruixundaman_phone = ['name' => 'ruixundaman', 'store_id' => 201, 'qualitys' =>
 
 $ruizhi_tax_phone = ['name' => 'ruizhi_tax', 'store_id' => 202, 'qualitys' => '2',
     'amount' => [
+        1  => [
+            ['goods_id' => 8047, 'price' => 1.085, 'quality' => 2, 'card_type' => 'chinaunicom'],
+        ],
+        2  => [
+            ['goods_id' => 8048, 'price' => 2.17, 'quality' => 2, 'card_type' => 'chinaunicom'],
+        ],
+        3  => [
+            ['goods_id' => 8049, 'price' => 3.255, 'quality' => 2, 'card_type' => 'chinaunicom'],
+        ],
+        4  => [
+            ['goods_id' => 8050, 'price' => 4.34, 'quality' => 2, 'card_type' => 'chinaunicom'],
+        ],
         5 => [
-            ['goods_id' => 7697, 'price' => 5.485, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7697, 'price' => 5.435, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7697, 'price' => 5.425, 'quality' => 2, 'card_type' => 'chinaunicom']
+        ],
+        6  => [
+            ['goods_id' => 8051, 'price' => 6.51, 'quality' => 2, 'card_type' => 'chinaunicom'],
+        ],
+        7  => [
+            ['goods_id' => 8052, 'price' => 7.595, 'quality' => 2, 'card_type' => 'chinaunicom'],
+        ],
+        8  => [
+            ['goods_id' => 8053, 'price' => 8.68, 'quality' => 2, 'card_type' => 'chinaunicom'],
+        ],
+        9  => [
+            ['goods_id' => 8054, 'price' => 9.765, 'quality' => 2, 'card_type' => 'chinaunicom'],
         ],
         10 => [
             ['goods_id' => 7698, 'price' => 10.98, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7698, 'price' => 10.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7698, 'price' => 10.62, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7698, 'price' => 10.62, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7698, 'price' => 11.1, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
             ['goods_id' => 7699, 'price' => 21.96, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7699, 'price' => 20.82, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7699, 'price' => 21, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7699, 'price' => 21.04, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7699, 'price' => 21.5, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 7700, 'price' => 31.41, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7700, 'price' => 31.23, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7700, 'price' => 31.41, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7700, 'price' => 31.25, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7700, 'price' => 31.56, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7700, 'price' => 31.95, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 7701, 'price' => 52.15, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7701, 'price' => 52.05, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7701, 'price' => 52.15, 'quality' => 2, 'card_type' => 'chinatelecom'],
+            ['goods_id' => 7701, 'price' => 52.75, 'quality' => 2, 'card_type' => 'chinatelecom'],
         ],
         100 => [
             ['goods_id' => 7702, 'price' => 104, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7702, 'price' => 103.95, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7702, 'price' => 104, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7702, 'price' => 104.5, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 7703, 'price' => 208, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7703, 'price' => 207.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7703, 'price' => 208, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7703, 'price' => 208.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
             ['goods_id' => 7704, 'price' => 312, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7704, 'price' => 311.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7704, 'price' => 312, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7704, 'price' => 312.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
             ['goods_id' => 7705, 'price' => 520, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7705, 'price' => 519.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7705, 'price' => 520, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7705, 'price' => 521.5, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -5901,36 +5930,36 @@ $bodian_phone = ['name' => 'bodian', 'store_id' => 226, 'qualitys' => '2',
 //            ['goods_id' => 7879, 'price' => 19.96, 'quality' => 2, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7879, 'price' => 19.96, 'quality' => 2, 'card_type' => 'chinatelecom']
 //        ],
-        30 => [
-            ['goods_id' => 7880, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinamobile'],
+//        30 => [
+//            ['goods_id' => 7880, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinamobile'],
 //            ['goods_id' => 7880, 'price' => 29.94, 'quality' => 2, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7880, 'price' => 29.94, 'quality' => 2, 'card_type' => 'chinatelecom']
-        ],
+//        ],
         50 => [
-            ['goods_id' => 7881, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7881, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7881, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7881, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7882, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7882, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7882, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7882, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7883, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7883, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7883, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7883, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 7884, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7884, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7884, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7884, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
-        500 => [
-            ['goods_id' => 7885, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinamobile'],
+//        500 => [
+//            ['goods_id' => 7885, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinamobile'],
 //            ['goods_id' => 7885, 'price' => 499, 'quality' => 2, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7885, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
-        ]
+//        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
@@ -6717,6 +6746,77 @@ $yingdian_hf_phone = ['name' => 'yingdian_hf', 'store_id' => 246, 'qualitys' =>
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$bodian_yd_phone = ['name' => 'bodian_yd', 'store_id' => 247, 'qualitys' => '2',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 8039, 'price' => 9.8, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8039, 'price' => 9.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 8039, 'price' => 9.8, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 8040, 'price' => 19.6, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8040, 'price' => 19.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 8040, 'price' => 19.6, 'quality' => 2, 'card_type' => 'chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 8041, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8041, 'price' => 29.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 8041, 'price' => 29.4, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 8042, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8042, 'price' => 49, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 8042, 'price' => 49, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 8043, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8043, 'price' => 98, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 8043, 'price' => 98, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 8044, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8044, 'price' => 196, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 8044, 'price' => 196, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 8045, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8045, 'price' => 294, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 8045, 'price' => 294, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 8046, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8046, 'price' => 490, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 8046, 'price' => 490, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$dazhanggui_fs_phone = ['name' => 'dazhanggui_fs', 'store_id' => 248, 'qualitys' => '1',
+    'amount' => [
+        10 => [['goods_id' => 8055, 'price' => 9.99, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']],
+        20 => [['goods_id' => 8056, 'price' => 19.98, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']],
+        30 => [['goods_id' => 8057, 'price' => 29.97, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']],
+        50 => [['goods_id' => 8058, 'price' => 49.95, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']],
+        100 => [['goods_id' => 8059, 'price' => 99.9, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']],
+        200 => [['goods_id' => 8060, 'price' => 199.8, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']],
+        300 => [['goods_id' => 8061, 'price' => 299.7, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']],
+        500 => [['goods_id' => 8062, 'price' => 499.5, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$feimingyu_high_phone = ['name' => 'feimingyu_high', 'store_id' => 249, 'qualitys' => '1',
+    'amount' => [
+//        10 => [['goods_id' => 8063, 'price' => 9.79, 'quality' => 1, 'card_type' => 'chinamobile']],
+//        20 => [['goods_id' => 8064, 'price' => 19.58, 'quality' => 1, 'card_type' => 'chinamobile']],
+        30 => [['goods_id' => 8065, 'price' => 29.37, 'quality' => 1, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 8066, 'price' => 48.95, 'quality' => 1, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 8067, 'price' => 97.9, 'quality' => 1, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 8068, 'price' => 195.8, 'quality' => 1, 'card_type' => 'chinamobile']],
+//        300 => [['goods_id' => 8069, 'price' => 293.7, 'quality' => 1, 'card_type' => 'chinamobile']],
+//        500 => [['goods_id' => 8070, 'price' => 489.5, 'quality' => 1, 'card_type' => 'chinamobile']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -6920,6 +7020,9 @@ $phone_providers = [
     ['name' => 'yelin_hf', 'cfg' => $yelin_hf_phone],
     ['name' => 'dazhanggui_high', 'cfg' => $dazhanggui_high_phone],
     ['name' => 'yingdian_hf', 'cfg' => $yingdian_hf_phone],
+    ['name' => 'bodian_yd', 'cfg' => $bodian_yd_phone],
+    ['name' => 'dazhanggui_fs', 'cfg' => $dazhanggui_fs_phone],
+    ['name' => 'feimingyu_high', 'cfg' => $feimingyu_high_phone],
 
 ];
 $config['phone_providers'] = $phone_providers;

+ 53 - 19
data/config/yl/refill.ini.php

@@ -1907,22 +1907,28 @@ $lechong_phone = ['name' => 'lechong', 'store_id' => 99, 'qualitys' => '1',
 //        10 => [['goods_id' => 6885, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        20 => [['goods_id' => 6886, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
         30 => [
-            ['goods_id' => 6887, 'price' => 28.8, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6887, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6887, 'price' => 28.95, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6887, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6887, 'price' => 28.62, 'quality' => 1, 'card_type' => 'chinatelecom'],
         ],
         50 => [
-            ['goods_id' => 6888, 'price' => 48, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6888, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6888, 'price' => 48.25, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6888, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6888, 'price' => 47.7, 'quality' => 1, 'card_type' => 'chinatelecom'],
         ],
         100 => [
-            ['goods_id' => 6889, 'price' => 96, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6889, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6889, 'price' => 96.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6889, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6889, 'price' => 95.4, 'quality' => 1, 'card_type' => 'chinatelecom'],
         ],
         200 => [
-            ['goods_id' => 6890, 'price' => 192, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6890, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6890, 'price' => 193, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6890, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6890, 'price' => 190.8, 'quality' => 1, 'card_type' => 'chinatelecom'],
+        ],
+        300 => [
+            ['goods_id' => 6891, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom']
         ],
-//        300 => [['goods_id' => 6891, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
 //        500 => [['goods_id' => 6892, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -5735,36 +5741,36 @@ $bodian_phone = ['name' => 'bodian', 'store_id' => 219, 'qualitys' => '2',
 //            ['goods_id' => 7835, 'price' => 19.96, 'quality' => 2, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7835, 'price' => 19.96, 'quality' => 2, 'card_type' => 'chinatelecom']
 //        ],
-        30 => [
-            ['goods_id' => 7836, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinamobile'],
+//        30 => [
+//            ['goods_id' => 7836, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinamobile'],
 //            ['goods_id' => 7836, 'price' => 29.94, 'quality' => 2, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7836, 'price' => 29.94, 'quality' => 2, 'card_type' => 'chinatelecom']
-        ],
+//        ],
         50 => [
-            ['goods_id' => 7837, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7837, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7837, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7837, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7838, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7838, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7838, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7838, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7839, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7839, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7839, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7839, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 7840, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7840, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7840, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7840, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
-        500 => [
-            ['goods_id' => 7841, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinamobile'],
+//        500 => [
+//            ['goods_id' => 7841, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinamobile'],
 //            ['goods_id' => 7841, 'price' => 499, 'quality' => 2, 'card_type' => 'chinaunicom'],
 //            ['goods_id' => 7841, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
-        ]
+//        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
@@ -6504,6 +6510,32 @@ $yingdian_hf_phone = ['name' => 'yingdian_hf', 'store_id' => 237, 'qualitys' =>
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$dazhanggui_fs_phone = ['name' => 'dazhanggui_fs', 'store_id' => 238, 'qualitys' => '1',
+    'amount' => [
+        10 => [['goods_id' => 7987, 'price' => 9.99, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']],
+        20 => [['goods_id' => 7988, 'price' => 19.98, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']],
+        30 => [['goods_id' => 7989, 'price' => 29.97, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']],
+        50 => [['goods_id' => 7990, 'price' => 49.95, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']],
+        100 => [['goods_id' => 7991, 'price' => 99.9, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']],
+        200 => [['goods_id' => 7992, 'price' => 199.8, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']],
+        300 => [['goods_id' => 7993, 'price' => 299.7, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']],
+        500 => [['goods_id' => 7994, 'price' => 499.5, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$feimingyu_high_phone = ['name' => 'feimingyu_high', 'store_id' => 239, 'qualitys' => '1',
+    'amount' => [
+//        10 => [['goods_id' => 7995, 'price' => 9.79, 'quality' => 1, 'card_type' => 'chinamobile']],
+//        20 => [['goods_id' => 7996, 'price' => 19.58, 'quality' => 1, 'card_type' => 'chinamobile']],
+        30 => [['goods_id' => 7997, 'price' => 29.37, 'quality' => 1, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 7998, 'price' => 48.95, 'quality' => 1, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 7999, 'price' => 97.9, 'quality' => 1, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 8000, 'price' => 195.8, 'quality' => 1, 'card_type' => 'chinamobile']],
+//        300 => [['goods_id' => 8001, 'price' => 293.7, 'quality' => 1, 'card_type' => 'chinamobile']],
+//        500 => [['goods_id' => 8002, 'price' => 489.5, 'quality' => 1, 'card_type' => 'chinamobile']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -6702,6 +6734,8 @@ $phone_providers = [
     ['name' => 'weixue', 'cfg' => $weixue_phone],
     ['name' => 'dazhanggui_high', 'cfg' => $dazhanggui_high_phone],
     ['name' => 'yingdian_hf', 'cfg' => $yingdian_hf_phone],
+    ['name' => 'dazhanggui_fs', 'cfg' => $dazhanggui_fs_phone],
+    ['name' => 'feimingyu_high', 'cfg' => $feimingyu_high_phone],
 
 ];
 $config['phone_providers'] = $phone_providers;

+ 2 - 2
data/model/retail.model.php

@@ -12,9 +12,9 @@ class retailModel extends Model
         parent::__construct('retail');
     }
 
-    public function getList($condition, $pagesize = '',$total = 0, $field = '*', $order = 'create_time desc', $limit = '', $master = false)
+    public function getList($condition, $pagesize = '', $field = '*', $order = 'create_time desc', $limit = '', $master = false)
     {
-        $list = $this->field($field)->where($condition)->page($pagesize,$total)->order($order)->limit($limit)->master($master)->select();
+        $list = $this->field($field)->where($condition)->page($pagesize)->order($order)->limit($limit)->master($master)->select();
         if (empty($list)) return [];
         return $list;
     }

+ 22 - 0
docker/compose/homecuda/admin_vendor/docker-compose.yml

@@ -0,0 +1,22 @@
+version: "3.7"
+
+services:
+  nginx:
+    image: nginx:alpine
+    ports:
+      - "8000:80"
+    volumes:
+      - ../../../../:/var/www/html
+      - ../conf/etc/localtime:/etc/localtime:ro
+      - ../conf/nginx/nginx_admin.conf:/etc/nginx/nginx.conf:ro
+      - ./redmine/:/var/www/html/redmine
+      - /nfs/ylupload:/var/www/html/data/upload
+      - /nfs/ylmerchant:/var/www/html/merchant
+    container_name: "yl-nginx"
+    command: [nginx,'-g','daemon off;']
+    extra_hosts:
+      - "docker.hostip:172.17.0.1"
+    deploy:
+      resources:
+        limits:
+          cpus: '8'

+ 155 - 0
docker/compose/homecuda/conf/nginx/nginx_vendor.conf

@@ -0,0 +1,155 @@
+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;
+
+    underscores_in_headers on;
+    client_max_body_size 32M;
+    client_body_buffer_size 1024K;
+
+    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"';
+
+#     upstream redmine{
+#         server docker.hostip:8080;
+#     }
+
+    server 
+    {
+    	listen       80;
+        set  $folder_name /var/www/html;
+        server_name ylweb.xyzshops.cn;
+        root $folder_name;
+        index index.html index.php; 
+
+    	proxy_connect_timeout 500s;
+        proxy_read_timeout 500s;
+        proxy_send_timeout 500s;
+
+        fastcgi_connect_timeout 75;
+        fastcgi_read_timeout 600;   
+        fastcgi_send_timeout 600;
+        fastcgi_buffer_size  32K;
+        fastcgi_buffers      32 32K;
+
+        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.95.252:5000; #指向39.101.140.116
+            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 /redmine {
+            proxy_pass         http://docker.hostip:8080;
+            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:9700;
+            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:9701;
+            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   docker.hostip:9702;
+            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   docker.hostip:9600;
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            fastcgi_buffer_size  1024K;
+            fastcgi_buffers      32 1024K;
+            proxy_buffer_size  128k;     #设置缓冲区的大小和数量
+            proxy_buffers 100  128k;     #
+            proxy_read_timeout 900s;
+            proxy_send_timeout 900s;
+            fastcgi_read_timeout 900;
+            fastcgi_send_timeout 900;
+            keepalive_timeout    900;
+
+            include        fastcgi_params;
+        }
+    }
+}

+ 2 - 2
docker/compose/xyz/conf/nginx/nginx_admin.conf

@@ -112,7 +112,7 @@ http
 
         location ~ /mchsrv/[/\w]+\.php$ {
             root           $folder_name;
-            fastcgi_pass   172.26.80.6:9102;
+            fastcgi_pass   docker.hostip:9102;
             fastcgi_index  index.php;
             fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
             fastcgi_param SIGN $http_sign;
@@ -122,7 +122,7 @@ http
         location ~ \.php$ {
 	        add_header Cache-Control no-store;
             root           $folder_name;
-            fastcgi_pass   172.26.80.6:9000;
+            fastcgi_pass   docker.hostip:9000;
             fastcgi_index  index.php;
             fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
             fastcgi_buffer_size  1024K;

+ 16 - 2
docker/compose/yl/conf/nginx/nginx_admin.conf

@@ -27,6 +27,10 @@ http
                       '$status $body_bytes_sent "$http_referer" '
                       '"$http_user_agent" "$http_x_forwarded_for"';
 
+#     upstream redmine{
+#         server docker.hostip:8080;
+#     }
+
     server 
     {
     	listen       80;
@@ -81,6 +85,16 @@ http
             proxy_set_header   X-Forwarded-Proto    $scheme;
         }
 
+        location /redmine {
+            proxy_pass         http://docker.hostip:8080;
+            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;
@@ -112,7 +126,7 @@ http
 
         location ~ /mchsrv/[/\w]+\.php$ {
             root           $folder_name;
-            fastcgi_pass   172.26.80.6:9702;
+            fastcgi_pass   docker.hostip:9702;
             fastcgi_index  index.php;
             fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
             fastcgi_param SIGN $http_sign;
@@ -122,7 +136,7 @@ http
         location ~ \.php$ {
 	        add_header Cache-Control no-store;
             root           $folder_name;
-            fastcgi_pass   172.26.80.6:9600;
+            fastcgi_pass   docker.hostip:9600;
             fastcgi_index  index.php;
             fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
             fastcgi_buffer_size  1024K;

+ 1 - 0
docker/compose/yl/yladmin/docker-compose.yml

@@ -9,6 +9,7 @@ services:
       - ../../../../:/var/www/html
       - ../conf/etc/localtime:/etc/localtime:ro
       - ../conf/nginx/nginx_admin.conf:/etc/nginx/nginx.conf:ro
+      - ./redmine/:/var/www/html/redmine
       - /nfs/ylupload:/var/www/html/data/upload
       - /nfs/ylmerchant:/var/www/html/merchant
     container_name: "yl-nginx"

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

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

+ 140 - 0
helper/refill/api/xyz/bodian_yd/RefillPhone.php

@@ -0,0 +1,140 @@
+<?php
+
+namespace refill\bodian_yd;
+
+require_once(BASE_HELPER_RAPI_PATH . '/bodian_yd/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 = $resp['nRtn'];
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            } elseif ($nRtn === 0) {
+                return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NOS, true)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999], true)) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], true];
+            } 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, '网络错误'];
+            }
+
+            $status = $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],true)) {
+                $order_state = ORDER_STATE_SEND;
+            } elseif ($status === 5005 && (time() - $refill_info['commit_time'] >= 300)) {
+                $order_state = ORDER_STATE_NOEXIST;
+            } else {
+                return [false, $resp['szRtnMsg']];
+            }
+
+            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);
+    }
+}

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

@@ -0,0 +1,15 @@
+后台参数
+客户地址:http://36.139.45.33:10186/plat/index
+账号:YZLT200064
+密码:123456
+
+对接参数
+ID:200064
+key:1561326769e14677a7005495363f9d34
+
+正式环境:
+下单地址:http://36.139.45.33:10186/plat/api/old/submitorder
+查询地址:http://36.139.45.33:10186/plat/api/old/queryorder
+查询余额地址:http://36.139.45.33:10186/plat/api/old/queryBalance
+
+对接文档地址:https://docs.qq.com/doc/DWkV1VkxQVk13eEtQ

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

@@ -0,0 +1,27 @@
+<?php
+
+
+namespace refill\bodian_yd;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://36.139.45.33:10186/plat/api/old/submitorder';
+    const QUERY_URL= 'http://36.139.45.33:10186/plat/api/old/queryorder';
+    const BALANCE_URL = 'http://36.139.45.33:10186/plat/api/old/queryBalance';
+
+    const USER_ID= '200064';
+    const KEY = '1561326769e14677a7005495363f9d34';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_bodian_yd.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
+    ];
+}

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

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

+ 161 - 0
helper/refill/api/xyz/dazhanggui_fs/RefillPhone.php

@@ -0,0 +1,161 @@
+<?php
+
+namespace refill\dazhanggui_fs;
+
+require_once(BASE_HELPER_RAPI_PATH . '/dazhanggui_fs/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, $regin_no)
+    {
+        $params['szAgentId'] = config::USER_ID;
+        $params['szOrderId'] = $order_sn;
+        $params['szPhoneNum'] = $phone;
+        $params['nMoney'] = $amount;
+        $params['nSortType'] = config::operator[$card_type];
+        $params['szProductId'] = config::Product[$card_type][$regin_no][$amount];
+        $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'];
+        $regin_no = $params['regin_no'] ?? -1;
+
+        if($regin_no <= 0) {
+            return [false, '省份获取错误', false];
+        }
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn, $regin_no);
+
+        $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 = $resp['nRtn'];
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            } elseif ($nRtn === 0) {
+                return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NOS, true)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999], true)) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], true];
+            } 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, '网络错误'];
+            }
+
+            $status = $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],true)) {
+                $order_state = ORDER_STATE_SEND;
+            } elseif ($status === 5005 && (time() - $refill_info['commit_time'] >= 300)) {
+                $order_state = ORDER_STATE_NOEXIST;
+            } else {
+                return [false, $resp['szRtnMsg']];
+            }
+
+            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);
+    }
+}

+ 30 - 0
helper/refill/api/xyz/dazhanggui_fs/api.txt

@@ -0,0 +1,30 @@
+登录账号:yzfs01
+登录密码:123456
+话费下单地址:http://47.101.136.81:10186/plat/api/old/submitorder
+查询地址:http://47.101.136.81:10186/plat/api/old/queryorder
+查询余额地址:http://47.101.136.81:10186/plat/api/old/queryBalance
+
+正式ID:	200026
+秘钥: 6dc058584d044b44a995ac98a3520fdf
+
+后台登录地址:http://47.101.136.81:10186/plat/index
+对接文档地址:https://docs.qq.com/doc/DWkV1VkxQVk13eEtQ
+
+江苏移动50元	1320050
+江苏移动100元	1320100
+江苏移动200元	1320200
+
+山东移动50元	1370050
+山东移动100元	1370100
+山东移动200元	1370200
+
+贵州移动30元	1520030
+贵州移动50元	1520050
+贵州移动100元	1520100
+贵州移动200元	1520200
+
+湖南电信30元	3430030
+湖南电信50元	3430050
+湖南电信100元	3430100
+湖南电信200元	3430200
+

+ 72 - 0
helper/refill/api/xyz/dazhanggui_fs/config.php

@@ -0,0 +1,72 @@
+<?php
+
+
+namespace refill\dazhanggui_fs;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://47.101.136.81:10186/plat/api/old/submitorder';
+    const QUERY_URL= 'http://47.101.136.81:10186/plat/api/old/queryorder';
+    const BALANCE_URL = 'http://47.101.136.81:10186/plat/api/old/queryBalance';
+
+    const USER_ID= '200026';
+    const KEY = '6dc058584d044b44a995ac98a3520fdf';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_dazhanggui_fs.php";
+
+    const operator = [
+        mtopcard\ChinaMobileCard  => 1,
+        mtopcard\ChinaUnicomCard  => 2,
+        mtopcard\ChinaTelecomCard => 3
+    ];
+    const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NOS = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
+
+    const Product = [
+        mtopcard\ChinaMobileCard => [
+            //江苏
+            10 => [
+                50  => 1320050,
+                100 => 1320100,
+                200 => 1320200,
+            ],
+            //山东
+            15 => [
+                50  => 1370050,
+                100 => 1370100,
+                200 => 1370200,
+            ],
+            //贵州
+            24 => [
+                30  => 1520030,
+                50  => 1520050,
+                100 => 1520100,
+                200 => 1520200,
+            ],
+        ],
+        mtopcard\ChinaTelecomCard => [
+            //湖南
+            18 => [
+                30  => 3430030,
+                50  => 3430050,
+                100 => 3430100,
+                200 => 3430200,
+            ],
+        ],
+    ];
+
+    //key格式 卡类型-面值-regin_no
+    const Price = [
+        //移动
+        "4-50-10" => 46.8, "4-100-10" => 93.6, "4-200-10" => 187.2,//江苏 10
+        "4-50-15" => 46.8, "4-100-15" => 93.6, "4-200-15" => 187.2,//山东 15
+        "4-30-24" => 28.05, "4-50-24" => 46.75, "4-100-24" => 93.5, "4-200-24" => 187,//山东 24
+
+        //电信
+        "6-30-18" => 28.26, "6-50-18" => 47.1, "6-100-18" => 94.2, "6-200-18" => 188.4,//湖南 18
+    ];
+
+}

+ 48 - 0
helper/refill/api/xyz/feimingyu_high/RefillCallBack.php

@@ -0,0 +1,48 @@
+<?php
+namespace refill\feimingyu_high;
+
+require_once(BASE_HELPER_RAPI_PATH . '/feimingyu_high/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 = "userid={$userid}&orderid={$params['orderid']}&sporderid={$params['sporderid']}&merchantsubmittime={$params['merchantsubmittime']}";
+        $content .= "&resultno={$params['resultno']}&key={$key}";
+        return strtoupper(md5($content));
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['resultno']);
+        $order_sn = $params['sporderid'];
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false,false];
+        }
+
+        $order_id = $order_info['order_id'];
+        if ($status === 1) {
+            $data['official_sn'] = strtolower($params['remark1']) == 'null' ? '' : $params['remark1'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true];
+        } elseif ($status === 9) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 155 - 0
helper/refill/api/xyz/feimingyu_high/RefillPhone.php

@@ -0,0 +1,155 @@
+<?php
+
+namespace refill\feimingyu_high;
+
+require_once(BASE_HELPER_RAPI_PATH . '/feimingyu_high/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, $card_type, string $order_sn)
+    {
+        $params['userid'] = config::USER_ID;
+        $params['productid'] = config::ProductIdS[$card_type][$amount];
+        $params['price'] = $amount;
+        $params['num'] = 1;
+        $params['mobile'] = $phone;
+        $params['spordertime'] = date("YmdHis");
+        $params['sporderid'] = $order_sn;
+        $params['back_url'] = config::NOTIFY_URL;
+        $params['paytype'] = config::operator[$card_type];
+
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn);
+
+        $sign = $this->sign($params);
+        $params['sign'] = $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 = $this->xmlToArray($resp);
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            }
+
+            $resultno = $resp['resultno'];
+            if (in_array($resultno, ['0', '2'], true)) {
+                return [true, $resp['orderid'], false];
+            } elseif (in_array($resultno, config::ERR_NOS, true)) {
+                return [false, $resultno, false];
+            } elseif ($resultno === '9999' || $resultno === '5006') {
+                $net_errno = "HTTP-{$resultno}";
+                return [false, $resultno, true];
+            } else {
+                //未知结果码
+                $err = 998;
+                $net_errno = "HTTP-{$err}";
+                return [false, $resultno, true];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['userid'] = config::USER_ID;
+        $params['sporderid'] = $refill_info['order_sn'];
+        $key = config::KEY;
+        $content = "userid={$params['userid']}&sporderid={$params['sporderid']}&key={$key}";
+        $params['sign'] = strtoupper(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 = $this->xmlToArray($resp);
+            if (empty($resp))
+            {
+                return [false, '网络错误'];
+            }
+            else
+            {
+                $resultno = $resp['resultno'];
+                if ($resultno === '1') {
+                    $updata['official_sn'] = $resp['remark1'];
+                    Model('refill_order')->edit($refill_info['order_id'], $updata);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($resultno === '9') {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif (in_array($resultno, ['0','2'], true)) {
+                    $order_state = ORDER_STATE_SEND;
+                } elseif ($resultno === '5007' && (time() - $refill_info['commit_time'] > 600)) {
+                    $order_state = ORDER_STATE_NOEXIST;
+                } else {
+                    return [false, $resultno];
+                }
+
+                return [true, $order_state];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['userid'] = config::USER_ID;
+        $key = config::KEY;
+        $content = "userid={$params['userid']}&key={$key}";
+        $params['sign'] = strtoupper(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 = $this->xmlToArray($resp);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            } elseif ($resp['resultno'] === '1') {
+                return [true, $resp['balance']];
+            } else {
+                return [false, $resp['resultno']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "userid={$userid}&productid={$params['productid']}&price={$params['price']}&num={$params['num']}&mobile={$params['mobile']}&spordertime={$params['spordertime']}";
+        $content .= "&sporderid={$params['sporderid']}&key={$key}";
+        return strtoupper(md5($content));
+    }
+
+    public function xmlToArray($xml)
+    {
+        $replace_str = str_replace(' ','','encoding="gb2312"');
+        $xml = mb_convert_encoding($xml,"UTF-8","gb2312");
+        $xml = str_replace($replace_str, "encoding='utf-8'", $xml);
+        return refill\util::xmlToArray($xml);
+    }
+}

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

@@ -0,0 +1,36 @@
+<?php
+
+
+namespace refill\feimingyu_high;
+
+use mtopcard;
+class config
+{
+    //https://www.showdoc.com.cn/AQL666666/
+    const ORDER_URL = 'http://121.36.242.90:9086/onlinepay.do';
+    const QUERY_URL= 'http://121.36.242.90:9086/searchpay.do';
+    const BALANCE_URL = 'http://121.36.242.90:9086/searchbalance.do';
+
+    const USER_ID= '10002986';
+    const KEY = 'tbrdiE3MZC6BcN2MmHZMMrXhGkfWA6YH';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_feimingyu_high.php";
+
+    const operator = [
+        mtopcard\ChinaMobileCard  => 'yd',
+        mtopcard\ChinaUnicomCard  => 'lt',
+        mtopcard\ChinaTelecomCard => 'dx'
+    ];
+    const ERR_NOS = [
+        '5001','5002','5003','5004','5005','5008','5009','5010','5011','5012'
+    ];
+    const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;'];
+    const ProductIdS = [
+        mtopcard\ChinaMobileCard =>
+        [
+            30  => '101687',
+            50  => '101688',
+            100 => '101689',
+            200 => '101690',
+        ],
+    ];
+}

+ 21 - 0
helper/refill/api/xyz/feimingyu_high/对接文档-yezi.txt

@@ -0,0 +1,21 @@
+账号:005
+88888888
+
+登录名:椰子高价移动
+用户编码:10002986
+密钥:tbrdiE3MZC6BcN2MmHZMMrXhGkfWA6YH
+客户注册和登录地址:http://121.36.242.90:7080/
+api接口文档地址:
+https://www.showdoc.com.cn/AQL666666/
+下单地址:
+http://121.36.242.90:9086/onlinepay.do
+余额查询:
+http://121.36.242.90:9086/searchbalance.do
+订单主动查询地址:
+http://121.36.242.90:9086/searchpay.do
+
+101687  全国移动话费30元直充
+101688  全国移动话费50元直充
+101689  全国移动话费100元直充
+101690  全国移动话费200元直充
+

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


二进制
helper/refill/api/xyz/guochuang/20220922黑龙江移动调价函.png


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


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


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

@@ -66,13 +66,13 @@ class config
         "4-10-2" => 10.15, "4-20-2" => 19.92, "4-30-2" => 29.94, "4-50-2" => 49.9, "4-100-2" => 99.8, "4-200-2" => 199.6, "4-300-2" => 299.4, "4-500-2" => 499,//天津 2
         "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-9" => 9.94, "4-20-9" => 19.88, "4-30-9" => 29.82, "4-50-9" => 49.7, "4-100-9" => 99.4,//上海 9
-        "4-10-8" => 10.03, "4-20-8" => 20.06, "4-30-8" => 30.09, "4-50-8" => 50.15, "4-100-8" => 100.3, "4-200-8" => 200.6, "4-300-8" => 301.2, "4-500-8" => 502,//黑龙江 8
+        "4-10-8" => 10.05, "4-20-8" => 20.1, "4-30-8" => 30.15, "4-50-8" => 50.25, "4-100-8" => 100.5, "4-200-8" => 201, "4-300-8" => 301.5, "4-500-8" => 502.5,//黑龙江 8
         "4-10-29" => 9.835, "4-20-29" => 19.67, "4-30-29" => 29.505, "4-50-29" => 49.175, "4-100-29" => 98.35, "4-200-29" => 196.7, "4-300-29" => 295.05, "4-500-29" => 491.75,//青海 29
         "4-10-28" => 9.985, "4-20-28" => 19.97, "4-30-28" => 29.955, "4-50-28" => 49.925, "4-100-28" => 99.85, "4-200-28" => 199.7, "4-300-28" => 299.55, "4-500-28" => 499.25,//甘肃 28
         "4-10-13" => 10.22, "4-20-13" => 19.94, "4-30-13" => 29.91, "4-50-13" => 49.85, "4-100-13" => 99.7, "4-200-13" => 199.4, "4-300-13" => 300.9, "4-500-13" => 501.5,//福建 13
         "4-10-5" => 10.035, "4-20-5" => 20.07, "4-30-5" => 30.09, "4-50-5" => 50.15, "4-100-5" => 100.3, "4-200-5" => 200.4, "4-300-5" => 300.6, "4-500-5" => 501,//内蒙古 5
         "4-30-18" => 29.835, "4-50-18" => 49.725, "4-100-18" => 99.45, "4-200-18" => 198.3,//湖南 18
-        "4-10-19" => 9.99, "4-20-19" => 19.98, "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" => 9.97, "4-20-19" => 19.94, "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.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

+ 4 - 1
helper/refill/api/xyz/lechong/account.txt

@@ -13,4 +13,7 @@
 乐充时代
 账号:yezi
 密码:123456
-http://121.196.177.34:1012/agent/login
+http://121.196.177.34:1012/agent/login
+
+2022.9.26 联通300
+HUAFEI_LIANTONG_QUANGUO_300_DJ

+ 3 - 2
helper/refill/api/xyz/lechong/config.php

@@ -25,7 +25,8 @@ class config
             30 => 'HUAFEI_LIANTONG_QUANGUO_30_DJ',
             50 => 'HUAFEI_LIANTONG_QUANGUO_50_DJ',
             100 => 'HUAFEI_LIANTONG_QUANGUO_100_DJ',
-            200 => 'HUAFEI_LIANTONG_QUANGUO_200_DJ'
+            200 => 'HUAFEI_LIANTONG_QUANGUO_200_DJ',
+            300 => 'HUAFEI_LIANTONG_QUANGUO_300_DJ'
         ],
         mtopcard\ChinaTelecomCard => [
             30 => 'HUAFEI_DIANXIN_QUANGUO_30_DJ',
@@ -35,4 +36,4 @@ class config
         ]
     ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
-}
+}

+ 50 - 0
helper/refill/api/yl/dazhanggui_fs/RefillCallBack.php

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

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

@@ -0,0 +1,161 @@
+<?php
+
+namespace refill\dazhanggui_fs;
+
+require_once(BASE_HELPER_RAPI_PATH . '/dazhanggui_fs/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, $regin_no)
+    {
+        $params['szAgentId'] = config::USER_ID;
+        $params['szOrderId'] = $order_sn;
+        $params['szPhoneNum'] = $phone;
+        $params['nMoney'] = $amount;
+        $params['nSortType'] = config::operator[$card_type];
+        $params['szProductId'] = config::Product[$card_type][$regin_no][$amount];
+        $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'];
+        $regin_no = $params['regin_no'] ?? -1;
+
+        if($regin_no <= 0) {
+            return [false, '省份获取错误', false];
+        }
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn, $regin_no);
+
+        $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 = $resp['nRtn'];
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            } elseif ($nRtn === 0) {
+                return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NOS, true)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999], true)) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], true];
+            } 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, '网络错误'];
+            }
+
+            $status = $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],true)) {
+                $order_state = ORDER_STATE_SEND;
+            } elseif ($status === 5005 && (time() - $refill_info['commit_time'] >= 300)) {
+                $order_state = ORDER_STATE_NOEXIST;
+            } else {
+                return [false, $resp['szRtnMsg']];
+            }
+
+            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);
+    }
+}

+ 30 - 0
helper/refill/api/yl/dazhanggui_fs/api.txt

@@ -0,0 +1,30 @@
+登录账号:ylfs01
+登录密码:123456
+话费下单地址:http://47.101.136.81:10186/plat/api/old/submitorder
+查询地址:http://47.101.136.81:10186/plat/api/old/queryorder
+查询余额地址:http://47.101.136.81:10186/plat/api/old/queryBalance
+
+正式ID:	200027
+秘钥: 4ea747d3aa7b41edad874af250b5a75f
+
+后台登录地址:http://47.101.136.81:10186/plat/index
+对接文档地址:https://docs.qq.com/doc/DWkV1VkxQVk13eEtQ
+
+江苏移动50元	1320050
+江苏移动100元	1320100
+江苏移动200元	1320200
+
+山东移动50元	1370050
+山东移动100元	1370100
+山东移动200元	1370200
+
+贵州移动30元	1520030
+贵州移动50元	1520050
+贵州移动100元	1520100
+贵州移动200元	1520200
+
+湖南电信30元	3430030
+湖南电信50元	3430050
+湖南电信100元	3430100
+湖南电信200元	3430200
+

+ 72 - 0
helper/refill/api/yl/dazhanggui_fs/config.php

@@ -0,0 +1,72 @@
+<?php
+
+
+namespace refill\dazhanggui_fs;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://47.101.136.81:10186/plat/api/old/submitorder';
+    const QUERY_URL= 'http://47.101.136.81:10186/plat/api/old/queryorder';
+    const BALANCE_URL = 'http://47.101.136.81:10186/plat/api/old/queryBalance';
+
+    const USER_ID= '200027';
+    const KEY = '4ea747d3aa7b41edad874af250b5a75f';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_dazhanggui_fs.php";
+
+    const operator = [
+        mtopcard\ChinaMobileCard  => 1,
+        mtopcard\ChinaUnicomCard  => 2,
+        mtopcard\ChinaTelecomCard => 3
+    ];
+    const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NOS = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
+
+    const Product = [
+        mtopcard\ChinaMobileCard => [
+            //江苏
+            10 => [
+                50  => 1320050,
+                100 => 1320100,
+                200 => 1320200,
+            ],
+            //山东
+            15 => [
+                50  => 1370050,
+                100 => 1370100,
+                200 => 1370200,
+            ],
+            //贵州
+            24 => [
+                30  => 1520030,
+                50  => 1520050,
+                100 => 1520100,
+                200 => 1520200,
+            ],
+        ],
+        mtopcard\ChinaTelecomCard => [
+            //湖南
+            18 => [
+                30  => 3430030,
+                50  => 3430050,
+                100 => 3430100,
+                200 => 3430200,
+            ],
+        ],
+    ];
+
+    //key格式 卡类型-面值-regin_no
+    const Price = [
+        //移动
+        "4-50-10" => 46.8, "4-100-10" => 93.6, "4-200-10" => 187.2,//江苏 10
+        "4-50-15" => 46.8, "4-100-15" => 93.6, "4-200-15" => 187.2,//山东 15
+        "4-30-24" => 28.05, "4-50-24" => 46.75, "4-100-24" => 93.5, "4-200-24" => 187,//山东 24
+
+        //电信
+        "6-30-18" => 28.26, "6-50-18" => 47.1, "6-100-18" => 94.2, "6-200-18" => 188.4,//湖南 18
+    ];
+
+}

+ 48 - 0
helper/refill/api/yl/feimingyu_high/RefillCallBack.php

@@ -0,0 +1,48 @@
+<?php
+namespace refill\feimingyu_high;
+
+require_once(BASE_HELPER_RAPI_PATH . '/feimingyu_high/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 = "userid={$userid}&orderid={$params['orderid']}&sporderid={$params['sporderid']}&merchantsubmittime={$params['merchantsubmittime']}";
+        $content .= "&resultno={$params['resultno']}&key={$key}";
+        return strtoupper(md5($content));
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['resultno']);
+        $order_sn = $params['sporderid'];
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false,false];
+        }
+
+        $order_id = $order_info['order_id'];
+        if ($status === 1) {
+            $data['official_sn'] = strtolower($params['remark1']) == 'null' ? '' : $params['remark1'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true];
+        } elseif ($status === 9) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 155 - 0
helper/refill/api/yl/feimingyu_high/RefillPhone.php

@@ -0,0 +1,155 @@
+<?php
+
+namespace refill\feimingyu_high;
+
+require_once(BASE_HELPER_RAPI_PATH . '/feimingyu_high/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, $card_type, string $order_sn)
+    {
+        $params['userid'] = config::USER_ID;
+        $params['productid'] = config::ProductIdS[$card_type][$amount];
+        $params['price'] = $amount;
+        $params['num'] = 1;
+        $params['mobile'] = $phone;
+        $params['spordertime'] = date("YmdHis");
+        $params['sporderid'] = $order_sn;
+        $params['back_url'] = config::NOTIFY_URL;
+        $params['paytype'] = config::operator[$card_type];
+
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn);
+
+        $sign = $this->sign($params);
+        $params['sign'] = $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 = $this->xmlToArray($resp);
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            }
+
+            $resultno = $resp['resultno'];
+            if (in_array($resultno, ['0', '2'], true)) {
+                return [true, $resp['orderid'], false];
+            } elseif (in_array($resultno, config::ERR_NOS, true)) {
+                return [false, $resultno, false];
+            } elseif ($resultno === '9999' || $resultno === '5006') {
+                $net_errno = "HTTP-{$resultno}";
+                return [false, $resultno, true];
+            } else {
+                //未知结果码
+                $err = 998;
+                $net_errno = "HTTP-{$err}";
+                return [false, $resultno, true];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['userid'] = config::USER_ID;
+        $params['sporderid'] = $refill_info['order_sn'];
+        $key = config::KEY;
+        $content = "userid={$params['userid']}&sporderid={$params['sporderid']}&key={$key}";
+        $params['sign'] = strtoupper(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 = $this->xmlToArray($resp);
+            if (empty($resp))
+            {
+                return [false, '网络错误'];
+            }
+            else
+            {
+                $resultno = $resp['resultno'];
+                if ($resultno === '1') {
+                    $updata['official_sn'] = $resp['remark1'];
+                    Model('refill_order')->edit($refill_info['order_id'], $updata);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($resultno === '9') {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif (in_array($resultno, ['0','2'], true)) {
+                    $order_state = ORDER_STATE_SEND;
+                } elseif ($resultno === '5007' && (time() - $refill_info['commit_time'] > 600)) {
+                    $order_state = ORDER_STATE_NOEXIST;
+                } else {
+                    return [false, $resultno];
+                }
+
+                return [true, $order_state];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['userid'] = config::USER_ID;
+        $key = config::KEY;
+        $content = "userid={$params['userid']}&key={$key}";
+        $params['sign'] = strtoupper(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 = $this->xmlToArray($resp);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            } elseif ($resp['resultno'] === '1') {
+                return [true, $resp['balance']];
+            } else {
+                return [false, $resp['resultno']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "userid={$userid}&productid={$params['productid']}&price={$params['price']}&num={$params['num']}&mobile={$params['mobile']}&spordertime={$params['spordertime']}";
+        $content .= "&sporderid={$params['sporderid']}&key={$key}";
+        return strtoupper(md5($content));
+    }
+
+    public function xmlToArray($xml)
+    {
+        $replace_str = str_replace(' ','','encoding="gb2312"');
+        $xml = mb_convert_encoding($xml,"UTF-8","gb2312");
+        $xml = str_replace($replace_str, "encoding='utf-8'", $xml);
+        return refill\util::xmlToArray($xml);
+    }
+}

+ 36 - 0
helper/refill/api/yl/feimingyu_high/config.php

@@ -0,0 +1,36 @@
+<?php
+
+
+namespace refill\feimingyu_high;
+
+use mtopcard;
+class config
+{
+    //https://www.showdoc.com.cn/AQL666666/
+    const ORDER_URL = 'http://121.36.242.90:9086/onlinepay.do';
+    const QUERY_URL= 'http://121.36.242.90:9086/searchpay.do';
+    const BALANCE_URL = 'http://121.36.242.90:9086/searchbalance.do';
+
+    const USER_ID= '10002987';
+    const KEY = 'FcWrDdZ4EzBZjEmfTjRijNbYKC3Bfwij';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_feimingyu_high.php";
+
+    const operator = [
+        mtopcard\ChinaMobileCard  => 'yd',
+        mtopcard\ChinaUnicomCard  => 'lt',
+        mtopcard\ChinaTelecomCard => 'dx'
+    ];
+    const ERR_NOS = [
+        '5001','5002','5003','5004','5005','5008','5009','5010','5011','5012'
+    ];
+    const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;'];
+    const ProductIdS = [
+        mtopcard\ChinaMobileCard =>
+        [
+            30  => '101687',
+            50  => '101688',
+            100 => '101689',
+            200 => '101690',
+        ],
+    ];
+}

+ 21 - 0
helper/refill/api/yl/feimingyu_high/对接文档-yezi.txt

@@ -0,0 +1,21 @@
+账号:006
+88888888
+
+登录名:椰林高价移动
+用户编码:10002987
+密钥:FcWrDdZ4EzBZjEmfTjRijNbYKC3Bfwij
+客户注册和登录地址:http://121.36.242.90:7080/
+api接口文档地址:
+https://www.showdoc.com.cn/AQL666666/
+下单地址:
+http://121.36.242.90:9086/onlinepay.do
+余额查询:
+http://121.36.242.90:9086/searchbalance.do
+订单主动查询地址:
+http://121.36.242.90:9086/searchpay.do
+
+101687  全国移动话费30元直充
+101688  全国移动话费50元直充
+101689  全国移动话费100元直充
+101690  全国移动话费200元直充
+

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

@@ -66,13 +66,13 @@ class config
         "4-10-2" => 10.15, "4-20-2" => 19.92, "4-30-2" => 29.94, "4-50-2" => 49.9, "4-100-2" => 99.8, "4-200-2" => 199.6, "4-300-2" => 299.4, "4-500-2" => 499,//天津 2
         "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-9" => 9.94, "4-20-9" => 19.88, "4-30-9" => 29.82, "4-50-9" => 49.7, "4-100-9" => 99.4,//上海 9
-        "4-10-8" => 10.03, "4-20-8" => 20.06, "4-30-8" => 30.09, "4-50-8" => 50.15, "4-100-8" => 100.3, "4-200-8" => 200.6, "4-300-8" => 301.2, "4-500-8" => 502,//黑龙江 8
+        "4-10-8" => 10.05, "4-20-8" => 20.1, "4-30-8" => 30.15, "4-50-8" => 50.25, "4-100-8" => 100.5, "4-200-8" => 201, "4-300-8" => 301.5, "4-500-8" => 502.5,//黑龙江 8
         "4-10-29" => 9.835, "4-20-29" => 19.67, "4-30-29" => 29.505, "4-50-29" => 49.175, "4-100-29" => 98.35, "4-200-29" => 196.7, "4-300-29" => 295.05, "4-500-29" => 491.75,//青海 29
         "4-10-28" => 9.985, "4-20-28" => 19.97, "4-30-28" => 29.955, "4-50-28" => 49.925, "4-100-28" => 99.85, "4-200-28" => 199.7, "4-300-28" => 299.55, "4-500-28" => 499.25,//甘肃 28
         "4-10-13" => 10.22, "4-20-13" => 19.94, "4-30-13" => 29.91, "4-50-13" => 49.85, "4-100-13" => 99.7, "4-200-13" => 199.4, "4-300-13" => 300.9, "4-500-13" => 501.5,//福建 13
         "4-10-5" => 10.035, "4-20-5" => 20.07, "4-30-5" => 30.09, "4-50-5" => 50.15, "4-100-5" => 100.3, "4-200-5" => 200.4, "4-300-5" => 300.6, "4-500-5" => 501,//内蒙古 5
         "4-30-18" => 29.835, "4-50-18" => 49.725, "4-100-18" => 99.45, "4-200-18" => 198.3,//湖南 18
-        "4-10-19" => 9.99, "4-20-19" => 19.98, "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" => 9.97, "4-20-19" => 19.94, "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.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

+ 3 - 2
helper/refill/api/yl/lechong/config.php

@@ -24,7 +24,8 @@ class config
             30 => 'HUAFEI_LIANTONG_QUANGUO_30_DJ',
             50 => 'HUAFEI_LIANTONG_QUANGUO_50_DJ',
             100 => 'HUAFEI_LIANTONG_QUANGUO_100_DJ',
-            200 => 'HUAFEI_LIANTONG_QUANGUO_200_DJ'
+            200 => 'HUAFEI_LIANTONG_QUANGUO_200_DJ',
+            300 => 'HUAFEI_LIANTONG_QUANGUO_300_DJ'
         ],
         mtopcard\ChinaTelecomCard => [
             30 => 'HUAFEI_DIANXIN_QUANGUO_30_DJ',
@@ -34,4 +35,4 @@ class config
         ]
     ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
-}
+}

+ 6 - 6
helper/refill/ops/order_clear.php

@@ -202,12 +202,12 @@ class order_clear
             }
             else
             {
-                foreach ($ritems as $item) {
-                    fputcsv($frefill,$item);
-                }
-                foreach ($vitems as $item) {
-                    fputcsv($fvr,$item);
-                }
+//                foreach ($ritems as $item) {
+//                    fputcsv($frefill,$item);
+//                }
+//                foreach ($vitems as $item) {
+//                    fputcsv($fvr,$item);
+//                }
             }
 
             $inner_oids = [];

+ 2 - 1
helper/refill/policy/ctl_itemex.php

@@ -92,7 +92,8 @@ class ctl_itemex
     public function update_params($parms)
     {
         [$this->mSpeed, $this->mRatio, $this->mRatioCommit, $this->mNotifyTime,$this->mMonitorCommit] = $parms;
-        if($this->mRatioCommit == 0) {
+
+        if($this->mNotifyTime == 0) {
             $this->mNotifyTime = 1;
         }
     }

+ 4 - 0
mobile/callback/refill_bodian_yd.php

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

+ 4 - 0
mobile/callback/refill_dazhanggui_fs.php

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

+ 4 - 0
mobile/callback/refill_feimingyu_high.php

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

+ 42 - 0
test/TestRefill.php

@@ -2544,6 +2544,48 @@ class TestRefill extends TestCase
         $resp = $provider->notify($params);
     }
 
+    public function testBodian_yd()
+    {
+//        $provider = $this->getProvider('bodian_yd');
+//        $resp = $provider->balance();
+//        $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn()]);
+//        $resp = $provider->query(['order_sn' => '16971663724801057246']);
+
+        $body = ' {"szOrderId":"16971663724801057246","fSalePrice":"30.09","szAgentId":"200064","nFlag":"2","szVerifyString":"69c41652845d37f130186b05ddeecf6a","szPhoneNum":"15811535608","szRtnMsg":"00772022092109464443723910546991","nDemo":"30"}';
+        $params = json_decode($body, true);
+        $provider = $this->getProvider('bodian_yd', 'RefillCallBack');
+        $ret = $provider->verify($params);
+        $resp = $provider->notify($params);
+    }
+
+    public function testDazhanggui_fs()
+    {
+//        $provider = $this->getProvider('dazhanggui_fs');
+//        $resp = $provider->balance();
+//        $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn(), 'regin_no' =>18]);
+//        $resp = $provider->query(['order_sn' => '45731664176822286443']);
+
+        $body = '{"szOrderId":"45731664176822286443","fSalePrice":"28.26","szAgentId":"200026","nFlag":"3","szVerifyString":"b685695ec2fb80f98566f71bd607c7d5","szPhoneNum":"18074608795","szRtnMsg":"","nDemo":"30"}';
+        $params = json_decode($body, true);
+        $provider = $this->getProvider('dazhanggui_fs', 'RefillCallBack');
+        $ret = $provider->verify($params);
+        $resp = $provider->notify($params);
+    }
+
+    public function testFeiminyu_high()
+    {
+//        $provider = $this->getProvider('feimingyu_high');
+//        $resp = $provider->balance();
+//        $resp = $provider->add(15811535608, 4, 30, ['order_sn' => $this->make_sn(), 'regin_no' =>18]);
+//        $resp = $provider->query(['order_sn' => '67901664179951146425']);
+
+        $body = '{"orderid":"EIE22092616129360743","sporderid":"67901664179951146425","userid":"10002986","merchantsubmittime":"20220926161235","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-29.37","sign":"1D0D706BBC7944A0D0275382CC6337F5"}';
+        $params = json_decode($body, true);
+        $provider = $this->getProvider('feimingyu_high', 'RefillCallBack');
+        $ret = $provider->verify($params);
+        $resp = $provider->notify($params);
+    }
+
     public function testAmingjd()
     {
 //        $provider = new refill\amingjd\RefillPhone([]);

+ 2 - 1
test/TestRefillClear.php

@@ -20,10 +20,11 @@ class TestRefillClear extends TestCase
         Base::run_util();
     }
 
+    //docker-compose run -d phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefillClear::testOrderClear)( .*)?$/" --test-suffix TestRefillClear.php /var/www/html/test
     public function testOrderClear()
     {
         $start_date = strtotime('2021-09-11');
-        $end_date   = strtotime('2021-09-13');
+        $end_date   = strtotime('2022-01-01');
         $clear = new refill\order_clear();
         $clear->clear($start_date,$end_date);
     }

+ 12 - 0
test/TestRefillYl.php

@@ -836,4 +836,16 @@ class TestRefillYl extends TestCase
         $provider = $this->getProvider('yingdian_hf');
         $resp = $provider->balance();
     }
+
+    public function testDazhanggui_fs()
+    {
+        $provider = $this->getProvider('dazhanggui_fs');
+        $resp = $provider->balance();
+    }
+
+    public function testFeimingyu_hign()
+    {
+        $provider = $this->getProvider('feimingyu_high');
+        $resp = $provider->balance();
+    }
 }