Prechádzať zdrojové kódy

Merge branch 'rtest' into raccount

stanley-king 3 rokov pred
rodič
commit
d6299a975c
40 zmenil súbory, kde vykonal 1944 pridanie a 58 odobranie
  1. 146 12
      data/config/win/refill.ini.php
  2. 146 12
      data/config/xyz/refill.ini.php
  3. 146 12
      data/config/xyzadm/refill.ini.php
  4. 50 0
      helper/refill/api/xyz/chizeng/RefillCallBack.php
  5. 137 0
      helper/refill/api/xyz/chizeng/RefillPhone.php
  6. 20 0
      helper/refill/api/xyz/chizeng/api.txt
  7. 26 0
      helper/refill/api/xyz/chizeng/config.php
  8. 47 0
      helper/refill/api/xyz/dingxin/RefillCallBack.php
  9. 147 0
      helper/refill/api/xyz/dingxin/RefillPhone.php
  10. 9 0
      helper/refill/api/xyz/dingxin/api18513846008.txt
  11. 24 0
      helper/refill/api/xyz/dingxin/config.php
  12. BIN
      helper/refill/api/xyz/dingxin/鼎信易缴费平台接口文档V4.6.docx
  13. 70 0
      helper/refill/api/xyz/jinxin/RefillCallBack.php
  14. 146 0
      helper/refill/api/xyz/jinxin/RefillPhone.php
  15. 8 0
      helper/refill/api/xyz/jinxin/account.txt
  16. 23 0
      helper/refill/api/xyz/jinxin/config.php
  17. BIN
      helper/refill/api/xyz/jinxin/充值-接口.docx
  18. 49 0
      helper/refill/api/xyz/kachong/RefillCallBack.php
  19. 137 0
      helper/refill/api/xyz/kachong/RefillPhone.php
  20. 8 0
      helper/refill/api/xyz/kachong/api.txt
  21. 24 0
      helper/refill/api/xyz/kachong/config.php
  22. 45 0
      helper/refill/api/xyz/pushang/RefillCallBack.php
  23. 123 0
      helper/refill/api/xyz/pushang/RefillPhone.php
  24. 19 0
      helper/refill/api/xyz/pushang/config.php
  25. 6 0
      helper/refill/api/xyz/pushang/对接文档.txt
  26. 2 2
      helper/refill/api/xyz/xianghongruifs/RefillCallBack.php
  27. 2 3
      helper/refill/api/xyz/xianghongruifs/config.php
  28. 8 4
      helper/refill/api/xyz/xingzy/RefillPhone.php
  29. 54 0
      helper/refill/api/xyz/xingzy_normal/RefillCallBack.php
  30. 137 0
      helper/refill/api/xyz/xingzy_normal/RefillPhone.php
  31. 30 0
      helper/refill/api/xyz/xingzy_normal/config.php
  32. 9 0
      helper/refill/api/xyz/xingzy_normal/产品编码.txt
  33. 19 0
      helper/refill/api/xyz/xingzy_normal/椰子账户信息.txt
  34. 4 0
      mobile/callback/refill_chizeng.php
  35. 7 0
      mobile/callback/refill_jinxin.php
  36. 4 0
      mobile/callback/refill_kachong.php
  37. 4 0
      mobile/callback/refill_pushang.php
  38. 4 0
      mobile/callback/refill_xianghongruifs.php
  39. 8 0
      mobile/callback/refill_xingzy_normal.php
  40. 96 13
      test/TestRefill.php

+ 146 - 12
data/config/win/refill.ini.php

@@ -2150,16 +2150,16 @@ $wenye_san_phone = ['name' => 'wenye_san', 'store_id' => 114, 'qualitys' => '4',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$xianghongruifs_phone = ['name' => 'xianghongruifs', 'store_id' => 116, 'qualitys' => '1',
+$xianghongruifs_phone = ['name' => 'xianghongruifs', 'store_id' => 135, 'qualitys' => '1',
     'amount' => [
-        10 => [['goods_id' => 6488, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile']],
-        20 => [['goods_id' => 6489, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile']],
-        30 => [['goods_id' => 6490, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']],
-        50 => [['goods_id' => 6491, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']],
-        100 => [['goods_id' => 6492, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']],
-        200 => [['goods_id' => 6493, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']],
-        300 => [['goods_id' => 6494, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile']],
-        500 => [['goods_id' => 6495, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile']]
+        10 => [['goods_id' => 7163, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        20 => [['goods_id' => 7164, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile']],
+        30 => [['goods_id' => 7165, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 7166, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 7167, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 7168, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']],
+        300 => [['goods_id' => 7169, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile']],
+        500 => [['goods_id' => 7170, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
@@ -2662,6 +2662,135 @@ $duojing_phone = ['name' => 'duojing', 'store_id' => 132, 'qualitys' => '2',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$chizeng_phone = ['name' => 'chizeng', 'store_id' => 133, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7147, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7147, 'price' => 9.45, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7147, 'price' => 9.49, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7148, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7148, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7148, 'price' => 18.98, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 7149, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7149, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7149, 'price' => 28.47, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7150, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7150, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7150, 'price' => 47.45, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7151, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7151, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7151, 'price' => 94.9, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7152, 'price' => 190.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7152, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7152, 'price' => 189.8, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+//        300 => [
+//            ['goods_id' => 7153, 'price' => 285.3, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7153, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7153, 'price' => 284.7, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7154, 'price' => 475.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7154, 'price' => 472.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7154, 'price' => 474.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$jinxin_phone = ['name' => 'jinxin', 'store_id' => 134, 'qualitys' => '2',
+    'amount' => [
+//        10 => [['goods_id' => 7155, 'price' => 9.92, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        20 => [['goods_id' => 7156, 'price' => 19.84, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7157, 'price' => 29.76, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7158, 'price' => 49.5, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7159, 'price' => 99, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7160, 'price' => 198, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        300 => [['goods_id' => 7161, 'price' => 297.6, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        500 => [['goods_id' => 7162, 'price' => 496, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$kachong_phone = ['name' => 'kachong', 'store_id' => 136, 'qualitys' => '3',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7171, 'price' => 9.91, 'quality' => 3, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7171, 'price' => 9.91, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7171, 'price' => 9.89, 'quality' => 3, 'card_type' => 'chinatelecom']
+//        ],
+        20 => [
+//            ['goods_id' => 7172, 'price' => 19.82, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7172, 'price' => 19.82, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7172, 'price' => 19.78, 'quality' => 3, 'card_type' => 'chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 7173, 'price' => 29.73, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7173, 'price' => 29.73, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7173, 'price' => 29.67, 'quality' => 3, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7174, 'price' => 49.55, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7174, 'price' => 49.55, 'quality' => 3, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7174, 'price' => 49.45, 'quality' => 3, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7175, 'price' => 99.1, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7175, 'price' => 99.1, 'quality' => 3, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7175, 'price' => 98.9, 'quality' => 3, 'card_type' => 'chinatelecom']
+        ],
+//        200 => [
+//            ['goods_id' => 7176, 'price' => 198.2, 'quality' => 3, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7176, 'price' => 198.2, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7176, 'price' => 197.8, 'quality' => 3, 'card_type' => 'chinatelecom']
+//        ],
+//        300 => [
+//            ['goods_id' => 7177, 'price' => 297.3, 'quality' => 3, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7177, 'price' => 297.3, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7177, 'price' => 296.7, 'quality' => 3, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7178, 'price' => 495.5, 'quality' => 3, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7178, 'price' => 495.5, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7178, 'price' => 494.5, 'quality' => 3, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$xingzy_normal_phone = ['name' => 'xingzy_normal', 'store_id' => 137, 'qualitys' => '1',
+    'amount' => [
+//        10 => [['goods_id' => 7179, 'price' => 9.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        20 => [['goods_id' => 7180, 'price' => 19.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7181, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7182, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7183, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7184, 'price' => 191, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        300 => [['goods_id' => 7185, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        500 => [['goods_id' => 7186, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$pushang_phone = ['name' => 'pushang', 'store_id' => 138, 'qualitys' => '2',
+    'amount' => [
+//        10 => [['goods_id' => 7187, 'price' => 10.03, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        20 => [['goods_id' => 7188, 'price' => 20.06, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7189, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7190, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7191, 'price' => 99.7, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7192, 'price' => 199.4, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 7193, 'price' => 299.1, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 7194, 'price' => 498.5, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -2745,7 +2874,7 @@ $phone_providers = [
     ['name' => 'wangliantx', 'cfg' => $wangliantx_phone],
     ['name' => 'zhuojian', 'cfg' => $zhuojian_phone],
     ['name' => 'wenye_san', 'cfg' => $wenye_san_phone],
-//    ['name' => 'xianghongruifs', 'cfg' => $xianghongruifs_phone]
+    ['name' => 'xianghongruifs', 'cfg' => $xianghongruifs_phone],
     ['name' => 'yilin', 'cfg' => $yilin_phone],
     ['name' => 'miaoxt_fs', 'cfg' => $miaoxt_fs_phone],
     ['name' => 'xianzhibb', 'cfg' => $xianzhibb_phone],
@@ -2761,7 +2890,12 @@ $phone_providers = [
     ['name' => 'dashang', 'cfg' => $dashang_phone],
     ['name' => 'yuanta', 'cfg' => $yuanta_phone],
     ['name' => 'menggu_hf', 'cfg' => $menggu_hf_phone],
-    ['name' => 'duojing', 'cfg' => $duojing_phone]
+    ['name' => 'duojing', 'cfg' => $duojing_phone],
+    ['name' => 'chizeng', 'cfg' => $chizeng_phone],
+    ['name' => 'jinxin', 'cfg' => $jinxin_phone],
+    ['name' => 'kachong', 'cfg' => $kachong_phone],
+    ['name' => 'xingzy_normal', 'cfg' => $xingzy_normal_phone],
+    ['name' => 'pushang', 'cfg' => $pushang_phone]
 ];
 $config['phone_providers'] = $phone_providers;
 
@@ -2787,7 +2921,7 @@ $santi = ['name' => 'santi', 'store_id' => 129,'qualitys' => '1',
 
 $third_providers = [
     ['name' => 'lingzhthird', 'cfg' => $lingzhthird],
-//    ['name' => 'jumithird', 'cfg' => $jumithird],
+    ['name' => 'jumithird', 'cfg' => $jumithird],
     ['name' => 'santi', 'cfg' => $santi]
 ];
 $config['third_providers'] = $third_providers;

+ 146 - 12
data/config/xyz/refill.ini.php

@@ -2150,16 +2150,16 @@ $wenye_san_phone = ['name' => 'wenye_san', 'store_id' => 114, 'qualitys' => '4',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$xianghongruifs_phone = ['name' => 'xianghongruifs', 'store_id' => 116, 'qualitys' => '1',
+$xianghongruifs_phone = ['name' => 'xianghongruifs', 'store_id' => 135, 'qualitys' => '1',
     'amount' => [
-        10 => [['goods_id' => 6488, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile']],
-        20 => [['goods_id' => 6489, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile']],
-        30 => [['goods_id' => 6490, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']],
-        50 => [['goods_id' => 6491, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']],
-        100 => [['goods_id' => 6492, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']],
-        200 => [['goods_id' => 6493, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']],
-        300 => [['goods_id' => 6494, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile']],
-        500 => [['goods_id' => 6495, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile']]
+        10 => [['goods_id' => 7163, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        20 => [['goods_id' => 7164, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile']],
+        30 => [['goods_id' => 7165, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 7166, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 7167, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 7168, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']],
+        300 => [['goods_id' => 7169, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile']],
+        500 => [['goods_id' => 7170, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
@@ -2662,6 +2662,135 @@ $duojing_phone = ['name' => 'duojing', 'store_id' => 132, 'qualitys' => '2',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$chizeng_phone = ['name' => 'chizeng', 'store_id' => 133, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7147, 'price' => 9.52, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7147, 'price' => 9.45, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7147, 'price' => 9.47, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7148, 'price' => 19.04, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7148, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7148, 'price' => 18.94, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 7149, 'price' => 28.56, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7149, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7149, 'price' => 28.41, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7150, 'price' => 47.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7150, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7150, 'price' => 47.35, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7151, 'price' => 95.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7151, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7151, 'price' => 94.7, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7152, 'price' => 190.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7152, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7152, 'price' => 189.4, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+//        300 => [
+//            ['goods_id' => 7153, 'price' => 285.3, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7153, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7153, 'price' => 284.7, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7154, 'price' => 475.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7154, 'price' => 472.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7154, 'price' => 474.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$jinxin_phone = ['name' => 'jinxin', 'store_id' => 134, 'qualitys' => '2',
+    'amount' => [
+//        10 => [['goods_id' => 7155, 'price' => 9.92, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        20 => [['goods_id' => 7156, 'price' => 19.84, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        30 => [['goods_id' => 7157, 'price' => 29.76, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7158, 'price' => 49.5, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7159, 'price' => 99, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7160, 'price' => 198, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 7161, 'price' => 297, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 7162, 'price' => 495, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$kachong_phone = ['name' => 'kachong', 'store_id' => 136, 'qualitys' => '3',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7171, 'price' => 9.91, 'quality' => 3, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7171, 'price' => 9.91, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7171, 'price' => 9.89, 'quality' => 3, 'card_type' => 'chinatelecom']
+//        ],
+        20 => [
+//            ['goods_id' => 7172, 'price' => 19.82, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7172, 'price' => 19.82, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7172, 'price' => 19.78, 'quality' => 3, 'card_type' => 'chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 7173, 'price' => 29.73, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7173, 'price' => 29.73, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7173, 'price' => 29.67, 'quality' => 3, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7174, 'price' => 49.55, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7174, 'price' => 49.55, 'quality' => 3, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7174, 'price' => 49.45, 'quality' => 3, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7175, 'price' => 99.1, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7175, 'price' => 99.1, 'quality' => 3, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7175, 'price' => 98.9, 'quality' => 3, 'card_type' => 'chinatelecom']
+        ],
+//        200 => [
+//            ['goods_id' => 7176, 'price' => 198.2, 'quality' => 3, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7176, 'price' => 198.2, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7176, 'price' => 197.8, 'quality' => 3, 'card_type' => 'chinatelecom']
+//        ],
+//        300 => [
+//            ['goods_id' => 7177, 'price' => 297.3, 'quality' => 3, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7177, 'price' => 297.3, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7177, 'price' => 296.7, 'quality' => 3, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7178, 'price' => 495.5, 'quality' => 3, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7178, 'price' => 495.5, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7178, 'price' => 494.5, 'quality' => 3, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$xingzy_normal_phone = ['name' => 'xingzy_normal', 'store_id' => 137, 'qualitys' => '1',
+    'amount' => [
+//        10 => [['goods_id' => 7179, 'price' => 9.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        20 => [['goods_id' => 7180, 'price' => 19.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7181, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7182, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7183, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7184, 'price' => 191, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        300 => [['goods_id' => 7185, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        500 => [['goods_id' => 7186, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$pushang_phone = ['name' => 'pushang', 'store_id' => 138, 'qualitys' => '2',
+    'amount' => [
+//        10 => [['goods_id' => 7187, 'price' => 10.03, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        20 => [['goods_id' => 7188, 'price' => 20.06, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7189, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7190, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7191, 'price' => 99.7, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7192, 'price' => 199.4, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 7193, 'price' => 299.1, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 7194, 'price' => 498.5, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -2745,7 +2874,7 @@ $phone_providers = [
     ['name' => 'wangliantx', 'cfg' => $wangliantx_phone],
     ['name' => 'zhuojian', 'cfg' => $zhuojian_phone],
     ['name' => 'wenye_san', 'cfg' => $wenye_san_phone],
-//    ['name' => 'xianghongruifs', 'cfg' => $xianghongruifs_phone]
+    ['name' => 'xianghongruifs', 'cfg' => $xianghongruifs_phone],
     ['name' => 'yilin', 'cfg' => $yilin_phone],
     ['name' => 'miaoxt_fs', 'cfg' => $miaoxt_fs_phone],
     ['name' => 'xianzhibb', 'cfg' => $xianzhibb_phone],
@@ -2761,7 +2890,12 @@ $phone_providers = [
     ['name' => 'dashang', 'cfg' => $dashang_phone],
     ['name' => 'yuanta', 'cfg' => $yuanta_phone],
     ['name' => 'menggu_hf', 'cfg' => $menggu_hf_phone],
-    ['name' => 'duojing', 'cfg' => $duojing_phone]
+    ['name' => 'duojing', 'cfg' => $duojing_phone],
+    ['name' => 'chizeng', 'cfg' => $chizeng_phone],
+    ['name' => 'jinxin', 'cfg' => $jinxin_phone],
+    ['name' => 'kachong', 'cfg' => $kachong_phone],
+    ['name' => 'xingzy_normal', 'cfg' => $xingzy_normal_phone],
+    ['name' => 'pushang', 'cfg' => $pushang_phone]
 ];
 $config['phone_providers'] = $phone_providers;
 
@@ -2787,7 +2921,7 @@ $santi = ['name' => 'santi', 'store_id' => 129,'qualitys' => '1',
 
 $third_providers = [
     ['name' => 'lingzhthird', 'cfg' => $lingzhthird],
-//    ['name' => 'jumithird', 'cfg' => $jumithird],
+    ['name' => 'jumithird', 'cfg' => $jumithird],
     ['name' => 'santi', 'cfg' => $santi]
 ];
 $config['third_providers'] = $third_providers;

+ 146 - 12
data/config/xyzadm/refill.ini.php

@@ -2150,16 +2150,16 @@ $wenye_san_phone = ['name' => 'wenye_san', 'store_id' => 114, 'qualitys' => '4',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$xianghongruifs_phone = ['name' => 'xianghongruifs', 'store_id' => 116, 'qualitys' => '1',
+$xianghongruifs_phone = ['name' => 'xianghongruifs', 'store_id' => 135, 'qualitys' => '1',
     'amount' => [
-        10 => [['goods_id' => 6488, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile']],
-        20 => [['goods_id' => 6489, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile']],
-        30 => [['goods_id' => 6490, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']],
-        50 => [['goods_id' => 6491, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']],
-        100 => [['goods_id' => 6492, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']],
-        200 => [['goods_id' => 6493, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']],
-        300 => [['goods_id' => 6494, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile']],
-        500 => [['goods_id' => 6495, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile']]
+        10 => [['goods_id' => 7163, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        20 => [['goods_id' => 7164, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile']],
+        30 => [['goods_id' => 7165, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 7166, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 7167, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 7168, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']],
+        300 => [['goods_id' => 7169, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile']],
+        500 => [['goods_id' => 7170, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
@@ -2662,6 +2662,135 @@ $duojing_phone = ['name' => 'duojing', 'store_id' => 132, 'qualitys' => '2',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$chizeng_phone = ['name' => 'chizeng', 'store_id' => 133, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7147, 'price' => 9.52, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7147, 'price' => 9.45, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7147, 'price' => 9.47, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7148, 'price' => 19.04, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7148, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7148, 'price' => 18.94, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 7149, 'price' => 28.56, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7149, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7149, 'price' => 28.41, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7150, 'price' => 47.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7150, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7150, 'price' => 47.35, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7151, 'price' => 95.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7151, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7151, 'price' => 94.7, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7152, 'price' => 190.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7152, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7152, 'price' => 189.4, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+//        300 => [
+//            ['goods_id' => 7153, 'price' => 285.3, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7153, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7153, 'price' => 284.7, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7154, 'price' => 475.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7154, 'price' => 472.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7154, 'price' => 474.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$jinxin_phone = ['name' => 'jinxin', 'store_id' => 134, 'qualitys' => '2',
+    'amount' => [
+//        10 => [['goods_id' => 7155, 'price' => 9.92, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        20 => [['goods_id' => 7156, 'price' => 19.84, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        30 => [['goods_id' => 7157, 'price' => 29.76, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7158, 'price' => 49.5, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7159, 'price' => 99, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7160, 'price' => 198, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 7161, 'price' => 297, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 7162, 'price' => 495, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$kachong_phone = ['name' => 'kachong', 'store_id' => 136, 'qualitys' => '3',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7171, 'price' => 9.91, 'quality' => 3, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7171, 'price' => 9.91, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7171, 'price' => 9.89, 'quality' => 3, 'card_type' => 'chinatelecom']
+//        ],
+        20 => [
+//            ['goods_id' => 7172, 'price' => 19.82, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7172, 'price' => 19.82, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7172, 'price' => 19.78, 'quality' => 3, 'card_type' => 'chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 7173, 'price' => 29.73, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7173, 'price' => 29.73, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7173, 'price' => 29.67, 'quality' => 3, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7174, 'price' => 49.55, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7174, 'price' => 49.55, 'quality' => 3, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7174, 'price' => 49.45, 'quality' => 3, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7175, 'price' => 99.1, 'quality' => 3, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7175, 'price' => 99.1, 'quality' => 3, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7175, 'price' => 98.9, 'quality' => 3, 'card_type' => 'chinatelecom']
+        ],
+//        200 => [
+//            ['goods_id' => 7176, 'price' => 198.2, 'quality' => 3, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7176, 'price' => 198.2, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7176, 'price' => 197.8, 'quality' => 3, 'card_type' => 'chinatelecom']
+//        ],
+//        300 => [
+//            ['goods_id' => 7177, 'price' => 297.3, 'quality' => 3, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7177, 'price' => 297.3, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7177, 'price' => 296.7, 'quality' => 3, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7178, 'price' => 495.5, 'quality' => 3, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7178, 'price' => 495.5, 'quality' => 3, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7178, 'price' => 494.5, 'quality' => 3, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$xingzy_normal_phone = ['name' => 'xingzy_normal', 'store_id' => 137, 'qualitys' => '1',
+    'amount' => [
+//        10 => [['goods_id' => 7179, 'price' => 9.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        20 => [['goods_id' => 7180, 'price' => 19.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7181, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7182, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7183, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7184, 'price' => 191, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        300 => [['goods_id' => 7185, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        500 => [['goods_id' => 7186, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$pushang_phone = ['name' => 'pushang', 'store_id' => 138, 'qualitys' => '2',
+    'amount' => [
+//        10 => [['goods_id' => 7187, 'price' => 10.03, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        20 => [['goods_id' => 7188, 'price' => 20.06, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7189, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7190, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7191, 'price' => 99.7, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7192, 'price' => 199.4, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 7193, 'price' => 299.1, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 7194, 'price' => 498.5, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -2745,7 +2874,7 @@ $phone_providers = [
     ['name' => 'wangliantx', 'cfg' => $wangliantx_phone],
     ['name' => 'zhuojian', 'cfg' => $zhuojian_phone],
     ['name' => 'wenye_san', 'cfg' => $wenye_san_phone],
-//    ['name' => 'xianghongruifs', 'cfg' => $xianghongruifs_phone]
+    ['name' => 'xianghongruifs', 'cfg' => $xianghongruifs_phone],
     ['name' => 'yilin', 'cfg' => $yilin_phone],
     ['name' => 'miaoxt_fs', 'cfg' => $miaoxt_fs_phone],
     ['name' => 'xianzhibb', 'cfg' => $xianzhibb_phone],
@@ -2761,7 +2890,12 @@ $phone_providers = [
     ['name' => 'dashang', 'cfg' => $dashang_phone],
     ['name' => 'yuanta', 'cfg' => $yuanta_phone],
     ['name' => 'menggu_hf', 'cfg' => $menggu_hf_phone],
-    ['name' => 'duojing', 'cfg' => $duojing_phone]
+    ['name' => 'duojing', 'cfg' => $duojing_phone],
+    ['name' => 'chizeng', 'cfg' => $chizeng_phone],
+    ['name' => 'jinxin', 'cfg' => $jinxin_phone],
+    ['name' => 'kachong', 'cfg' => $kachong_phone],
+    ['name' => 'xingzy_normal', 'cfg' => $xingzy_normal_phone],
+    ['name' => 'pushang', 'cfg' => $pushang_phone]
 ];
 $config['phone_providers'] = $phone_providers;
 
@@ -2787,7 +2921,7 @@ $santi = ['name' => 'santi', 'store_id' => 129,'qualitys' => '1',
 
 $third_providers = [
     ['name' => 'lingzhthird', 'cfg' => $lingzhthird],
-//    ['name' => 'jumithird', 'cfg' => $jumithird],
+    ['name' => 'jumithird', 'cfg' => $jumithird],
     ['name' => 'santi', 'cfg' => $santi]
 ];
 $config['third_providers'] = $third_providers;

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

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

+ 137 - 0
helper/refill/api/xyz/chizeng/RefillPhone.php

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

+ 20 - 0
helper/refill/api/xyz/chizeng/api.txt

@@ -0,0 +1,20 @@
+正式环境:
+
+话费下单地址:http://120.27.219.88:10186/plat/api/old/submitorder
+
+
+查询地址:http://120.27.219.88:10186/plat/api/old/queryorder
+
+
+查询余额地址:http://120.27.219.88:10186/plat/api/old/queryBalance
+
+
+
+ID:200017
+秘钥:dd514d9c1c954f2b90d7faf25e2a7747
+
+
+对接文档地址:https://docs.qq.com/doc/DWkV1VkxQVk13eEtQ
+
+账号:yezi
+密码: 123456

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

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

+ 47 - 0
helper/refill/api/xyz/dingxin/RefillCallBack.php

@@ -0,0 +1,47 @@
+<?php
+namespace refill\dingxin;
+
+require_once(BASE_HELPER_RAPI_PATH . '/dingxin/config.php');
+use refill;
+
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $sign = $this->sign($params);
+        if ($params['userkey'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "userid{$userid}pwd{$key}orderid{$params['orderid']}state{$params['state']}account{$params['account']}{$key}";
+        return strtoupper(md5($content));
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['state']);
+        $order_sn = $params['orderid'];
+        $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) {
+            return [$order_id, true, false,true];
+        }
+        elseif ($status === 2) {
+            return [$order_id, false, true,true];
+        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

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

@@ -0,0 +1,147 @@
+<?php
+declare(strict_types=0);
+
+namespace refill\dingxin;
+require_once(BASE_HELPER_RAPI_PATH . '/dingxin/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, int $card_type, string $order_sn)
+    {
+        $params['userid'] = config::USER_ID;
+        $params['pwd'] = config::PWD;
+        $params['orderid'] = $order_sn;
+        $params['face'] = $amount;
+        $params['account'] = $phone;
+        $params['amount'] = 1;
+        $params['operator'] = config::operator[$card_type];
+
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn);
+        $sign = $this->sign($params);
+        $params['userkey'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, 'GET', false, [], $net_errno);
+
+        if (empty($resp)) {
+            return [false, '网络错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = $this->xmlToArray($resp);
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            }
+
+            if ($resp['error'] === '0' && in_array($resp['state'], [0, 8])) {
+                return [true, $resp['Porderid'], false];
+            } elseif ($resp['error'] === '9999') {
+                $net_errno = "HTTP-{$resp['error']}";
+                return [false, $resp['error'], false];
+            } else {
+                return [false, $resp['error'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['userid'] = config::USER_ID;
+        $params['pwd'] = config::PWD;
+        $params['orderid'] = $refill_info['order_sn'];
+        $key = config::KEY;
+        $content = "userid{$params['userid']}pwd{$params['pwd']}orderid{$params['orderid']}{$key}";
+        $params['userkey'] = strtoupper(md5($content));
+
+        $resp = http_request(config::QUERY_URL, $params);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = $this->xmlToArray($resp);
+            if (empty($resp))
+            {
+                return [false, '网络错误'];
+            }
+            else
+            {
+                if($resp['error'] === '0')
+                {
+                    $status = intval($resp['state']);
+                    if ($status === 1) {
+                        $order_state = ORDER_STATE_SUCCESS;
+                    } elseif ($status === 2) {
+                        $order_state = ORDER_STATE_CANCEL;
+                    } elseif ($status === 0) {
+                        $order_state = ORDER_STATE_SEND;
+                    } else {
+                        return [false, $status];
+                    }
+                    return [true, $order_state];
+                }
+                elseif ($resp['error'] === '1007' && (time() - $refill_info['commit_time'] >= 120)) {
+                    return [true, ORDER_STATE_NOEXIST];
+                }
+                else {
+                    return [false, $resp['error']];
+                }
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['userid'] = config::USER_ID;
+        $params['pwd'] = config::PWD;
+        $key = config::KEY;
+        $body = "userid{$params['userid']}pwd{$params['pwd']}{$key}";
+        $params['userkey'] = strtoupper(md5($body));
+
+        $resp = http_request(config::BALANCE_URL, $params);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = $this->xmlToArray($resp);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            } elseif ($resp['error'] === '0') {
+                return [true, $resp['lastMoney']];
+            } else {
+                return [false, $resp['error']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $key = config::KEY;
+        $content = "userid{$params['userid']}pwd{$params['pwd']}orderid{$params['orderid']}face{$params['orderid']}account{$params['account']}amount{$params['amount']}{$key}";
+        return strtoupper(md5($content));
+    }
+
+    public function xmlToArray($xml)
+    {
+        return json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
+    }
+}

+ 9 - 0
helper/refill/api/xyz/dingxin/api18513846008.txt

@@ -0,0 +1,9 @@
+接口提交地址:http://api.ejiaofei.net:11140
+
+账户:18513846008
+pwd:ZyhaHyQspd68ndfbRfJH8errzaBmdMFm
+key:HPwK74Y4dhNRtktmQDZa7xj2twNTMkfx
+
+www.ejiaofei.cn
+18513846008
+yezi123456

+ 24 - 0
helper/refill/api/xyz/dingxin/config.php

@@ -0,0 +1,24 @@
+<?php
+
+
+namespace refill\dingxin;
+
+use mtopcard;
+class config
+{
+    //回调地址需配置
+    const ORDER_URL = 'http://api.ejiaofei.net:11140/chongzhi_jkorders.do';
+    const QUERY_URL= 'http://api.ejiaofei.net:11140/query_jkorders.do';
+    const BALANCE_URL = 'http://api.ejiaofei.net:11140/money_jkuser.do';
+
+    const USER_ID= '18513846008';
+    const PWD = 'ZyhaHyQspd68ndfbRfJH8errzaBmdMFm';
+    const KEY = 'HPwK74Y4dhNRtktmQDZa7xj2twNTMkfx';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_dingxin.php";
+
+    const operator = [
+        mtopcard\ChinaMobileCard  => 'mobile',
+        mtopcard\ChinaUnicomCard  => 'unicom',
+        mtopcard\ChinaTelecomCard => 'telecom'
+    ];
+}

BIN
helper/refill/api/xyz/dingxin/鼎信易缴费平台接口文档V4.6.docx


+ 70 - 0
helper/refill/api/xyz/jinxin/RefillCallBack.php

@@ -0,0 +1,70 @@
+<?php
+namespace refill\jinxin;
+
+require_once(BASE_HELPER_RAPI_PATH . '/jinxin/config.php');
+
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $input = $params;
+        unset($input['sign']);
+        unset($input['supplierNo']);
+        $sign = $this->sign($input);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        $content = '';
+        ksort($params);
+        foreach ($params as $key => $val){
+            if(false === $this->check_empty($val)) {
+                $content .= "{$key}={$val}&";
+            }
+        }
+        $key = config::KEY;
+        $content .= "appKey={$key}";
+
+        return strtoupper(md5($content));
+    }
+
+    protected function check_empty($value)
+    {
+        if (!isset($value))
+            return true;
+        if ($value === null)
+            return true;
+        if (trim($value) === "")
+            return true;
+
+        return false;
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['status']);
+        $order_sn = $params['requestId'];
+        $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) {
+            Model('refill_order')->edit($order_id, ['official_sn' =>$params['supplierNo'] ]);
+            return [$order_id, true, false,true];
+        }
+        elseif ($status === 2) {
+            return [$order_id, false, true,true];
+        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

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

@@ -0,0 +1,146 @@
+<?php
+
+namespace refill\jinxin;
+
+require_once(BASE_HELPER_RAPI_PATH . '/jinxin/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, int $card_type, string $order_sn)
+    {
+        $params['userId'] = config::USER_ID;
+        $params['timeStamp'] = date("Y-m-d H:i:s");
+        $params['rechargeNo'] = $phone;
+        $params['rechargeAmount'] = $amount;
+        $params['supplier'] = config::operator[$card_type];
+        $params['goodsType'] = 1;
+        $params['rechargeType'] = 11;
+        $params['requestId'] = $order_sn;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn);
+
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+        $params = json_encode($params);
+
+        $resp = http_post_data(config::ORDER_URL, $params , config::ExtHeaders, $net_errno);
+        if (empty($resp)) {
+            return [false, '网络错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            } elseif ($resp['code'] === '0000') {
+                return [true, $resp['data']['orderNo'], false];
+            } elseif ($resp['code'] === '9999') {
+                $net_errno = '9999';
+                return [false, $resp['msg'], false];
+            } else {
+                return [false, $resp['msg'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['userId'] = config::USER_ID;
+        $params['timeStamp'] = date("Y-m-d H:i:s");
+        $params['orderNo'] = '';
+        $params['requestId'] = $refill_info['order_sn'];
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::QUERY_URL, $params);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            }
+            elseif ($resp['code'] === '0000')
+            {
+                if ((time() - $refill_info['commit_time'] >= 180)) {
+                    $status = intval($resp['data']['status']);
+                    if ($status === 1) {
+                        Model('refill_order')->edit($refill_info['order_id'], ['official_sn' => $resp['data']['supplierNo']]);
+                        $order_state = ORDER_STATE_SUCCESS;
+                    } elseif ($status === 2) {
+                        $order_state = ORDER_STATE_CANCEL;
+                    } elseif (in_array($status, [0])) {
+                        $order_state = ORDER_STATE_SEND;
+                    } else {
+                        return [false, $status];
+                    }
+                    return [true, $order_state];
+                } else {
+                    return [false, '三分钟后查询'];
+                }
+            } elseif ($resp['code'] == '0005' && (time() - $refill_info['commit_time'] >= 180)) {
+                return [true, ORDER_STATE_NOEXIST];
+            } else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['userId'] = config::USER_ID;
+        $params['timeStamp'] = date("Y-m-d H:i:s");
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::BALANCE_URL, $params);
+        if(empty($resp)) {
+            return [false, '网络错误'];
+        }else{
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            }
+            elseif($resp['code'] == '0000')
+            {
+                return [true,$resp['data']['balance']];
+            }
+            else
+            {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $content = '';
+        ksort($params);
+        foreach ($params as $key => $val){
+            $content .= "{$key}={$val}&";
+        }
+        $key = config::KEY;
+        $content .= "appKey={$key}";
+
+        return strtoupper(md5($content));
+    }
+}

+ 8 - 0
helper/refill/api/xyz/jinxin/account.txt

@@ -0,0 +1,8 @@
+userId:137
+登录帐号:yezi123456
+登录密码:123456
+密钥:LRygb652kqpt2JoEe5KohdaWLf2YmPdn
+登录地址:http://39.106.26.90:8125/
+提交订单:http://39.106.26.90:8125/api/external/submitOrder
+订单查询:http://39.106.26.90:8125/api/external/queryOrder
+余额查询:http://39.106.26.90:8125/api/external/queryBalance

+ 23 - 0
helper/refill/api/xyz/jinxin/config.php

@@ -0,0 +1,23 @@
+<?php
+
+
+namespace refill\jinxin;
+
+use mtopcard;
+class config
+{
+    //回调地址需在上游配置
+    const ORDER_URL = 'http://39.106.26.90:8125/api/external/submitOrder';
+    const QUERY_URL= 'http://39.106.26.90:8125/api/external/queryOrder';
+    const BALANCE_URL= 'http://39.106.26.90:8125/api/external/queryBalance';
+
+    const USER_ID= '137';
+    const KEY = 'LRygb652kqpt2JoEe5KohdaWLf2YmPdn';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_jinxin.php";
+    const operator = [
+        mtopcard\ChinaMobileCard  => 1,
+        mtopcard\ChinaUnicomCard  => 2,
+        mtopcard\ChinaTelecomCard => 3
+    ];
+    const ExtHeaders = ['Content-Type: application/json'];
+}

BIN
helper/refill/api/xyz/jinxin/充值-接口.docx


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

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

+ 137 - 0
helper/refill/api/xyz/kachong/RefillPhone.php

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

+ 8 - 0
helper/refill/api/xyz/kachong/api.txt

@@ -0,0 +1,8 @@
+http://www.70chong.com/main.html     登录账号:18513846008  初始密码:123456  可以自行修改
+
+ID:200046   秘钥:595e5ea65062fd589b3a9ec7c23937fd
+
+下单地址:http://42.193.245.133:5001/plat/api/old/submitorder 
+查单地址:http://42.193.245.133:5001/plat/api/old/queryorder 
+余额地址:http://42.193.245.133:5001/plat/api/old/queryBalance 
+接口文档:https://docs.qq.com/doc/DZW5jTWdHZFVIYnZp

+ 24 - 0
helper/refill/api/xyz/kachong/config.php

@@ -0,0 +1,24 @@
+<?php
+namespace refill\kachong;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://42.193.245.133:5001/plat/api/old/submitorder';
+    const QUERY_URL= 'http://42.193.245.133:5001/plat/api/old/queryorder';
+    const BALANCE_URL= 'http://42.193.245.133:5001/plat/api/old/queryBalance';
+
+    const USER_ID= '200046';
+    const KEY = '595e5ea65062fd589b3a9ec7c23937fd';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_kachong.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,1023,1024,1025,1026,2001,2002,2003,2020,2021,2025,2026,1006,2030,3003
+    ];
+}

+ 45 - 0
helper/refill/api/xyz/pushang/RefillCallBack.php

@@ -0,0 +1,45 @@
+<?php
+namespace refill\pushang;
+
+require_once(BASE_HELPER_RAPI_PATH . '/pushang/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)
+    {
+        $content = $params['extOrderId'] . $params['orderId'] . $params['state'] . config::KEY;
+        return md5($content);
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['state']);
+        $order_sn = $params['extOrderId'];
+        $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 === 4) {
+            Model('refill_order')->edit($order_id, ['official_sn' => $params['exchangeTraded'], 'ch_trade_no' => $params['orderId']]);
+            return [$order_id, true, false, true];
+        } elseif ($status === 5) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 123 - 0
helper/refill/api/xyz/pushang/RefillPhone.php

@@ -0,0 +1,123 @@
+<?php
+
+namespace refill\pushang;
+
+require_once(BASE_HELPER_RAPI_PATH . '/pushang/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $card_no, int $card_type, string $order_sn, int $amount)
+    {
+        $params['merchantId'] = config::MCH_ID;
+        $params['amt'] = $amount;
+        $params['phone'] = $card_no;
+        $params['extOrderId'] = $order_sn;
+        $params['operator'] = config::operator[$card_type];
+        $params['notifyUrl'] = config::NOTIFY_URL;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $params = $this->req_params($card_no, $card_type, $params['order_sn'], $amount);
+        $sign = $this->sign($params);
+        $params['md5'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, 'POST', false, [], $net_errno);
+        if (empty($resp)) {
+            return [false, '系统错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+
+            $resp = json_decode($resp ,true);
+            if (empty($resp)) {
+                return [false, '系统错误', true];
+            } elseif ($resp['code'] == 0) {
+                return [true, '', false];
+            } else {
+                return [false, $resp['msg'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['merchantId'] = config::MCH_ID;
+        $params['extOrderId'] = $refill_info['order_sn'];
+
+        $content = $params['extOrderId'] . $params['merchantId'] . config::KEY;
+        $params['sign'] = md5($content);
+
+        $resp = http_request(config::QUERY_URL, $params, 'POST');
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp))
+            {
+                return [false, '系统错误'];
+            }
+            elseif ($resp['code'] == 0)
+            {
+                $status = intval($resp['data']);
+                if ($status === 4) {
+                    Model('refill_order')->edit($refill_info['order_id'], ['official_sn' => $resp['ext']['exchangeTraded']]);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($status === 5) {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif ($status === 3) {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $resp['msg']];
+                }
+
+                return [true, $order_state];
+            }
+            else
+            {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['merchantId'] = config::MCH_ID;
+        $content = $params['merchantId'] . config::KEY;
+        $params['sign'] = md5($content);
+
+        $resp = http_request(config::BALANCE_URL, $params, 'POST');
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        } else {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if ($resp['code'] == 0) {
+                return [true, $resp['ext']['balance']];
+            } else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $content = $params['amt'] . $params['extOrderId'] . $params['merchantId'] . $params['notifyUrl'] . $params['phone'];
+        $content .= config::KEY;
+        return md5($content);
+    }
+}

+ 19 - 0
helper/refill/api/xyz/pushang/config.php

@@ -0,0 +1,19 @@
+<?php
+namespace refill\pushang;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://123.60.45.58:8080/api/huafei/makeOrder';
+    const QUERY_URL = 'http://123.60.45.58:8080/api/queryOrder';
+    const BALANCE_URL = 'http://123.60.45.58:8080/api/queryBalance';
+
+    const MCH_ID = 'M00050';
+    const KEY = 'mg035JzCXuno967P54TbEbyC15kCtPwA';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_pushang.php";
+    const operator = [
+        mtopcard\ChinaMobileCard => '移动',
+        mtopcard\ChinaUnicomCard => '联通',
+        mtopcard\ChinaTelecomCard => '电信'
+    ];
+}

+ 6 - 0
helper/refill/api/xyz/pushang/对接文档.txt

@@ -0,0 +1,6 @@
+商户号:M00050
+登陆密码:NJPS1135
+MD5KEY :mg035JzCXuno967P54TbEbyC15kCtPwA
+后台地址 http://123.60.22.32/#/login
+接口文档地址 :http://123.60.45.58:8080/doc/doc.html
+生产服务器地址:  http://123.60.45.58:8080/api/

+ 2 - 2
helper/refill/api/xyz/xianghongruifs/RefillCallBack.php

@@ -1,7 +1,7 @@
 <?php
-namespace refill\xianghongrui;
+namespace refill\xianghongruifs;
 
-require_once(BASE_HELPER_RAPI_PATH . '/xianghongrui/config.php');
+require_once(BASE_HELPER_RAPI_PATH . '/xianghongruifs/config.php');
 
 use refill;
 

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

@@ -7,14 +7,13 @@ use mtopcard;
 class config
 {
     //95
-    const ORDER_URL = 'http://123.60.50.146:9086/onlinepay.do ';
+    const ORDER_URL = 'http://123.60.50.146:9086/onlinepay.do';
     const QUERY_URL= 'http://123.60.50.146:9086/searchpay.do';
     const BALANCE_UTL = 'http://123.60.50.146:9086/searchbalance.do';
 
     const USER_ID= '10002524';
     const KEY = 'PsZr3ZkSmXRnRdKj42c8QSmXk4mW5ZTH';
-//    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_xianghongruifs.php";
-    const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.php";
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_xianghongruifs.php";
     const operator = [
         mtopcard\ChinaMobileCard  => 'yd',
         mtopcard\ChinaUnicomCard  => 'lt',

+ 8 - 4
helper/refill/api/xyz/xingzy/RefillPhone.php

@@ -48,7 +48,12 @@ class RefillPhone extends refill\IRefillPhone
                 return [false, '系统错误', true];
             } elseif ($resp['code'] == 1) {
                 return [true, $resp['data']['orderid'], false];
+            } elseif (in_array($resp['code'], [0,3])) {
+                $net_errno = "HTTP-{$resp['code']}";
+                return [false, $resp['msg'], false];
             } else {
+                $err = 998;
+                $net_errno = "HTTP-{$err}";
                 return [false, $resp['msg'], false];
             }
         }
@@ -56,9 +61,9 @@ class RefillPhone extends refill\IRefillPhone
 
     public function query($refill_info)
     {
-        $params['out_trade_no'] = $refill_info['order_sn'];
-        $params['orderid'] = $refill_info['ch_trade_no'];
         $params['access_key'] = config::ACCESS_KEY;
+        $params['orderid'] = $refill_info['ch_trade_no'];
+        $params['out_trade_no'] = $refill_info['order_sn'];
         $params['timestamp'] = time();
         $params['sign'] = $this->sign($params);
         $params = json_encode($params);
@@ -79,8 +84,7 @@ class RefillPhone extends refill\IRefillPhone
             {
                 $status = intval($resp['code']);
                 if ($status === 2) {
-                    $updata['official_sn'] = $resp['data']['official_id'];
-                    Model('refill_order')->edit($refill_info['order_id'], $updata);
+                    Model('refill_order')->edit($refill_info['order_id'], ['official_sn' => $resp['data']['official_id']]);
                     $order_state = ORDER_STATE_SUCCESS;
                 } elseif ($status === 3) {
                     $order_state = ORDER_STATE_CANCEL;

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

@@ -0,0 +1,54 @@
+<?php
+namespace refill\xingzy_normal;
+
+require_once(BASE_HELPER_RAPI_PATH . '/xingzy_normal/config.php');
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $input = $params;
+        unset($input['sign']);
+        unset($input['data']);
+        $sign = $this->sign($input);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        ksort($params);
+        $body = "";
+        foreach ($params as $k => $v) {
+            $body .= "{$k}{$v}";
+        }
+        return base64_encode(hash_hmac("sha1", $body, config::ACCESS_SECRET, true));
+    }
+
+    //[$order_id, $success, $can_try, $need_handle]
+    public function notify($params)
+    {
+        $status = intval($params['code']);
+        $order_sn = $params['out_trade_no'];
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false,false];
+        }
+        $order_id = $order_info['order_id'];
+
+        if ($status === 2) {
+            $data['official_sn'] = strtolower($params['data']['official_id']) == 'null' ? '' : $params['data']['official_id'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false,true];
+        }
+        elseif ($status === 3) {
+            return [$order_id, false, true,true];
+        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

+ 137 - 0
helper/refill/api/xyz/xingzy_normal/RefillPhone.php

@@ -0,0 +1,137 @@
+<?php
+
+namespace refill\xingzy_normal;
+
+require_once(BASE_HELPER_RAPI_PATH . '/xingzy_normal/config.php');
+use refill;
+use Log;
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $card_type, int $amount, string $order_sn)
+    {
+        $params['phone'] = $phone;
+        $params['access_key'] = config::ACCESS_KEY;
+        $params['par_value'] = $amount;
+        $params['code'] = config::product_code[$card_type][$amount];
+        $params['producttype'] = 1;
+        $params['out_trade_no'] = $order_sn;
+        $params['timestamp'] = time();
+
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $params = $this->req_params($card_no, $card_type, $amount, $params['order_sn']);
+        if(empty($params['code'])) {
+            return [false, '商品编号获取失败', false];
+        }
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+        $params['notify_url'] = config::NOTIFY_URL;
+        $params = json_encode($params);
+
+        $resp = http_post_data(config::ORDER_URL, $params , config::ExtHeaders, $net_errno);
+
+        if (empty($resp)) {
+            return [false, '系统错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误', true];
+            } elseif ($resp['code'] == 1) {
+                return [true, $resp['data']['orderid'], false];
+            } elseif (in_array($resp['code'], [0,3])) {
+                $net_errno = "HTTP-{$resp['code']}";
+                return [false, $resp['msg'], false];
+            } else {
+                $err = 998;
+                $net_errno = "HTTP-{$err}";
+                return [false, $resp['msg'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['access_key'] = config::ACCESS_KEY;
+        $params['orderid'] = $refill_info['ch_trade_no'];
+        $params['out_trade_no'] = $refill_info['order_sn'];
+        $params['timestamp'] = time();
+        $params['sign'] = $this->sign($params);
+        $params = json_encode($params);
+
+        $resp = http_post_data(config::QUERY_URL, $params , config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            }
+            else
+            {
+                $status = intval($resp['code']);
+                if ($status === 2) {
+                    Model('refill_order')->edit($refill_info['order_id'], ['official_sn' => $resp['data']['official_id']]);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($status === 3) {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif ($status === 1) {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $resp['msg']];
+                }
+                return [true, $order_state];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['access_key'] = config::ACCESS_KEY;
+        $params['timestamp'] = time();
+        $params['sign'] = $this->sign($params);
+        $params = json_encode($params);
+
+        $resp = http_post_data(config::BALANCE_URL, $params , 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['code'] == 1) {
+                return [true, $resp['balance']];
+            } else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        ksort($params);
+        $body = "";
+        foreach ($params as $k => $v) {
+            $body .= "{$k}{$v}";
+        }
+        return base64_encode(hash_hmac("sha1", $body, config::ACCESS_SECRET, true));
+    }
+}

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

@@ -0,0 +1,30 @@
+<?php
+namespace refill\xingzy_normal;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://39.103.236.218:8081/order/insert';
+    const QUERY_URL = 'http://39.103.236.218:8071/order/query';
+    const BALANCE_URL = 'http://39.103.236.218:8071/member/account';
+
+    const ACCESS_KEY = '211394711';
+    const ACCESS_SECRET = 'KqatYI5nIESBhW22my0TNg==';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_xingzy_normal.php";
+    const ExtHeaders = ['Content-Type: application/json; charset=utf-8'];
+
+    const product_code = [
+        mtopcard\ChinaUnicomCard => [
+            30 => 'SKU100081',
+            50 => 'SKU100082',
+            100 => 'SKU100083',
+            200 => 'SKU100084'
+        ],
+        mtopcard\ChinaTelecomCard => [
+            30 => 'SKU100073',
+            50 => 'SKU100074',
+            100 => 'SKU100075',
+            200 => 'SKU100076'
+        ],
+    ];
+}

+ 9 - 0
helper/refill/api/xyz/xingzy_normal/产品编码.txt

@@ -0,0 +1,9 @@
+全国电信30元   	SKU100073
+全国电信50元            SKU100074
+全国电信100元          SKU100075
+全国电信200元          SKU100076
+
+全国联通30元            SKU100081
+全国联通50元            SKU100082
+全国联通100元          SKU100083
+全国联通200元          SKU100084

+ 19 - 0
helper/refill/api/xyz/xingzy_normal/椰子账户信息.txt

@@ -0,0 +1,19 @@
+接口开发文档:https://www.showdoc.cc/826025946776812?page_id=4511307456216019
+
+会员查询端:http://39.103.236.218:9022
+生产地址:
+收单:http://39.103.236.218:8081/order/insert
+查单:http://39.103.236.218:8071/order/query
+余额查询:http://39.103.236.218:8071/member/account
+
+测试账号:211394704 密钥:sBHF4qj71kG3R0s+/KtJKA==   
+测试产品编码:SKU100070 面值:10
+
+
+
+正式账号:
+
+前台登录名:18500608333
+前台登陆密码:295339
+access_key:211394711	
+accessSecret:KqatYI5nIESBhW22my0TNg==

+ 4 - 0
mobile/callback/refill_chizeng.php

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

+ 7 - 0
mobile/callback/refill_jinxin.php

@@ -0,0 +1,7 @@
+<?php
+
+$content = $_SERVER['post_content'];
+$inputs = json_decode($content,true) ?? [];
+refill\util::push_notify('jinxin',$inputs);
+
+echo ('OK');

+ 4 - 0
mobile/callback/refill_kachong.php

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

+ 4 - 0
mobile/callback/refill_pushang.php

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

+ 4 - 0
mobile/callback/refill_xianghongruifs.php

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

+ 8 - 0
mobile/callback/refill_xingzy_normal.php

@@ -0,0 +1,8 @@
+<?php
+$content = $_SERVER['post_content'];
+$input = json_decode($content,true) ?? [];
+refill\util::push_notify('xingzy_normal',$input);
+
+$response = ["code" => "0"];
+$body = json_encode($response);
+echo($body);

+ 96 - 13
test/TestRefill.php

@@ -806,11 +806,18 @@ class TestRefill extends TestCase
 
     public function testXianghongruifs()
     {
-        $providers = $this->getProvider('xianghongruifs');
-        $resp = $providers->add(18500608333, 5, 50, [
-            'order_sn' => $this->make_sn()
-        ]);
-//        $resp = $providers->query(['order_sn' => '87231630026579229295']);
+//        $providers = $this->getProvider('xianghongruifs');
+//        $resp = $providers->balance();
+//        $resp = $providers->add(15252490862, 4, 30, [
+//            'order_sn' => $this->make_sn()
+//        ]);
+//        $resp = $providers->query(['order_sn' => '70881632644084577858']);
+
+        $body = '{"orderid":"AAO21092616144271467","sporderid":"70881632644084577858","userid":"10002524","merchantsubmittime":"20210926161610","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.5","sign":"343C28C4EB13F68E2EE251FA0F2A8262"}';
+        $params = json_decode($body, true);
+        $providers = $this->getProvider('xianghongruifs', 'RefillCallBack');
+        $ret = $providers->verify($params);
+        $resp = $providers->notify($params);
     }
 
     public function testYilin()
@@ -1082,6 +1089,82 @@ class TestRefill extends TestCase
 //        $resp = $providers->notify($params);
     }
 
+    public function testChizeng()
+    {
+//        $providers = $this->getProvider('chizeng');
+//        $resp = $providers->balance();
+//        $resp = $providers->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '70391632388843650753']);
+
+        $body = '{"szOrderId":"70391632388843650753","fSalePrice":"28.35","szAgentId":"200017","nFlag":"3","szVerifyString":"784d7c138783265d4f64b943701712ff","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
+        $params = json_decode($body, true);
+        $providers = $this->getProvider('chizeng','RefillCallBack');
+        $ret = $providers->verify($params);
+        $resp = $providers->notify($params);
+    }
+
+    public function testJinxin()
+    {
+//        $providers = $this->getProvider('jinxin');
+//        $resp = $providers->balance();
+//        $resp = $providers->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '83481632465671278322']);
+
+        $body = '{"orderNo":"210924140000185","requestId":"83481632465671278322","sign":"80184350EC5C60445A50C9450D6CFB28","status":1,"supplierNo":"110103353192109241442090289402","timeStamp":"2021-09-24 14:43:07"}';
+        $params = json_decode($body, true);
+        $providers = $this->getProvider('jinxin','RefillCallBack');
+        $ret = $providers->verify($params);
+        $resp = $providers->notify($params);
+    }
+
+    public function testKachong()
+    {
+//        $providers = $this->getProvider('kachong');
+//        $resp = $providers->balance();
+//        $resp = $providers->add(18500608333, 5, 20, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '30691632889605245135']);
+
+        $body = '{"szAgentId":"200046","szOrderId":"30691632889605245135","szPhoneNum":"18500608333","nDemo":"20","fSalePrice":"19.82","nFlag":"2","szVerifyString":"dbac0df5e9ff2b067f74850f0cf55f3c","szRtnMsg":"982100337029603"}';
+        $params = json_decode($body, true);
+        $providers = $this->getProvider('kachong','RefillCallBack');
+        $ret = $providers->verify($params);
+        $resp = $providers->notify($params);
+    }
+
+    public function testXingzyNormal()
+    {
+//        $providers = $this->getProvider('xingzy_normal');
+//        $resp = $providers->balance();
+//        $resp = $providers->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '62881632898853651364']);
+
+        $body = '{"access_key":"211394711","code":3,"data":{"sellprice":28.65,"phone":"18500608333","pass":null,"official_id":null,"official_ch":null},"orderid":210929150115656000,"out_trade_no":"62881632898853651364","sign":"qIkEYEougSzg3EImlHTJKBHv4OQ=","timestamp":1632898943485}';
+        $params = json_decode($body, true);
+        $providers = $this->getProvider('xingzy_normal','RefillCallBack');
+        $ret = $providers->verify($params);
+        $resp = $providers->notify($params);
+    }
+
+    public function testDingxin()
+    {
+        $providers = $this->getProvider('dingxin');
+        $resp = $providers->balance();
+    }
+
+    public function testPushang()
+    {
+        $providers = $this->getProvider('pushang');
+//        $resp = $providers->balance();
+//        $resp = $providers->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
+        $resp = $providers->query(['order_sn' => '23391632986567769626']);
+
+//        $body = '{"msg":"\u8d26\u52a1\u6263\u6b3e\u5931\u8d25","extOrderId":"22081632982700152800","orderId":"R2021093014240000154555","salePrice":"30.0900","sign":"b0fe238f16e516316729589d42ab97b1","state":"5","exchangeTraded":""}';
+//        $params = json_decode($body, true);
+//        $providers = $this->getProvider('pushang','RefillCallBack');
+//        $ret = $providers->verify($params);
+//        $resp = $providers->notify($params);
+    }
+
     public function testAmingjd()
     {
 //        $providers = new refill\amingjd\RefillPhone([]);
@@ -2065,14 +2148,14 @@ class TestRefill extends TestCase
 
     public function testCtSign()
     {
-        $params['amount'] = '10.00';
-        $params['message'] = '余额不足支付订单';
-        $params['cardno'] = 18345531094;
-        $params['mchid'] = 10197;
-        $params['trade_no'] = '2068550683809271439468';
-        $params['state'] = 'CANCEL';
-        $params['order_sn'] = '20210901110059907C414UF7GCIG9491';
-        $sign = $this->md5_sign($params,'bac87b788087457e92a5319413c603a3');
+        $params['act'] = 'refill';
+        $params['op'] = 'add';
+        $params['mchid'] = 10221;
+        $params['cardno'] = '17610802062';
+        $params['amount'] = 30;
+        $params['order_sn'] = '20210926154819606056656';
+        $params['notifyurl'] = 'http://117.186.248.196:88/Asyn/notifyCall/367EA7';
+        $sign = $this->md5_sign($params,'E019D21A1E6611ECA4FD00163E179561');
     }
 
     private function md5_sign($params,$key = '')