Преглед изворни кода

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

stanley-king пре 1 година
родитељ
комит
80c7773c0c
90 измењених фајлова са 1806 додато и 65 уклоњено
  1. 165 43
      data/config/xyz/refill.ini.php
  2. 83 4
      data/config/yl/refill.ini.php
  3. 11 1
      helper/refill/api/xyz/dongye/api.txt
  4. 4 4
      helper/refill/api/xyz/dongye/config.php
  5. BIN
      helper/refill/api/xyz/dunhui/20240320_yd_lt.png
  6. 33 0
      helper/refill/api/xyz/dunhui/API.MD
  7. 49 0
      helper/refill/api/xyz/dunhui/RefillCallBack.php
  8. 154 0
      helper/refill/api/xyz/dunhui/RefillPhone.php
  9. 43 0
      helper/refill/api/xyz/dunhui/config.php
  10. BIN
      helper/refill/api/xyz/guochuang/20240315_yd_guizhou.jpg
  11. BIN
      helper/refill/api/xyz/guochuang/20240316_yd_sichuan.jpg
  12. BIN
      helper/refill/api/xyz/guochuang/20240317_yd_liaoning.jpg
  13. BIN
      helper/refill/api/xyz/guochuang/20240318_yd_liaoning.png
  14. BIN
      helper/refill/api/xyz/guochuang/20240319_yd_liaoning.png
  15. BIN
      helper/refill/api/xyz/guochuang/20240320_yd_guangdong.png
  16. BIN
      helper/refill/api/xyz/guochuang/20240325_yd_shandong.jpg
  17. 5 5
      helper/refill/api/xyz/guochuang/config.php
  18. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240101_yd_guangdong.jpg
  19. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240101_yd_liaoning.jpg
  20. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240102_yd_hebei.png
  21. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240102_yd_hebei_2.png
  22. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240103_yd_hebei.png
  23. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240103_yd_liaoning.png
  24. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240104_yd_liaoning.png
  25. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240104_yd_liaoning2.png
  26. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240105_yd_guangdong.png
  27. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240110_yd_liaoning.jpg
  28. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240111_dx_henan.jpg
  29. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240116_dx_antjln.jpg
  30. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240117_yd_liaoning.jpg
  31. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240118_yd_sc_gs.jpg
  32. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240119_dx_tj_ah_ln.jpg
  33. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240128_yd_sichuan.jpg
  34. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240129_yd_qinghai.png
  35. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240131_yd_liaoning.jpg
  36. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240201_dx_shanxi.jpg
  37. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240204_yd_liaoning.png
  38. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240206_yd_shanxi.jpg
  39. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240208_yd_shandong.jpg
  40. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240218_dx_qinghai.jpg
  41. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240218_yd_shandong.png
  42. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240219_yd_guangdong.jpg
  43. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240220_yd_guangdong.jpg
  44. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240220_yd_hebei.jpg
  45. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240221_yd_shanxi.jpg
  46. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240222_dx_shanxi.jpg
  47. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240222_yd_liaoning.jpg
  48. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240222_yd_shandong.jpg
  49. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240226_yd_liaoning_guangdong.jpg
  50. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240226_yd_shandong.jpg
  51. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240226_yd_sichuan.png
  52. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240227_yd_guizhou.jpg
  53. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240228_dx_anhui.jpg
  54. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240303_yd_guizhou.jpg
  55. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240305_yd_guizhou.jpg
  56. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240305_yd_shandong.jpg
  57. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240313_yd_liaoning.png
  58. 0 0
      helper/refill/api/xyz/guochuang/调价函/20240313_yd_shandong.png
  59. 36 0
      helper/refill/api/xyz/xinbao_sec/API.MD
  60. 52 0
      helper/refill/api/xyz/xinbao_sec/RefillCallBack.php
  61. 146 0
      helper/refill/api/xyz/xinbao_sec/RefillPhone.php
  62. 43 0
      helper/refill/api/xyz/xinbao_sec/config.php
  63. 36 0
      helper/refill/api/xyz/xinbao_trd/API.MD
  64. 52 0
      helper/refill/api/xyz/xinbao_trd/RefillCallBack.php
  65. 146 0
      helper/refill/api/xyz/xinbao_trd/RefillPhone.php
  66. 43 0
      helper/refill/api/xyz/xinbao_trd/config.php
  67. BIN
      helper/refill/api/xyz/xuyou_oil/20240321_oil.png
  68. 14 0
      helper/refill/api/xyz/xuyou_oil/RefillOil.php
  69. 30 0
      helper/refill/api/xyz/xuyou_oil/config.php
  70. BIN
      helper/refill/api/yl/dunhui_sec/20240320_yd_lt.png
  71. 33 0
      helper/refill/api/yl/dunhui_sec/API.MD
  72. 49 0
      helper/refill/api/yl/dunhui_sec/RefillCallBack.php
  73. 154 0
      helper/refill/api/yl/dunhui_sec/RefillPhone.php
  74. 43 0
      helper/refill/api/yl/dunhui_sec/config.php
  75. 5 5
      helper/refill/api/yl/guochuang/config.php
  76. 36 0
      helper/refill/api/yl/xinbao/API.MD
  77. 52 0
      helper/refill/api/yl/xinbao/RefillCallBack.php
  78. 146 0
      helper/refill/api/yl/xinbao/RefillPhone.php
  79. 43 0
      helper/refill/api/yl/xinbao/config.php
  80. BIN
      helper/refill/api/yl/xingchuang_fs/20240320_dx_yd_supplement.png
  81. 20 1
      helper/refill/api/yl/xingchuang_fs/API.MD
  82. 29 0
      helper/refill/api/yl/xingchuang_fs/config.php
  83. 1 1
      helper/refill/order.php
  84. 4 0
      mobile/callback/refill_dunhui.php
  85. 4 0
      mobile/callback/refill_dunhui_sec.php
  86. 4 0
      mobile/callback/refill_xinbao.php
  87. 4 0
      mobile/callback/refill_xinbao_sec.php
  88. 4 0
      mobile/callback/refill_xinbao_trd.php
  89. 1 1
      mobile/control/refill.php
  90. 29 0
      test/TestRefill.php

+ 165 - 43
data/config/xyz/refill.ini.php

@@ -2,7 +2,7 @@
 
 global $config;
 
-$config['refill_oil_specs'] = [50, 100, 200, 500, 1000, 2000];
+$config['refill_oil_specs'] = [50, 100, 200, 300, 500, 1000, 2000];
 $config['refill_phone_specs'] = [10, 20, 30, 50, 100, 200, 300, 500];
 $config['refill_phone_small_specs'] = [1, 2, 3, 4, 5, 6, 7, 8, 9];
 //充值额度基本表
@@ -390,6 +390,10 @@ $xuyou_oil = ['name' => 'xuyou_oil', 'store_id' => 364, 'qualitys' => '5',
             ['goods_id' => 8866, 'price' => 200, 'quality' => 5, 'card_type' => 'petrochina'],
             ['goods_id' => 8866, 'price' => 200, 'quality' => 5, 'card_type' => 'sinopec'],
         ],
+        300 => [
+            ['goods_id' => 9212, 'price' => 300, 'quality' => 5, 'card_type' => 'petrochina'],
+            ['goods_id' => 9212, 'price' => 300, 'quality' => 5, 'card_type' => 'sinopec'],
+        ],
         500 => [
             ['goods_id' => 8867, 'price' => 500, 'quality' => 5, 'card_type' => 'petrochina'],
             ['goods_id' => 8867, 'price' => 500, 'quality' => 5, 'card_type' => 'sinopec'],
@@ -3864,39 +3868,40 @@ $dongye_phone = ['name' => 'dongye', 'store_id' => 162, 'qualitys' => '3',
         ],
 
         10 => [
-            ['goods_id' => 7365, 'price' => 10.32, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7365, 'price' => 10.36, 'quality' => 3, 'card_type' => 'chinamobile'],
             ['goods_id' => 7365, 'price' => 10.32, 'quality' => 3, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7366, 'price' => 20.34, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7366, 'price' => 20.72, 'quality' => 3, 'card_type' => 'chinamobile'],
             ['goods_id' => 7366, 'price' => 20.34, 'quality' => 3, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 7367, 'price' => 30.36, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7367, 'price' => 29.97, 'quality' => 3, 'card_type' => 'chinamobile'],
             ['goods_id' => 7367, 'price' => 29.97, 'quality' => 3, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7367, 'price' => 30.36, 'quality' => 3, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7368, 'price' => 50.1, 'quality' => 3, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7368, 'price' => 49.95, 'quality' => 3, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7368, 'price' => 50, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7368, 'price' => 50, 'quality' => 3, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7368, 'price' => 50, 'quality' => 3, 'card_type' => 'chinatelecom'],
         ],
         100 => [
-            ['goods_id' => 7369, 'price' => 100.2, 'quality' => 3, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7369, 'price' => 99.9, 'quality' => 3, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7369, 'price' => 100, 'quality' => 3, 'card_type' => 'chinatelecom'],
+            ['goods_id' => 7369, 'price' => 99.95, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7369, 'price' => 100, 'quality' => 3, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7369, 'price' => 99.95, 'quality' => 3, 'card_type' => 'chinatelecom'],
         ],
         200 => [
-            ['goods_id' => 7370, 'price' => 200.4, 'quality' => 3, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7370, 'price' => 199.8, 'quality' => 3, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7370, 'price' => 200, 'quality' => 3, 'card_type' => 'chinatelecom'],
+            ['goods_id' => 7370, 'price' => 199.9, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7370, 'price' => 200, 'quality' => 3, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7370, 'price' => 199.9, 'quality' => 3, 'card_type' => 'chinatelecom'],
         ],
         300 => [
-            ['goods_id' => 7371, 'price' => 300.6, 'quality' => 3, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7371, 'price' => 299.7, 'quality' => 3, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7371, 'price' => 300, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7371, 'price' => 300, 'quality' => 3, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7371, 'price' => 300, 'quality' => 3, 'card_type' => 'chinatelecom'],
         ],
         500 => [
-            ['goods_id' => 7372, 'price' => 501, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7372, 'price' => 500, 'quality' => 3, 'card_type' => 'chinamobile'],
 //            ['goods_id' => 7372, 'price' => 485, 'quality' => 3, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7372, 'price' => 500, 'quality' => 3, 'card_type' => 'chinatelecom'],
         ]
@@ -10430,47 +10435,47 @@ $xingchuang_sec_phone = ['name' => 'xingchuang_sec', 'store_id' => 392, 'quality
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$kachong_new_phone = ['name' => 'kachong_new', 'store_id' => 393, 'qualitys' => '2',
+$kachong_new_phone = ['name' => 'kachong_new', 'store_id' => 393, 'qualitys' => '1',
     'amount' => [
 //        10 => [
-//            ['goods_id' => 9081, 'price' => 9.91, 'quality' => 2, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 9081, 'price' => 9.91, 'quality' => 2, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 9081, 'price' => 9.89, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 9081, 'price' => 9.91, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9081, 'price' => 9.91, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9081, 'price' => 9.89, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ],
         20 => [
-//            ['goods_id' => 9082, 'price' => 19.82, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 9082, 'price' => 19.88, 'quality' => 2, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 9082, 'price' => 19.78, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 9082, 'price' => 19.82, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9082, 'price' => 19.88, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9082, 'price' => 19.78, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 9083, 'price' => 29.985, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 9083, 'price' => 29.82, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 9083, 'price' => 29.997, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 9083, 'price' => 29.985, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9083, 'price' => 29.82, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9083, 'price' => 29.997, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 9084, 'price' => 49.975, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 9084, 'price' => 49, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 9084, 'price' => 49.995, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 9084, 'price' => 49.975, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9084, 'price' => 49, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9084, 'price' => 49.995, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 9085, 'price' => 99.95, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 9085, 'price' => 94.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 9085, 'price' => 99.99, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 9085, 'price' => 99.95, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9085, 'price' => 94.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9085, 'price' => 99.99, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
 //        200 => [
-//            ['goods_id' => 9086, 'price' => 198.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 9086, 'price' => 198.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 9086, 'price' => 197.8, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 9086, 'price' => 198.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9086, 'price' => 198.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9086, 'price' => 197.8, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ],
 //        300 => [
-//            ['goods_id' => 9087, 'price' => 297.3, 'quality' => 2, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 9087, 'price' => 297.3, 'quality' => 2, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 9087, 'price' => 296.7, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 9087, 'price' => 297.3, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9087, 'price' => 297.3, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9087, 'price' => 296.7, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ],
 //        500 => [
-//            ['goods_id' => 9088, 'price' => 495.5, 'quality' => 2, 'card_type' => 'chinamobile'],
-//            ['goods_id' => 9088, 'price' => 495.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 9088, 'price' => 494.5, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 9088, 'price' => 495.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9088, 'price' => 495.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 9088, 'price' => 494.5, 'quality' => 1, 'card_type' => 'chinatelecom']
 //        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -10718,16 +10723,19 @@ $youshilian_sec_phone = ['name' => 'youshilian_sec', 'store_id' => 400, 'quality
             ['goods_id' => 9166, 'price' => 28.11, 'quality' => 1, 'card_type' => 'chinaunicom'],
         ],
         50 => [
-            ['goods_id' => 9167, 'price' => 48.45, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9167, 'price' => 48.35, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 9167, 'price' => 46.85, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9167, 'price' => 46.85, 'quality' => 1, 'card_type' => 'chinatelecom'],
         ],
         100 => [
-            ['goods_id' => 9168, 'price' => 96.9, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9168, 'price' => 96.7, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 9168, 'price' => 93.7, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9168, 'price' => 93.7, 'quality' => 1, 'card_type' => 'chinatelecom'],
         ],
         200 => [
-            ['goods_id' => 9169, 'price' => 193.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9169, 'price' => 193.4, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 9169, 'price' => 187.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 9169, 'price' => 187.4, 'quality' => 1, 'card_type' => 'chinatelecom'],
         ],
 //        300 => [
 //            ['goods_id' => 9170, 'price' => 300, 'quality' => 1, 'card_type' => 'chinamobile'],
@@ -10830,6 +10838,117 @@ $yeye666cd_phone = ['name' => 'yeye666cd', 'store_id' => 402, 'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$xinbao_sec_phone = ['name' => 'xinbao_sec', 'store_id' => 403, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 9188, 'price' => 10, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9188, 'price' => 10, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+//        20 => [
+//            ['goods_id' => 9189, 'price' => 20, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9189, 'price' => 20, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+        30 => [
+//            ['goods_id' => 9190, 'price' => 30, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9190, 'price' => 28.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+        50 => [
+            ['goods_id' => 9191, 'price' => 48.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9191, 'price' => 47, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+        100 => [
+            ['goods_id' => 9192, 'price' => 96.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9192, 'price' => 94, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+        200 => [
+            ['goods_id' => 9193, 'price' => 193.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9193, 'price' => 188, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+//        300 => [
+//            ['goods_id' => 9194, 'price' => 300, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9194, 'price' => 300, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+//        500 => [
+//            ['goods_id' => 9195, 'price' => 500, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9195, 'price' => 500, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$xinbao_trd_phone = ['name' => 'xinbao_trd', 'store_id' => 404, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 9196, 'price' => 10, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9196, 'price' => 10, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+//        20 => [
+//            ['goods_id' => 9197, 'price' => 20, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9197, 'price' => 20, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+        30 => [
+//            ['goods_id' => 9198, 'price' => 30, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9198, 'price' => 28.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+        50 => [
+            ['goods_id' => 9199, 'price' => 48.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9199, 'price' => 47, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+        100 => [
+            ['goods_id' => 9200, 'price' => 96.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9200, 'price' => 94, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+        200 => [
+            ['goods_id' => 9201, 'price' => 193.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9201, 'price' => 188, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+//        300 => [
+//            ['goods_id' => 9202, 'price' => 300, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9202, 'price' => 300, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+//        500 => [
+//            ['goods_id' => 9203, 'price' => 500, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9203, 'price' => 500, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$dunhui_phone = ['name' => 'dunhui', 'store_id' => 405, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 9204, 'price' => 10, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9204, 'price' => 10, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+//        20 => [
+//            ['goods_id' => 9205, 'price' => 20, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9205, 'price' => 20, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+//        30 => [
+//            ['goods_id' => 9206, 'price' => 30, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9206, 'price' => 30, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+        50 => [
+            ['goods_id' => 9207, 'price' => 48.15, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9207, 'price' => 46.75, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+        100 => [
+            ['goods_id' => 9208, 'price' => 96.3, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9208, 'price' => 93.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+        200 => [
+            ['goods_id' => 9209, 'price' => 192.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 9209, 'price' => 187, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+//        300 => [
+//            ['goods_id' => 9210, 'price' => 300, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9210, 'price' => 300, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+//        500 => [
+//            ['goods_id' => 9211, 'price' => 500, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 9211, 'price' => 500, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_p hone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -11152,6 +11271,9 @@ $phone_providers = [
     ['name' => 'youshilian_sec', 'cfg' => $youshilian_sec_phone],
     ['name' => 'yeyepcthree', 'cfg' => $yeyepcthree_phone],
     ['name' => 'yeye666cd', 'cfg' => $yeye666cd_phone],
+    ['name' => 'xinbao_sec', 'cfg' => $xinbao_sec_phone],
+    ['name' => 'xinbao_trd', 'cfg' => $xinbao_trd_phone],
+    ['name' => 'dunhui', 'cfg' => $dunhui_phone],
 ];
 $config['phone_providers'] = $phone_providers;
 

+ 83 - 4
data/config/yl/refill.ini.php

@@ -2,7 +2,7 @@
 
 global $config;
 
-$config['refill_oil_specs'] = [50, 100, 200, 500, 1000, 2000];
+$config['refill_oil_specs'] = [50, 100, 200, 300, 500, 1000, 2000];
 $config['refill_phone_specs'] = [10, 20, 30, 50, 100, 200, 300, 500];
 $config['refill_phone_small_specs'] = [1, 2, 3, 4, 5, 6, 7, 8, 9];
 //充值额度基本表
@@ -8165,16 +8165,19 @@ $youshilian_phone = ['name' => 'youshilian', 'store_id' => 313, 'qualitys' => '1
             ['goods_id' => 8517, 'price' => 28.11, 'quality' => 1, 'card_type' => 'chinaunicom'],
         ],
         50 => [
-            ['goods_id' => 8518, 'price' => 48.45, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 8518, 'price' => 48.35, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 8518, 'price' => 46.85, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8518, 'price' => 48.35, 'quality' => 1, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 8519, 'price' => 96.9, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 8519, 'price' => 96.7, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 8519, 'price' => 93.7, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8519, 'price' => 96.7, 'quality' => 1, 'card_type' => 'chinatelecom'],
         ],
         200 => [
-            ['goods_id' => 8520, 'price' => 193.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 8520, 'price' => 193.4, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 8520, 'price' => 187.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 8520, 'price' => 193.4, 'quality' => 1, 'card_type' => 'chinatelecom'],
         ],
 //        300 => [
 //            ['goods_id' => 8521, 'price' => 300, 'quality' => 1, 'card_type' => 'chinamobile'],
@@ -8187,6 +8190,80 @@ $youshilian_phone = ['name' => 'youshilian', 'store_id' => 313, 'qualitys' => '1
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$xinbao_phone = ['name' => 'xinbao', 'store_id' => 314, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 8523, 'price' => 10, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8523, 'price' => 10, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+//        20 => [
+//            ['goods_id' => 8524, 'price' => 20, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8524, 'price' => 20, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+        30 => [
+//            ['goods_id' => 8525, 'price' => 30, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 8525, 'price' => 28.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+        50 => [
+            ['goods_id' => 8526, 'price' => 48.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 8526, 'price' => 47, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+        100 => [
+            ['goods_id' => 8527, 'price' => 96.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 8527, 'price' => 94, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+        200 => [
+            ['goods_id' => 8528, 'price' => 193.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 8528, 'price' => 188, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+//        300 => [
+//            ['goods_id' => 8529, 'price' => 300, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8529, 'price' => 300, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+//        500 => [
+//            ['goods_id' => 8530, 'price' => 500, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8530, 'price' => 500, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$dunhui_sec_phone = ['name' => 'dunhui_sec', 'store_id' => 315, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 8531, 'price' => 10, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8531, 'price' => 10, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+//        20 => [
+//            ['goods_id' => 8532, 'price' => 20, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8532, 'price' => 20, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+//        30 => [
+//            ['goods_id' => 8533, 'price' => 30, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8533, 'price' => 30, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+        50 => [
+            ['goods_id' => 8534, 'price' => 48.15, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 8534, 'price' => 46.75, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+        100 => [
+            ['goods_id' => 8535, 'price' => 96.3, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 8535, 'price' => 93.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+        200 => [
+            ['goods_id' => 8536, 'price' => 192.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 8536, 'price' => 187, 'quality' => 1, 'card_type' => 'chinaunicom'],
+        ],
+//        300 => [
+//            ['goods_id' => 8537, 'price' => 300, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8537, 'price' => 300, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ],
+//        500 => [
+//            ['goods_id' => 8538, 'price' => 500, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 8538, 'price' => 500, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -8447,6 +8524,8 @@ $phone_providers = [
     ['name' => 'menshang', 'cfg' => $menshang_phone],
     ['name' => 'menshang_fs', 'cfg' => $menshang_fs_phone],
     ['name' => 'youshilian', 'cfg' => $youshilian_phone],
+    ['name' => 'xinbao', 'cfg' => $xinbao_phone],
+    ['name' => 'dunhui_sec', 'cfg' => $dunhui_sec_phone],
 ];
 
 $config['phone_providers'] = $phone_providers;

+ 11 - 1
helper/refill/api/xyz/dongye/api.txt

@@ -5,4 +5,14 @@
 下单地址 :http://8.134.53.93:9086/onlinepay.do
 查单地址 :http://8.134.53.93:9086/searchpay.do
 查询余额地址 :http://8.134.53.93:9086/searchbalance.do
-后台地址:http://8.134.53.93:7080
+后台地址:http://8.134.53.93:7080
+
+
+=======2024.3.22修改编码===============
+30000005891	全国移动计费50元
+30000005892	全国移动计费100元
+30000005893	全国移动计费200元
+
+30000006191	全国电信计费50元
+30000006174	全国电信计费100元
+30000006175	全国电信计费200元

+ 4 - 4
helper/refill/api/xyz/dongye/config.php

@@ -30,8 +30,8 @@ class config
 //        ],
     //移动拼多多资源
         mtopcard\ChinaMobileCard => [
-            10 => '30000001056', 20 => '30000001057', 30 => '30000001058', 50 => '30000005601',
-            100 => '30000001060', 200 => '30000001061', 300 => '30000001062', 500 => '30000001063'
+            10 => '30000001056', 20 => '30000001057', 30 => '30000001058', 50 => '30000005891',
+            100 => '30000005892', 200 => '30000005893', 300 => '30000001062', 500 => '30000001063'
         ],
         //沃支付
         mtopcard\ChinaUnicomCard => [
@@ -44,8 +44,8 @@ class config
         mtopcard\ChinaTelecomCard => [
             1 => '30000005430', 2 => '30000005431', 3 => '30000005432', 4 => '30000005433',
             5 => '30000005435', 6 => '30000005436', 7 => '30000005437', 8 => '30000005438', 9 => '30000005439',
-            10 => '30000001080', 20 => '30000001081', 30 => '30000001082',
-            100 => '30000005791', 200 => '30000005792', 300 => '30000005793', 500 => '30000005794'
+            10 => '30000001080', 20 => '30000001081', 30 => '30000001082', 50 => '30000006191',
+            100 => '30000006174', 200 => '30000006175', 300 => '30000005793', 500 => '30000005794'
         ],
     ];
 }

BIN
helper/refill/api/xyz/dunhui/20240320_yd_lt.png


+ 33 - 0
helper/refill/api/xyz/dunhui/API.MD

@@ -0,0 +1,33 @@
+
+## 盾辉全国1
+
+### 账号:
+- 登陆账号:FQS
+- 登陆密码:qq123458
+- 商户号:10002643
+- 秘钥:dnsTaPff76RJp8zPy7Ef3GPDPrPyChBR
+### 下游客户注册和登录地址:
+> http://123.60.16.116:7080/
+- api接口文档地址:
+ - https://www.showdoc.com.cn/AQL666666/
+- 话费下单地址:
+ - http://123.60.16.116:9086/onlinepay.do
+- 订单主动查询地址:
+ - http://123.60.16.116:9086/searchpay.do
+- 余额查询:
+- http://123.60.16.116:9086/searchbalance.do
+## 店铺
+- 账号:dunhui
+- 密码:dunhui67890
+
+### 折扣
+![报价](20240320_yd_lt.png)
+
+### 全国产品编码
+101688    全国移动话费50元直充  
+101689    全国移动话费100元直充  
+101690    全国移动话费200元直充  
+
+101706    全国联通话费50元直充  
+101707    全国联通话费100元直充  
+101708    全国联通话费200元直充  

+ 49 - 0
helper/refill/api/xyz/dunhui/RefillCallBack.php

@@ -0,0 +1,49 @@
+<?php
+namespace refill\dunhui;
+
+require_once(BASE_HELPER_RAPI_PATH . '/dunhui/config.php');
+
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $sign = $this->sign($params);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params): string
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "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): array
+    {
+        $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) {
+            $official_sn = strtolower($params['remark1']) == 'null' ? '' : $params['remark1'];
+            $data['official_sn'] = $official_sn;
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true, $official_sn];
+        } elseif ($status === 9) {
+            return [$order_id, false, true, true, ''];
+        } else {
+            return [$order_id, false, false, false, ''];
+        }
+    }
+}

+ 154 - 0
helper/refill/api/xyz/dunhui/RefillPhone.php

@@ -0,0 +1,154 @@
+<?php
+namespace refill\dunhui;
+
+require_once(BASE_HELPER_RAPI_PATH . '/dunhui/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): array
+    {
+        $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): array
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn);
+
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, '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): array
+    {
+        $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
+            {
+                $official_sn = !empty($resp['remark1']) ? $resp['remark1'] : '';
+
+                $resultno = $resp['resultno'];
+                if ($resultno === '1') {
+                    $updata['official_sn'] = $official_sn;
+                    Model('refill_order')->edit($refill_info['order_id'], $updata);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($resultno === '9') {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif ($resultno === '5007' && (time() - $refill_info['commit_time'] > 600)) {
+                    $order_state = ORDER_STATE_NOEXIST;
+                } else {
+                    $order_state = ORDER_STATE_SEND;
+                }
+
+                return [true, $order_state, $official_sn];
+            }
+        }
+    }
+
+    public function balance(): array
+    {
+        $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): string
+    {
+        $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);
+    }
+}

+ 43 - 0
helper/refill/api/xyz/dunhui/config.php

@@ -0,0 +1,43 @@
+<?php
+namespace refill\dunhui;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://123.60.16.116:9086/onlinepay.do';
+    const QUERY_URL= 'http://123.60.16.116:9086/searchpay.do';
+    const BALANCE_URL = 'http://123.60.16.116:9086/searchbalance.do';
+
+    const USER_ID= '10002643';
+    const KEY = 'dnsTaPff76RJp8zPy7Ef3GPDPrPyChBR';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_dunhui.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', '7001'
+    ];
+    const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;'];
+
+    const ProductIdS = [
+        mtopcard\ChinaMobileCard =>
+            [
+                50 => '101688',
+                100 => '101689',
+                200 => '101690',
+            ],
+        mtopcard\ChinaUnicomCard =>
+            [
+                50 => '101706',
+                100 => '101707',
+                200 => '101708',
+            ],
+        mtopcard\ChinaTelecomCard =>
+            [
+
+            ]
+    ];
+}

BIN
helper/refill/api/xyz/guochuang/20240315_yd_guizhou.jpg


BIN
helper/refill/api/xyz/guochuang/20240316_yd_sichuan.jpg


BIN
helper/refill/api/xyz/guochuang/20240317_yd_liaoning.jpg


BIN
helper/refill/api/xyz/guochuang/20240318_yd_liaoning.png


BIN
helper/refill/api/xyz/guochuang/20240319_yd_liaoning.png


BIN
helper/refill/api/xyz/guochuang/20240320_yd_guangdong.png


BIN
helper/refill/api/xyz/guochuang/20240325_yd_shandong.jpg


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

@@ -64,7 +64,7 @@ class config
     const Price = [
         //移动
         "4-10-2" => 10.28, "4-20-2" => 20.56, "4-30-2" => 30.84, "4-50-2" => 50.3, "4-100-2" => 100.3, "4-200-2" => 200.6, "4-300-2" => 300.9, "4-500-2" => 501.5,//天津 2
-        "4-10-6" => 9.645, "4-20-6" => 19.29, "4-30-6" => 28.935, "4-50-6" => 48.225, "4-100-6" => 96.45, "4-200-6" => 192.9, "4-300-6" => 289.35, "4-500-6" => 482.25,//辽宁 6
+        "4-10-6" => 9.64, "4-20-6" => 19.28, "4-30-6" => 28.92, "4-50-6" => 48.2, "4-100-6" => 96.4, "4-200-6" => 192.8, "4-300-6" => 289.2, "4-500-6" => 482,//辽宁 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" => 9.98, "4-20-8" => 19.96, "4-30-8" => 29.94, "4-50-8" => 49.9, "4-100-8" => 99.8, "4-200-8" => 199.6, "4-300-8" => 299.4, "4-500-8" => 499,//黑龙江 8
         "4-10-29" => 9.89, "4-20-29" => 19.78, "4-30-29" => 29.67, "4-50-29" => 49.45, "4-100-29" => 98.9, "4-200-29" => 197.8, "4-300-29" => 296.7, "4-500-29" => 494.5,//青海 29
@@ -72,23 +72,23 @@ class config
         "4-10-13" => 9.965, "4-20-13" => 19.93, "4-30-13" => 29.895, "4-50-13" => 49.825, "4-100-13" => 99.65, "4-200-13" => 199.3, "4-300-13" => 298.95, "4-500-13" => 498.25,//福建 13
         "4-10-5" => 10.035, "4-20-5" => 20.07, "4-30-5" => 30.09, "4-50-5" => 50.15, "4-100-5" => 100.3, "4-200-5" => 200.4, "4-300-5" => 300.6, "4-500-5" => 501,//内蒙古 5
         "4-30-18" => 29.835, "4-50-18" => 49.725, "4-100-18" => 99.45, "4-200-18" => 198.3,//湖南 18
-        "4-10-19" => 10.1, "4-20-19" => 20.2, "4-30-19" => 30.03, "4-50-19" => 50.35, "4-100-19" => 100.7, "4-200-19" => 201.4, "4-300-19" => 302.1, "4-500-19" => 503.5,//广东 19
+        "4-10-19" => 10.1, "4-20-19" => 20.2, "4-30-19" => 30.03, "4-50-19" => 50.3, "4-100-19" => 100.6, "4-200-19" => 201.2, "4-300-19" => 301.8, "4-500-19" => 503,//广东 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-10-15" => 10.34, "4-20-15" => 20.54, "4-30-15" => 30.57, "4-50-15" => 50.35, "4-100-15" => 99.3, "4-200-15" => 198.6, "4-300-15" => 297.9,//山东 15
+        "4-10-15" => 10.34, "4-20-15" => 20.54, "4-30-15" => 30.57, "4-50-15" => 50.7, "4-100-15" => 99.3, "4-200-15" => 198.6, "4-300-15" => 297.9,//山东 15
         "4-10-10" => 9.945, "4-20-10" => 19.89, "4-30-10" => 30.18, "4-50-10" => 50.2, "4-100-10" => 100.2, "4-200-10" => 200.4, "4-300-10" => 300.6, "4-500-10" => 501,//江苏 10
         "4-10-11" => 9.945, "4-20-11" => 19.89, "4-30-11" => 29.835, "4-50-11" => 49.725, "4-100-11" => 99.45, "4-200-11" => 198.9, "4-300-11" => 298.35, "4-500-11" => 497.25,//浙江 11
         "4-10-17" => 9.945, "4-20-17" => 19.89, "4-30-17" => 29.835, "4-50-17" => 49.725, "4-100-17" => 99.45, "4-200-17" => 198.9, "4-300-17" => 298.35, "4-500-17" => 497.25,//湖北 17
         "4-10-16" => 10.27, "4-20-16" => 20.54, "4-30-16" => 30.81, "4-50-16" => 50.175, "4-100-16" => 100.2, "4-200-16" => 200.4, "4-300-16" => 300.6, "4-500-16" => 501,//河南 16
         "4-10-4" => 10.23, "4-20-4" => 20.46, "4-30-4" => 30.105, "4-50-4" => 50.175, "4-100-4" => 100.35, "4-200-4" => 200.7, "4-300-4" => 301.05, "4-500-4" => 501.75,//山西 4
-        "4-10-24" => 10.11, "4-20-24" => 20.12, "4-30-24" => 30.15, "4-50-24" => 50.05, "4-100-24" => 100.1, "4-200-24" => 200.2, "4-300-24" => 300.3, "4-500-24" => 500.5,//贵州 24
+        "4-10-24" => 10.12, "4-20-24" => 20.14, "4-30-24" => 30.165, "4-50-24" => 50.1, "4-100-24" => 100.2, "4-200-24" => 200.4, "4-300-24" => 300.6, "4-500-24" => 501,//贵州 24
         "4-10-30" => 10.12, "4-20-30" => 20.24, "4-30-30" => 30.129, "4-50-30" => 50.15, "4-100-30" => 100.2, "4-200-30" => 200.4, "4-300-30" => 300.3, "4-500-30" => 500.5,//宁夏 30
         "4-10-25" => 10.14, "4-20-25" => 20.2, "4-30-25" => 30.18, "4-50-25" => 50.1, "4-100-25" => 100.2, "4-200-25" => 200.4, "4-300-25" => 300.6, "4-500-25" => 501,//云南 25
         "4-10-27" => 10.29, "4-20-27" => 20.58, "4-30-27" => 30.48, "4-50-27" => 50.1, "4-100-27" => 100.2, "4-200-27" => 200.4, "4-300-27" => 300.6, "4-500-27" => 501,//陕西 27
         "4-10-31" => 10.4, "4-20-31" => 20.5,//新疆 31
         "4-10-3" => 10.36, "4-20-3" => 20.72, "4-30-3" => 31.08, "4-50-3" => 50.4,//河北 3
-        "4-10-23" => 10.33, "4-20-23" => 20.66, "4-30-23" => 30.99,//四川 23
+        "4-10-23" => 10.31, "4-20-23" => 20.62, "4-30-23" => 30.93,//四川 23
 
         //联通
         "5-10-19" => 10.04, "5-20-19" => 20.08, "5-30-19" => 30.06, "5-50-19" => 50.1, "5-100-19" => 100.2, "5-200-19" => 200.4, "5-300-19" => 300.6, "5-500-19" => 501,//广东 19

helper/refill/api/xyz/guochuang/20240101_yd_guangdong.jpg → helper/refill/api/xyz/guochuang/调价函/20240101_yd_guangdong.jpg


helper/refill/api/xyz/guochuang/20240101_yd_liaoning.jpg → helper/refill/api/xyz/guochuang/调价函/20240101_yd_liaoning.jpg


helper/refill/api/xyz/guochuang/20240102_yd_hebei.png → helper/refill/api/xyz/guochuang/调价函/20240102_yd_hebei.png


helper/refill/api/xyz/guochuang/20240102_yd_hebei_2.png → helper/refill/api/xyz/guochuang/调价函/20240102_yd_hebei_2.png


helper/refill/api/xyz/guochuang/20240103_yd_hebei.png → helper/refill/api/xyz/guochuang/调价函/20240103_yd_hebei.png


helper/refill/api/xyz/guochuang/20240103_yd_liaoning.png → helper/refill/api/xyz/guochuang/调价函/20240103_yd_liaoning.png


helper/refill/api/xyz/guochuang/20240104_yd_liaoning.png → helper/refill/api/xyz/guochuang/调价函/20240104_yd_liaoning.png


helper/refill/api/xyz/guochuang/20240104_yd_liaoning2.png → helper/refill/api/xyz/guochuang/调价函/20240104_yd_liaoning2.png


helper/refill/api/xyz/guochuang/20240105_yd_guangdong.png → helper/refill/api/xyz/guochuang/调价函/20240105_yd_guangdong.png


helper/refill/api/xyz/guochuang/20240110_yd_liaoning.jpg → helper/refill/api/xyz/guochuang/调价函/20240110_yd_liaoning.jpg


helper/refill/api/xyz/guochuang/20240111_dx_henan.jpg → helper/refill/api/xyz/guochuang/调价函/20240111_dx_henan.jpg


helper/refill/api/xyz/guochuang/20240116_dx_antjln.jpg → helper/refill/api/xyz/guochuang/调价函/20240116_dx_antjln.jpg


helper/refill/api/xyz/guochuang/20240117_yd_liaoning.jpg → helper/refill/api/xyz/guochuang/调价函/20240117_yd_liaoning.jpg


helper/refill/api/xyz/guochuang/20240118_yd_sc_gs.jpg → helper/refill/api/xyz/guochuang/调价函/20240118_yd_sc_gs.jpg


helper/refill/api/xyz/guochuang/20240119_dx_tj_ah_ln.jpg → helper/refill/api/xyz/guochuang/调价函/20240119_dx_tj_ah_ln.jpg


helper/refill/api/xyz/guochuang/20240128_yd_sichuan.jpg → helper/refill/api/xyz/guochuang/调价函/20240128_yd_sichuan.jpg


helper/refill/api/xyz/guochuang/20240129_yd_qinghai.png → helper/refill/api/xyz/guochuang/调价函/20240129_yd_qinghai.png


helper/refill/api/xyz/guochuang/20240131_yd_liaoning.jpg → helper/refill/api/xyz/guochuang/调价函/20240131_yd_liaoning.jpg


helper/refill/api/xyz/guochuang/20240201_dx_shanxi.jpg → helper/refill/api/xyz/guochuang/调价函/20240201_dx_shanxi.jpg


helper/refill/api/xyz/guochuang/20240204_yd_liaoning.png → helper/refill/api/xyz/guochuang/调价函/20240204_yd_liaoning.png


helper/refill/api/xyz/guochuang/20240206_yd_shanxi.jpg → helper/refill/api/xyz/guochuang/调价函/20240206_yd_shanxi.jpg


helper/refill/api/xyz/guochuang/20240208_yd_shandong.jpg → helper/refill/api/xyz/guochuang/调价函/20240208_yd_shandong.jpg


helper/refill/api/xyz/guochuang/20240218_dx_qinghai.jpg → helper/refill/api/xyz/guochuang/调价函/20240218_dx_qinghai.jpg


helper/refill/api/xyz/guochuang/20240218_yd_shandong.png → helper/refill/api/xyz/guochuang/调价函/20240218_yd_shandong.png


helper/refill/api/xyz/guochuang/20240219_yd_guangdong.jpg → helper/refill/api/xyz/guochuang/调价函/20240219_yd_guangdong.jpg


helper/refill/api/xyz/guochuang/20240220_yd_guangdong.jpg → helper/refill/api/xyz/guochuang/调价函/20240220_yd_guangdong.jpg


helper/refill/api/xyz/guochuang/20240220_yd_hebei.jpg → helper/refill/api/xyz/guochuang/调价函/20240220_yd_hebei.jpg


helper/refill/api/xyz/guochuang/20240221_yd_shanxi.jpg → helper/refill/api/xyz/guochuang/调价函/20240221_yd_shanxi.jpg


helper/refill/api/xyz/guochuang/20240222_dx_shanxi.jpg → helper/refill/api/xyz/guochuang/调价函/20240222_dx_shanxi.jpg


helper/refill/api/xyz/guochuang/20240222_yd_liaoning.jpg → helper/refill/api/xyz/guochuang/调价函/20240222_yd_liaoning.jpg


helper/refill/api/xyz/guochuang/20240222_yd_shandong.jpg → helper/refill/api/xyz/guochuang/调价函/20240222_yd_shandong.jpg


helper/refill/api/xyz/guochuang/20240226_yd_liaoning_guangdong.jpg → helper/refill/api/xyz/guochuang/调价函/20240226_yd_liaoning_guangdong.jpg


helper/refill/api/xyz/guochuang/20240226_yd_shandong.jpg → helper/refill/api/xyz/guochuang/调价函/20240226_yd_shandong.jpg


helper/refill/api/xyz/guochuang/20240226_yd_sichuan.png → helper/refill/api/xyz/guochuang/调价函/20240226_yd_sichuan.png


helper/refill/api/xyz/guochuang/20240227_yd_guizhou.jpg → helper/refill/api/xyz/guochuang/调价函/20240227_yd_guizhou.jpg


helper/refill/api/xyz/guochuang/20240228_dx_anhui.jpg → helper/refill/api/xyz/guochuang/调价函/20240228_dx_anhui.jpg


helper/refill/api/xyz/guochuang/20240303_yd_guizhou.jpg → helper/refill/api/xyz/guochuang/调价函/20240303_yd_guizhou.jpg


helper/refill/api/xyz/guochuang/20240305_yd_guizhou.jpg → helper/refill/api/xyz/guochuang/调价函/20240305_yd_guizhou.jpg


helper/refill/api/xyz/guochuang/20240305_yd_shandong.jpg → helper/refill/api/xyz/guochuang/调价函/20240305_yd_shandong.jpg


helper/refill/api/xyz/guochuang/20240313_yd_liaoning.png → helper/refill/api/xyz/guochuang/调价函/20240313_yd_liaoning.png


helper/refill/api/xyz/guochuang/20240313_yd_shandong.png → helper/refill/api/xyz/guochuang/调价函/20240313_yd_shandong.png


+ 36 - 0
helper/refill/api/xyz/xinbao_sec/API.MD

@@ -0,0 +1,36 @@
+## 鑫宝全国2号(普充)
+
+### 正式环境:
+- 话费下单地址:http://101.37.158.170:16188/plat/api/hf/submitorder
+- 查询地址:http://101.37.158.170:16188/plat/api/queryorder
+- 查询余额地址:http://101.37.158.170:16188/plat/api/querybalance
+
+- 客户端地址:http://101.37.158.170:16188/plat/login
+- 账号:fuqinyidong
+- 密码:fqyd123456
+- 客户ID:100050
+- 密钥:b2e0468bf0604009a1598c2084d93cee
+
+### 对接文档地址:
+> https://docs.qq.com/doc/DWkV1VkxQVk13eEtQ
+
+### 店铺账号
+- xinbao_sec
+- xinbao_sec67890
+### 产品编码
+全国1、2号账号说明  
+运营上	折扣	回调时间	面额  
+移动	96.8	3-5分以内	50-200  
+联通	94	3-5分以内	30-200
+
+>
+联通	30	2000030  
+联通	50	2000050  
+联通	100	2000100  
+联通	200	2000200  
+
+移动	50	1000100  
+移动	100	1000100  
+移动	200	1000200  
+
+

+ 52 - 0
helper/refill/api/xyz/xinbao_sec/RefillCallBack.php

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

+ 146 - 0
helper/refill/api/xyz/xinbao_sec/RefillPhone.php

@@ -0,0 +1,146 @@
+<?php
+
+namespace refill\xinbao_sec;
+
+require_once(BASE_HELPER_RAPI_PATH . '/xinbao_sec/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['szProductId'] = config::Product[$card_type][$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'];
+        $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, '网络错误', ''];
+            }
+
+            $official_sn = '';
+
+            $status = $resp['nRtn'];
+            if ($status === 5012) {
+                $official_sn = $resp['szRtnMsg'];
+
+                $updata['official_sn'] = $official_sn;
+                Model('refill_order')->edit($refill_info['order_id'], $updata);
+                $order_state = ORDER_STATE_SUCCESS;
+            } elseif ($status === 5013) {
+                $order_state = ORDER_STATE_CANCEL;
+            } elseif (in_array($status, [5011,5019],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, $official_sn];
+        }
+    }
+
+    public function balance()
+    {
+        $params['szAgentId'] = config::USER_ID;
+        $key = config::KEY;
+        $content = "szAgentId={$params['szAgentId']}&szKey={$key}";
+        $params['szVerifyString'] = md5($content);
+
+        $resp = http_request(config::BALANCE_URL, $params, 'POST', false, config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            } elseif ($resp['nRtn'] === 0) {
+                return [true, $resp['fBalance']];
+            } else {
+                return [false, $resp['szRtnCode']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "szAgentId={$userid}&szOrderId={$params['szOrderId']}&szPhoneNum={$params['szPhoneNum']}&nMoney={$params['nMoney']}&nSortType={$params['nSortType']}";
+        $content .= "&nProductClass={$params['nProductClass']}&nProductType={$params['nProductType']}&szTimeStamp={$params['szTimeStamp']}&szKey={$key}";
+        return md5($content);
+    }
+}

+ 43 - 0
helper/refill/api/xyz/xinbao_sec/config.php

@@ -0,0 +1,43 @@
+<?php
+
+
+namespace refill\xinbao_sec;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://101.37.158.170:16188/plat/api/hf/submitorder';
+    const QUERY_URL= 'http://101.37.158.170:16188/plat/api/queryorder';
+    const BALANCE_URL = 'http://101.37.158.170:16188/plat/api/querybalance';
+
+    const USER_ID= '100050';
+    const KEY = 'b2e0468bf0604009a1598c2084d93cee';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_xinbao_sec.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 => [
+            50 => 1000050,
+            100 => 1000100,
+            200 => 1000200,
+        ],
+        mtopcard\ChinaUnicomCard => [
+            30  => 2000030,
+            50  => 2000050,
+            100 => 2000100,
+            200 => 2000200,
+        ],
+        mtopcard\ChinaTelecomCard => [
+        ],
+    ];
+}

+ 36 - 0
helper/refill/api/xyz/xinbao_trd/API.MD

@@ -0,0 +1,36 @@
+## 鑫宝全国3号(普充)
+
+### 正式环境:
+- 话费下单地址:http://101.37.158.170:16188/plat/api/hf/submitorder
+- 查询地址:http://101.37.158.170:16188/plat/api/queryorder
+- 查询余额地址:http://101.37.158.170:16188/plat/api/querybalance
+
+- 客户端地址:http://101.37.158.170:16188/plat/login
+- 账号:fuqinqijianziyuan
+- 密码:fqqjzy123
+- 客户ID:100051
+- 密钥:6ff062b598fe4fa1b5998daf9ea8194c
+
+### 对接文档地址:
+> https://docs.qq.com/doc/DWkV1VkxQVk13eEtQ
+
+### 店铺账号
+- xinbao_trd
+- xinbao_trd67890
+### 产品编码
+全国1、2号账号说明  
+运营上	折扣	回调时间	面额  
+移动	96.8	3-5分以内	50-200  
+联通	94	3-5分以内	30-200
+
+>
+联通	30	2000030  
+联通	50	2000050  
+联通	100	2000100  
+联通	200	2000200  
+
+移动	50	1000100  
+移动	100	1000100  
+移动	200	1000200  
+
+

+ 52 - 0
helper/refill/api/xyz/xinbao_trd/RefillCallBack.php

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

+ 146 - 0
helper/refill/api/xyz/xinbao_trd/RefillPhone.php

@@ -0,0 +1,146 @@
+<?php
+
+namespace refill\xinbao_trd;
+
+require_once(BASE_HELPER_RAPI_PATH . '/xinbao_trd/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['szProductId'] = config::Product[$card_type][$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'];
+        $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, '网络错误', ''];
+            }
+
+            $official_sn = '';
+
+            $status = $resp['nRtn'];
+            if ($status === 5012) {
+                $official_sn = $resp['szRtnMsg'];
+
+                $updata['official_sn'] = $official_sn;
+                Model('refill_order')->edit($refill_info['order_id'], $updata);
+                $order_state = ORDER_STATE_SUCCESS;
+            } elseif ($status === 5013) {
+                $order_state = ORDER_STATE_CANCEL;
+            } elseif (in_array($status, [5011,5019],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, $official_sn];
+        }
+    }
+
+    public function balance()
+    {
+        $params['szAgentId'] = config::USER_ID;
+        $key = config::KEY;
+        $content = "szAgentId={$params['szAgentId']}&szKey={$key}";
+        $params['szVerifyString'] = md5($content);
+
+        $resp = http_request(config::BALANCE_URL, $params, 'POST', false, config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            } elseif ($resp['nRtn'] === 0) {
+                return [true, $resp['fBalance']];
+            } else {
+                return [false, $resp['szRtnCode']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "szAgentId={$userid}&szOrderId={$params['szOrderId']}&szPhoneNum={$params['szPhoneNum']}&nMoney={$params['nMoney']}&nSortType={$params['nSortType']}";
+        $content .= "&nProductClass={$params['nProductClass']}&nProductType={$params['nProductType']}&szTimeStamp={$params['szTimeStamp']}&szKey={$key}";
+        return md5($content);
+    }
+}

+ 43 - 0
helper/refill/api/xyz/xinbao_trd/config.php

@@ -0,0 +1,43 @@
+<?php
+
+
+namespace refill\xinbao_trd;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://101.37.158.170:16188/plat/api/hf/submitorder';
+    const QUERY_URL= 'http://101.37.158.170:16188/plat/api/queryorder';
+    const BALANCE_URL = 'http://101.37.158.170:16188/plat/api/querybalance';
+
+    const USER_ID= '100051';
+    const KEY = '6ff062b598fe4fa1b5998daf9ea8194c';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_xinbao_trd.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 => [
+            50 => 1000050,
+            100 => 1000100,
+            200 => 1000200,
+        ],
+        mtopcard\ChinaUnicomCard => [
+            30  => 2000030,
+            50  => 2000050,
+            100 => 2000100,
+            200 => 2000200,
+        ],
+        mtopcard\ChinaTelecomCard => [
+        ],
+    ];
+}

BIN
helper/refill/api/xyz/xuyou_oil/20240321_oil.png


+ 14 - 0
helper/refill/api/xyz/xuyou_oil/RefillOil.php

@@ -15,6 +15,20 @@ class RefillOil extends refill\IRefillOil
         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 getProductID($card_type,$amount) : string
     {
         if(array_key_exists($card_type,config::product_codes))

+ 30 - 0
helper/refill/api/xyz/xuyou_oil/config.php

@@ -20,4 +20,34 @@ class config
             100 => 990001,
         ],
     ];
+
+    //key格式 卡类型-面值-regin_no
+    const Price = [
+        "7-100-8" => 100, "7-200-8" => 200, "7-300-8" => 300,//黑龙江 827
+        "7-100-7" => 98, "7-200-7" => 196, "7-300-7" => 294,//吉林 7
+        "7-100-4" => 98.5, "7-200-4" => 197, "7-300-4" => 295.5,//山西 4
+        "7-100-1" => 98, "7-200-1" => 196, "7-300-1" => 294,//北京 1
+        "7-100-2" => 98.5, "7-200-2" => 197, "7-300-2" => 295.5,//天津 2
+        "7-100-15" => 97, "7-200-15" => 194, "7-300-15" => 291,//山东 15
+        "7-100-16" => 98.5, "7-200-16" => 197, "7-300-16" => 295.5,//河南 16
+        "7-100-5" => 98.5, "7-200-5" => 197, "7-300-5" => 295.5,//内蒙古 5
+        "7-100-24" => 98, "7-200-24" => 196, "7-300-24" => 294,//贵州 24
+        "7-100-19" => 97, "7-200-19" => 194, "7-300-19" => 291,//广东 19
+        "7-100-25" => 97.5, "7-200-25" => 195, "7-300-25" => 292.5,//云南 25
+        "7-100-17" => 98, "7-200-17" => 196, "7-300-17" => 294,//湖北 17
+        "7-100-10" => 98, "7-200-10" => 196, "7-300-10" => 294,//江苏 10
+        "7-100-13" => 98, "7-200-13" => 196, "7-300-13" => 294,//福建 13
+        "7-100-23" => 100, "7-200-23" => 200, "7-300-23" => 300,//四川 23
+//        "7-100-11" => 100, "7-200-11" => 200, "7-300-11" => 300,//浙江 11
+        "7-100-20" => 97.5, "7-200-20" => 195, "7-300-20" => 292.5,//广西 20
+        "7-100-18" => 97.5, "7-200-18" => 195, "7-300-18" => 292.5,//湖南 18
+        "7-100-14" => 98.5, "7-200-14" => 197, "7-300-14" => 295.5,//江西 14
+        "7-100-21" => 96.5, "7-200-21" => 193, "7-300-21" => 289.5,//海南 21
+        "7-100-9" => 98, "7-200-9" => 196, "7-300-9" => 294,//上海 9
+        "7-100-12" => 98, "7-200-12" => 196, "7-300-12" => 294,//安徽 12
+        "7-100-3" => 98, "7-200-3" => 196, "7-300-3" => 294,//河北 3
+        "7-100-30" => 99.5, "7-200-30" => 199, "7-300-30" => 298.5,//宁夏 30
+        "7-100-28" => 100, "7-200-28" => 200, "7-300-28" => 300,//甘肃 28
+        "7-100-27" => 100, "7-200-27" => 200, "7-300-27" => 300,//陕西
+    ];
 }

BIN
helper/refill/api/yl/dunhui_sec/20240320_yd_lt.png


+ 33 - 0
helper/refill/api/yl/dunhui_sec/API.MD

@@ -0,0 +1,33 @@
+
+## 盾辉全国2号
+
+### 账号:
+- 登陆账号:FQS2
+- 登陆密码:q123458
+- 商户号:10002645
+- 秘钥:tK4BPJNjhjKQhkXQjG7nC5FD4nmcBKbe
+### 下游客户注册和登录地址:
+> http://123.60.16.116:7080/
+- api接口文档地址:
+ - https://www.showdoc.com.cn/AQL666666/
+- 话费下单地址:
+ - http://123.60.16.116:9086/onlinepay.do
+- 订单主动查询地址:
+ - http://123.60.16.116:9086/searchpay.do
+- 余额查询:
+- http://123.60.16.116:9086/searchbalance.do
+## 店铺
+- 账号:dunhui_sec
+- 密码:dunhui_sec67890
+
+### 折扣
+![报价](20240320_yd_lt.png)
+
+### 全国产品编码
+101688    全国移动话费50元直充  
+101689    全国移动话费100元直充  
+101690    全国移动话费200元直充  
+
+101706    全国联通话费50元直充  
+101707    全国联通话费100元直充  
+101708    全国联通话费200元直充  

+ 49 - 0
helper/refill/api/yl/dunhui_sec/RefillCallBack.php

@@ -0,0 +1,49 @@
+<?php
+namespace refill\dunhui_sec;
+
+require_once(BASE_HELPER_RAPI_PATH . '/dunhui_sec/config.php');
+
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $sign = $this->sign($params);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params): string
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "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): array
+    {
+        $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) {
+            $official_sn = strtolower($params['remark1']) == 'null' ? '' : $params['remark1'];
+            $data['official_sn'] = $official_sn;
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true, $official_sn];
+        } elseif ($status === 9) {
+            return [$order_id, false, true, true, ''];
+        } else {
+            return [$order_id, false, false, false, ''];
+        }
+    }
+}

+ 154 - 0
helper/refill/api/yl/dunhui_sec/RefillPhone.php

@@ -0,0 +1,154 @@
+<?php
+namespace refill\dunhui_sec;
+
+require_once(BASE_HELPER_RAPI_PATH . '/dunhui_sec/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): array
+    {
+        $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): array
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn);
+
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, '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): array
+    {
+        $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
+            {
+                $official_sn = !empty($resp['remark1']) ? $resp['remark1'] : '';
+
+                $resultno = $resp['resultno'];
+                if ($resultno === '1') {
+                    $updata['official_sn'] = $official_sn;
+                    Model('refill_order')->edit($refill_info['order_id'], $updata);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($resultno === '9') {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif ($resultno === '5007' && (time() - $refill_info['commit_time'] > 600)) {
+                    $order_state = ORDER_STATE_NOEXIST;
+                } else {
+                    $order_state = ORDER_STATE_SEND;
+                }
+
+                return [true, $order_state, $official_sn];
+            }
+        }
+    }
+
+    public function balance(): array
+    {
+        $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): string
+    {
+        $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);
+    }
+}

+ 43 - 0
helper/refill/api/yl/dunhui_sec/config.php

@@ -0,0 +1,43 @@
+<?php
+namespace refill\dunhui_sec;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://123.60.16.116:9086/onlinepay.do';
+    const QUERY_URL= 'http://123.60.16.116:9086/searchpay.do';
+    const BALANCE_URL = 'http://123.60.16.116:9086/searchbalance.do';
+
+    const USER_ID= '10002645';
+    const KEY = 'tK4BPJNjhjKQhkXQjG7nC5FD4nmcBKbe';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_dunhui_sec.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', '7001'
+    ];
+    const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;'];
+
+    const ProductIdS = [
+        mtopcard\ChinaMobileCard =>
+            [
+                50 => '101688',
+                100 => '101689',
+                200 => '101690',
+            ],
+        mtopcard\ChinaUnicomCard =>
+            [
+                50 => '101706',
+                100 => '101707',
+                200 => '101708',
+            ],
+        mtopcard\ChinaTelecomCard =>
+            [
+
+            ]
+    ];
+}

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

@@ -64,7 +64,7 @@ class config
     const Price = [
         //移动
         "4-10-2" => 10.28, "4-20-2" => 20.56, "4-30-2" => 30.84, "4-50-2" => 50.3, "4-100-2" => 100.3, "4-200-2" => 200.6, "4-300-2" => 300.9, "4-500-2" => 501.5,//天津 2
-        "4-10-6" => 9.645, "4-20-6" => 19.29, "4-30-6" => 28.935, "4-50-6" => 48.225, "4-100-6" => 96.45, "4-200-6" => 192.9, "4-300-6" => 289.35, "4-500-6" => 482.25,//辽宁 6
+        "4-10-6" => 9.64, "4-20-6" => 19.28, "4-30-6" => 28.92, "4-50-6" => 48.2, "4-100-6" => 96.4, "4-200-6" => 192.8, "4-300-6" => 289.2, "4-500-6" => 482,//辽宁 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" => 9.98, "4-20-8" => 19.96, "4-30-8" => 29.94, "4-50-8" => 49.9, "4-100-8" => 99.8, "4-200-8" => 199.6, "4-300-8" => 299.4, "4-500-8" => 499,//黑龙江 8
         "4-10-29" => 9.89, "4-20-29" => 19.78, "4-30-29" => 29.67, "4-50-29" => 49.45, "4-100-29" => 98.9, "4-200-29" => 197.8, "4-300-29" => 296.7, "4-500-29" => 494.5,//青海 29
@@ -72,23 +72,23 @@ class config
         "4-10-13" => 9.965, "4-20-13" => 19.93, "4-30-13" => 29.895, "4-50-13" => 49.825, "4-100-13" => 99.65, "4-200-13" => 199.3, "4-300-13" => 298.95, "4-500-13" => 498.25,//福建 13
         "4-10-5" => 10.035, "4-20-5" => 20.07, "4-30-5" => 30.09, "4-50-5" => 50.15, "4-100-5" => 100.3, "4-200-5" => 200.4, "4-300-5" => 300.6, "4-500-5" => 501,//内蒙古 5
         "4-30-18" => 29.835, "4-50-18" => 49.725, "4-100-18" => 99.45, "4-200-18" => 198.3,//湖南 18
-        "4-10-19" => 10.1, "4-20-19" => 20.2, "4-30-19" => 30.03, "4-50-19" => 50.35, "4-100-19" => 100.7, "4-200-19" => 201.4, "4-300-19" => 302.1, "4-500-19" => 503.5,//广东 19
+        "4-10-19" => 10.1, "4-20-19" => 20.2, "4-30-19" => 30.03, "4-50-19" => 50.3, "4-100-19" => 100.6, "4-200-19" => 201.2, "4-300-19" => 301.8, "4-500-19" => 503,//广东 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-10-15" => 10.34, "4-20-15" => 20.54, "4-30-15" => 30.57, "4-50-15" => 50.35, "4-100-15" => 99.3, "4-200-15" => 198.6, "4-300-15" => 297.9,//山东 15
+        "4-10-15" => 10.34, "4-20-15" => 20.54, "4-30-15" => 30.57, "4-50-15" => 50.7, "4-100-15" => 99.3, "4-200-15" => 198.6, "4-300-15" => 297.9,//山东 15
         "4-10-10" => 9.945, "4-20-10" => 19.89, "4-30-10" => 30.18, "4-50-10" => 50.2, "4-100-10" => 100.2, "4-200-10" => 200.4, "4-300-10" => 300.6, "4-500-10" => 501,//江苏 10
         "4-10-11" => 9.945, "4-20-11" => 19.89, "4-30-11" => 29.835, "4-50-11" => 49.725, "4-100-11" => 99.45, "4-200-11" => 198.9, "4-300-11" => 298.35, "4-500-11" => 497.25,//浙江 11
         "4-10-17" => 9.945, "4-20-17" => 19.89, "4-30-17" => 29.835, "4-50-17" => 49.725, "4-100-17" => 99.45, "4-200-17" => 198.9, "4-300-17" => 298.35, "4-500-17" => 497.25,//湖北 17
         "4-10-16" => 10.27, "4-20-16" => 20.54, "4-30-16" => 30.81, "4-50-16" => 50.175, "4-100-16" => 100.2, "4-200-16" => 200.4, "4-300-16" => 300.6, "4-500-16" => 501,//河南 16
         "4-10-4" => 10.23, "4-20-4" => 20.46, "4-30-4" => 30.105, "4-50-4" => 50.175, "4-100-4" => 100.35, "4-200-4" => 200.7, "4-300-4" => 301.05, "4-500-4" => 501.75,//山西 4
-        "4-10-24" => 10.11, "4-20-24" => 20.12, "4-30-24" => 30.15, "4-50-24" => 50.05, "4-100-24" => 100.1, "4-200-24" => 200.2, "4-300-24" => 300.3, "4-500-24" => 500.5,//贵州 24
+        "4-10-24" => 10.12, "4-20-24" => 20.14, "4-30-24" => 30.165, "4-50-24" => 50.1, "4-100-24" => 100.2, "4-200-24" => 200.4, "4-300-24" => 300.6, "4-500-24" => 501,//贵州 24
         "4-10-30" => 10.12, "4-20-30" => 20.24, "4-30-30" => 30.129, "4-50-30" => 50.15, "4-100-30" => 100.2, "4-200-30" => 200.4, "4-300-30" => 300.3, "4-500-30" => 500.5,//宁夏 30
         "4-10-25" => 10.14, "4-20-25" => 20.2, "4-30-25" => 30.18, "4-50-25" => 50.1, "4-100-25" => 100.2, "4-200-25" => 200.4, "4-300-25" => 300.6, "4-500-25" => 501,//云南 25
         "4-10-27" => 10.29, "4-20-27" => 20.58, "4-30-27" => 30.48, "4-50-27" => 50.1, "4-100-27" => 100.2, "4-200-27" => 200.4, "4-300-27" => 300.6, "4-500-27" => 501,//陕西 27
         "4-10-31" => 10.4, "4-20-31" => 20.5,//新疆 31
         "4-10-3" => 10.36, "4-20-3" => 20.72, "4-30-3" => 31.08, "4-50-3" => 50.4,//河北 3
-        "4-10-23" => 10.33, "4-20-23" => 20.66, "4-30-23" => 30.99,//四川 23
+        "4-10-23" => 10.31, "4-20-23" => 20.62, "4-30-23" => 30.93,//四川 23
 
         //联通
         "5-10-19" => 10.04, "5-20-19" => 20.08, "5-30-19" => 30.06, "5-50-19" => 50.1, "5-100-19" => 100.2, "5-200-19" => 200.4, "5-300-19" => 300.6, "5-500-19" => 501,//广东 19

+ 36 - 0
helper/refill/api/yl/xinbao/API.MD

@@ -0,0 +1,36 @@
+## 鑫宝全国1号(普充)
+
+### 正式环境:
+- 话费下单地址:http://101.37.158.170:16188/plat/api/hf/submitorder
+- 查询地址:http://101.37.158.170:16188/plat/api/queryorder
+- 查询余额地址:http://101.37.158.170:16188/plat/api/querybalance
+
+- 客户端地址:http://101.37.158.170:16188/plat/login
+- 账号:fuqin
+- 密码:fq123456
+- 客户ID:100049
+- 密钥:774e06fa2b1949678c1ab84ff41de25f
+
+### 对接文档地址:
+> https://docs.qq.com/doc/DWkV1VkxQVk13eEtQ
+
+### 店铺账号
+- xinbao
+- xinbao67890
+### 产品编码
+全国1、2号账号说明  
+运营上	折扣	回调时间	面额  
+移动	96.8	3-5分以内	50-200  
+联通	94	3-5分以内	30-200
+
+>
+联通	30	2000030  
+联通	50	2000050  
+联通	100	2000100  
+联通	200	2000200  
+
+移动	50	1000100  
+移动	100	1000100  
+移动	200	1000200  
+
+

+ 52 - 0
helper/refill/api/yl/xinbao/RefillCallBack.php

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

+ 146 - 0
helper/refill/api/yl/xinbao/RefillPhone.php

@@ -0,0 +1,146 @@
+<?php
+
+namespace refill\xinbao;
+
+require_once(BASE_HELPER_RAPI_PATH . '/xinbao/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['szProductId'] = config::Product[$card_type][$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'];
+        $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, '网络错误', ''];
+            }
+
+            $official_sn = '';
+
+            $status = $resp['nRtn'];
+            if ($status === 5012) {
+                $official_sn = $resp['szRtnMsg'];
+
+                $updata['official_sn'] = $official_sn;
+                Model('refill_order')->edit($refill_info['order_id'], $updata);
+                $order_state = ORDER_STATE_SUCCESS;
+            } elseif ($status === 5013) {
+                $order_state = ORDER_STATE_CANCEL;
+            } elseif (in_array($status, [5011,5019],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, $official_sn];
+        }
+    }
+
+    public function balance()
+    {
+        $params['szAgentId'] = config::USER_ID;
+        $key = config::KEY;
+        $content = "szAgentId={$params['szAgentId']}&szKey={$key}";
+        $params['szVerifyString'] = md5($content);
+
+        $resp = http_request(config::BALANCE_URL, $params, 'POST', false, config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            } elseif ($resp['nRtn'] === 0) {
+                return [true, $resp['fBalance']];
+            } else {
+                return [false, $resp['szRtnCode']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "szAgentId={$userid}&szOrderId={$params['szOrderId']}&szPhoneNum={$params['szPhoneNum']}&nMoney={$params['nMoney']}&nSortType={$params['nSortType']}";
+        $content .= "&nProductClass={$params['nProductClass']}&nProductType={$params['nProductType']}&szTimeStamp={$params['szTimeStamp']}&szKey={$key}";
+        return md5($content);
+    }
+}

+ 43 - 0
helper/refill/api/yl/xinbao/config.php

@@ -0,0 +1,43 @@
+<?php
+
+
+namespace refill\xinbao;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://101.37.158.170:16188/plat/api/hf/submitorder';
+    const QUERY_URL= 'http://101.37.158.170:16188/plat/api/queryorder';
+    const BALANCE_URL = 'http://101.37.158.170:16188/plat/api/querybalance';
+
+    const USER_ID= '100049';
+    const KEY = '774e06fa2b1949678c1ab84ff41de25f';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_xinbao.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 => [
+            50 => 1000050,
+            100 => 1000100,
+            200 => 1000200,
+        ],
+        mtopcard\ChinaUnicomCard => [
+            30  => 2000030,
+            50  => 2000050,
+            100 => 2000100,
+            200 => 2000200,
+        ],
+        mtopcard\ChinaTelecomCard => [
+        ],
+    ];
+}

BIN
helper/refill/api/yl/xingchuang_fs/20240320_dx_yd_supplement.png


+ 20 - 1
helper/refill/api/yl/xingchuang_fs/API.MD

@@ -64,4 +64,23 @@
 
   河南移动200元  1410200
   河南移动100元  1410100
-  河南移动50元   1410050
+  河南移动50元   1410050
+### 2024.3.20 add
+- 电信
+  甘肃电信30元    3620030
+  甘肃电信50元    3620050
+  甘肃电信100元     3620100
+  甘肃电信200元     3620200
+
+- 移动分省
+  青海移动200元    1630200
+  青海移动100元    1630100
+  青海移动50元      1630050
+
+  重庆移动200元    1500200
+  重庆移动100元    1500100
+  重庆移动50元      1500050
+
+  湖北移动200元     1420200
+  湖北移动100元     1420100
+  湖北移动50元       1420050

+ 29 - 0
helper/refill/api/yl/xingchuang_fs/config.php

@@ -135,6 +135,24 @@ class config
                 100 => 1410100,
                 200 => 1410050,
             ],
+            //青海
+            29 => [
+                50  => 1630050,
+                100 => 1630100,
+                200 => 1630200,
+            ],
+            //重庆
+            22 => [
+                50  => 1500050,
+                100 => 1500100,
+                200 => 1500200,
+            ],
+            //湖北
+            17 => [
+                50  => 1420050,
+                100 => 1420100,
+                200 => 1420200,
+            ],
         ],
         mtopcard\ChinaTelecomCard => [
             //福建
@@ -249,6 +267,13 @@ class config
                 100 => 3630100,
                 200 => 3630200,
             ],
+            //甘肃
+            28 => [
+                30  => 3620030,
+                50  => 3620050,
+                100 => 3620100,
+                200 => 3620200,
+            ],
 
         ],
     ];
@@ -274,6 +299,9 @@ class config
         "4-50-8" => 47.7, "4-100-8" => 95.4, "4-200-8" => 190.8, //黑龙江
         "4-50-19" => 47.7, "4-100-19" => 95.4, "4-200-19" => 190.8, //广东
         "4-50-16" => 47.7, "4-100-16" => 95.4, "4-200-16" => 190.8, //河南
+        "4-50-29" => 47.7, "4-100-29" => 95.4, "4-200-29" => 190.8, //青海
+        "4-50-22" => 47.7, "4-100-22" => 95.4, "4-200-22" => 190.8, //重庆
+        "4-50-17" => 47.7, "4-100-17" => 95.4, "4-200-17" => 190.8, //湖北
 
         //电信
         "6-30-13" => 28.26, "6-50-13" => 47.1, "6-100-13" => 94.2, "6-200-13" => 188.4, //福建
@@ -292,6 +320,7 @@ class config
         "6-30-2" => 27.96, "6-50-2" => 46.6, "6-100-2" => 93.2, "6-200-2" => 186.4, //天津
         "6-30-18" => 27.96, "6-50-18" => 46.6, "6-100-18" => 93.2, "6-200-18" => 186.4, //湖南
         "6-30-29" => 27.96, "6-50-29" => 46.6, "6-100-29" => 93.2, "6-200-29" => 186.4, //青海
+        "6-30-28" => 28.26, "6-50-28" => 47.1, "6-100-28" => 94.2, "6-200-28" => 188.4, //甘肃
     ];
 
 }

+ 1 - 1
helper/refill/order.php

@@ -367,7 +367,7 @@ class order
             $this->mProductCode = $params['product_code'];
             $this->mThirdPorductType = $params['third_product_type'];
             $this->mThirdCardType = $params['third_card_type'];
-            $this->mRegionNo = 0;
+            $this->mRegionNo = $params['province'];
             $this->mIsTransfer = false;
             $this->mCardState = 0;
             $this->mCardType = $card_type;

+ 4 - 0
mobile/callback/refill_dunhui.php

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

+ 4 - 0
mobile/callback/refill_dunhui_sec.php

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

+ 4 - 0
mobile/callback/refill_xinbao.php

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

+ 4 - 0
mobile/callback/refill_xinbao_sec.php

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

+ 4 - 0
mobile/callback/refill_xinbao_trd.php

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

+ 1 - 1
mobile/control/refill.php

@@ -109,7 +109,7 @@ class refillControl extends merchantControl
                 else {
                     $text = "中石油";
                 }
-                return self::outerr(207,"今日贵司{$amount}{$text}充值库存已经用完.");
+                return self::outerr(207,"今日贵司$amount {$text}充值库存已经用完.");
             }
         }
 

+ 29 - 0
test/TestRefill.php

@@ -6022,6 +6022,35 @@ class TestRefill extends TestCase
         $resp = $provider->balance();
     }
 
+    public function testxinbao()
+    {
+        $provider = $this->getProvider('xinbao');
+        $resp = $provider->balance();
+    }
+
+    public function testxinbao_sec()
+    {
+        $provider = $this->getProvider('xinbao_sec');
+        $resp = $provider->balance();
+    }
+
+    public function testxinbao_trd()
+    {
+        $provider = $this->getProvider('xinbao_trd');
+        $resp = $provider->balance();
+    }
+
+    public function testdunhui()
+    {
+        $provider = $this->getProvider('dunhui');
+        $resp = $provider->balance();
+    }
+
+    public function testdunhui_sec()
+    {
+        $provider = $this->getProvider('dunhui_sec');
+        $resp = $provider->balance();
+    }
 }