xiaoyu 3 rokov pred
rodič
commit
ac6acf2ad5

+ 79 - 11
data/config/win/refill.ini.php

@@ -630,34 +630,34 @@ $zhongst_phone = ['name' => 'zhongst', 'store_id' => 39, 'qualitys' => '2',
 
         30 => [
             ['goods_id' => 6466, 'price' => 30.12, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6466, 'price' => 29.94, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6466, 'price' => 29.91, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6466, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         50 => [
-            ['goods_id' => 6467, 'price' => 50.1, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6467, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6467, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6467, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6467, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         100 => [
-            ['goods_id' => 6468, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6468, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6468, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6468, 'price' => 99.7, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6468, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6469, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6469, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6469, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6469, 'price' => 199.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6469, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 6470, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6470, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6470, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6470, 'price' => 299.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6470, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
             ['goods_id' => 6471, 'price' => 501, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6471, 'price' => 499, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6471, 'price' => 498.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6471, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
@@ -2564,34 +2564,42 @@ $hangtong_phone = ['name' => 'hangtong', 'store_id' => 126,'qualitys' => '1',
 $dashang_phone = ['name' => 'dashang', 'store_id' => 127, 'qualitys' => '2',
     'amount' => [
         10 => [
+            ['goods_id' => 7108, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7108, 'price' => 10.08, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7108, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
+            ['goods_id' => 7109, 'price' => 20.52, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7109, 'price' => 20.16, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7109, 'price' => 20.32, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
+            ['goods_id' => 7110, 'price' => 30.36, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7110, 'price' => 30.24, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7110, 'price' => 30.66, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
+            ['goods_id' => 7111, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7111, 'price' => 49.875, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7111, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
+            ['goods_id' => 7112, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7112, 'price' => 99.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7112, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
+            ['goods_id' => 7113, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7113, 'price' => 199.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7113, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
+            ['goods_id' => 7114, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7114, 'price' => 299.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7114, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
+            ['goods_id' => 7115, 'price' => 502, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7115, 'price' => 498.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7115, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
@@ -2941,6 +2949,64 @@ $huafutongman_phone = ['name' => 'huafutongman', 'store_id' => 146,'qualitys' =>
     ],
     'refill_type' => 'api'];
 
+$feimingyu_phone = ['name' => 'feimingyu', 'store_id' => 147, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7259, 'price' => 9.52, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7259, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7259, 'price' => 9.47, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7260, 'price' => 19.04, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7260, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7260, 'price' => 18.94, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 7261, 'price' => 28.56, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7261, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7261, 'price' => 28.41, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7262, 'price' => 47.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7262, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7262, 'price' => 47.35, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7263, 'price' => 95.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7263, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7263, 'price' => 94.7, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7264, 'price' => 190.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7264, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7264, 'price' => 189.4, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+//        300 => [
+//            ['goods_id' => 7265, 'price' => 285.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7265, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7265, 'price' => 284.1, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7266, 'price' => 476, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7266, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7266, 'price' => 473.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$dashang_normal_phone = ['name' => 'dashang_normal', 'store_id' => 148, 'qualitys' => '1',
+    'amount' => [
+        10 => [['goods_id' => 7267, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 7268, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7269, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7270, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7271, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7272, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        300 => [['goods_id' => 7273, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        500 => [['goods_id' => 7274, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -3051,7 +3117,9 @@ $phone_providers = [
     ['name' => 'xiaoniu_hf', 'cfg' => $xiaoniu_hf_phone],
     ['name' => 'shuoruan', 'cfg' => $shuoruan_phone],
     ['name' => 'linzhu', 'cfg' => $linzhu_phone],
-    ['name' => 'huafutongman', 'cfg' => $huafutongman_phone]
+    ['name' => 'huafutongman', 'cfg' => $huafutongman_phone],
+    ['name' => 'feimingyu', 'cfg' => $feimingyu_phone],
+    ['name' => 'dashang_normal', 'cfg' => $dashang_normal_phone]
 ];
 $config['phone_providers'] = $phone_providers;
 

+ 79 - 11
data/config/xyz/refill.ini.php

@@ -630,34 +630,34 @@ $zhongst_phone = ['name' => 'zhongst', 'store_id' => 39, 'qualitys' => '2',
 
         30 => [
             ['goods_id' => 6466, 'price' => 30.12, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6466, 'price' => 29.94, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6466, 'price' => 29.91, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6466, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         50 => [
-            ['goods_id' => 6467, 'price' => 50.1, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6467, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6467, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6467, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6467, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         100 => [
-            ['goods_id' => 6468, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6468, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6468, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6468, 'price' => 99.7, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6468, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6469, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6469, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6469, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6469, 'price' => 199.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6469, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 6470, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6470, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6470, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6470, 'price' => 299.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6470, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
             ['goods_id' => 6471, 'price' => 501, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6471, 'price' => 499, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6471, 'price' => 498.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6471, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
@@ -2564,34 +2564,42 @@ $hangtong_phone = ['name' => 'hangtong', 'store_id' => 126,'qualitys' => '1',
 $dashang_phone = ['name' => 'dashang', 'store_id' => 127, 'qualitys' => '2',
     'amount' => [
         10 => [
+            ['goods_id' => 7108, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7108, 'price' => 10.08, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7108, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
+            ['goods_id' => 7109, 'price' => 20.52, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7109, 'price' => 20.16, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7109, 'price' => 20.32, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
+            ['goods_id' => 7110, 'price' => 30.36, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7110, 'price' => 30.24, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7110, 'price' => 30.66, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
+            ['goods_id' => 7111, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7111, 'price' => 49.875, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7111, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
+            ['goods_id' => 7112, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7112, 'price' => 99.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7112, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
+            ['goods_id' => 7113, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7113, 'price' => 199.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7113, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
+            ['goods_id' => 7114, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7114, 'price' => 299.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7114, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
+            ['goods_id' => 7115, 'price' => 502, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7115, 'price' => 498.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7115, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
@@ -2941,6 +2949,64 @@ $huafutongman_phone = ['name' => 'huafutongman', 'store_id' => 146,'qualitys' =>
     ],
     'refill_type' => 'api'];
 
+$feimingyu_phone = ['name' => 'feimingyu', 'store_id' => 147, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7259, 'price' => 9.52, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7259, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7259, 'price' => 9.47, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7260, 'price' => 19.04, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7260, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7260, 'price' => 18.94, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 7261, 'price' => 28.56, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7261, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7261, 'price' => 28.41, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7262, 'price' => 47.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7262, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7262, 'price' => 47.35, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7263, 'price' => 95.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7263, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7263, 'price' => 94.7, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7264, 'price' => 190.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7264, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7264, 'price' => 189.4, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+//        300 => [
+//            ['goods_id' => 7265, 'price' => 285.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7265, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7265, 'price' => 284.1, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7266, 'price' => 476, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7266, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7266, 'price' => 473.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$dashang_normal_phone = ['name' => 'dashang_normal', 'store_id' => 148, 'qualitys' => '1',
+    'amount' => [
+        10 => [['goods_id' => 7267, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 7268, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7269, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7270, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7271, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7272, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        300 => [['goods_id' => 7273, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        500 => [['goods_id' => 7274, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -3051,7 +3117,9 @@ $phone_providers = [
     ['name' => 'xiaoniu_hf', 'cfg' => $xiaoniu_hf_phone],
     ['name' => 'shuoruan', 'cfg' => $shuoruan_phone],
     ['name' => 'linzhu', 'cfg' => $linzhu_phone],
-    ['name' => 'huafutongman', 'cfg' => $huafutongman_phone]
+    ['name' => 'huafutongman', 'cfg' => $huafutongman_phone],
+    ['name' => 'feimingyu', 'cfg' => $feimingyu_phone],
+    ['name' => 'dashang_normal', 'cfg' => $dashang_normal_phone]
 ];
 $config['phone_providers'] = $phone_providers;
 

+ 79 - 11
data/config/xyzadm/refill.ini.php

@@ -630,34 +630,34 @@ $zhongst_phone = ['name' => 'zhongst', 'store_id' => 39, 'qualitys' => '2',
 
         30 => [
             ['goods_id' => 6466, 'price' => 30.12, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6466, 'price' => 29.94, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6466, 'price' => 29.91, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6466, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         50 => [
-            ['goods_id' => 6467, 'price' => 50.1, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6467, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6467, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6467, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6467, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
 
         100 => [
-            ['goods_id' => 6468, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6468, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6468, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6468, 'price' => 99.7, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6468, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6469, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6469, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6469, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6469, 'price' => 199.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6469, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 6470, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6470, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6470, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6470, 'price' => 299.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6470, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
             ['goods_id' => 6471, 'price' => 501, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6471, 'price' => 499, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6471, 'price' => 498.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 6471, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
@@ -2564,34 +2564,42 @@ $hangtong_phone = ['name' => 'hangtong', 'store_id' => 126,'qualitys' => '1',
 $dashang_phone = ['name' => 'dashang', 'store_id' => 127, 'qualitys' => '2',
     'amount' => [
         10 => [
+            ['goods_id' => 7108, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7108, 'price' => 10.08, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7108, 'price' => 10.26, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
+            ['goods_id' => 7109, 'price' => 20.52, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7109, 'price' => 20.16, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7109, 'price' => 20.32, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
+            ['goods_id' => 7110, 'price' => 30.36, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7110, 'price' => 30.24, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7110, 'price' => 30.66, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
+            ['goods_id' => 7111, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7111, 'price' => 49.875, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7111, 'price' => 49.9, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
+            ['goods_id' => 7112, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7112, 'price' => 99.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7112, 'price' => 99.8, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
+            ['goods_id' => 7113, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7113, 'price' => 199.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7113, 'price' => 199.6, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
+            ['goods_id' => 7114, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7114, 'price' => 299.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7114, 'price' => 299.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
+            ['goods_id' => 7115, 'price' => 502, 'quality' => 2, 'card_type' => 'chinamobile'],
             ['goods_id' => 7115, 'price' => 498.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7115, 'price' => 499, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
@@ -2941,6 +2949,64 @@ $huafutongman_phone = ['name' => 'huafutongman', 'store_id' => 146,'qualitys' =>
     ],
     'refill_type' => 'api'];
 
+$feimingyu_phone = ['name' => 'feimingyu', 'store_id' => 147, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7259, 'price' => 9.52, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7259, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7259, 'price' => 9.47, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7260, 'price' => 19.04, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7260, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7260, 'price' => 18.94, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 7261, 'price' => 28.56, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7261, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7261, 'price' => 28.41, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7262, 'price' => 47.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7262, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7262, 'price' => 47.35, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7263, 'price' => 95.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7263, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7263, 'price' => 94.7, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7264, 'price' => 190.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7264, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7264, 'price' => 189.4, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+//        300 => [
+//            ['goods_id' => 7265, 'price' => 285.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7265, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7265, 'price' => 284.1, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7266, 'price' => 476, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7266, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7266, 'price' => 473.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$dashang_normal_phone = ['name' => 'dashang_normal', 'store_id' => 148, 'qualitys' => '1',
+    'amount' => [
+        10 => [['goods_id' => 7267, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 7268, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 7269, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 7270, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 7271, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 7272, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        300 => [['goods_id' => 7273, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+//        500 => [['goods_id' => 7274, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -3051,7 +3117,9 @@ $phone_providers = [
     ['name' => 'xiaoniu_hf', 'cfg' => $xiaoniu_hf_phone],
     ['name' => 'shuoruan', 'cfg' => $shuoruan_phone],
     ['name' => 'linzhu', 'cfg' => $linzhu_phone],
-    ['name' => 'huafutongman', 'cfg' => $huafutongman_phone]
+    ['name' => 'huafutongman', 'cfg' => $huafutongman_phone],
+    ['name' => 'feimingyu', 'cfg' => $feimingyu_phone],
+    ['name' => 'dashang_normal', 'cfg' => $dashang_normal_phone]
 ];
 $config['phone_providers'] = $phone_providers;
 

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

@@ -16,6 +16,17 @@ class config
     const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_dashang.php";
 
     const Products = [
+        mtopcard\ChinaMobileCard =>
+            [
+                10  => 90440010,
+                20  => 90440020,
+                30  => 90440030,
+                50  => 90440050,
+                100 => 90440100,
+                200 => 90440200,
+                300 => 90440300,
+                500 => 90440500
+            ],
         mtopcard\ChinaUnicomCard =>
             [
                 10  => 90460010,

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

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

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

@@ -0,0 +1,159 @@
+<?php
+declare(strict_types=0);
+
+namespace refill\dashang_normal;
+
+require_once(BASE_HELPER_RAPI_PATH . '/dashang_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 $amount, int $card_type, string $order_sn)
+    {
+        $params['userId'] = config::USER_ID;
+        $params['itemId'] = config::Products[$card_type][$amount];
+        $params['checkItemFacePrice'] = $amount * 1000;
+        $params['amt'] = 1;
+        $params['uid'] = $phone;
+        $params['serialno'] = $order_sn;
+        $params['dtCreate'] = date("YmdHis");
+
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $order_sn = $params['order_sn'];
+        $params = $this->req_params($card_no, $amount, $card_type, $order_sn);
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, 'GET', false, [], $net_errno);
+
+        if (empty($resp)) {
+            return [false, '网络错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = $this->xmlToArray($resp);
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            }
+            $status = $resp['status'];
+            $code   = $resp['code'];
+
+            if (!in_array($status, ['success', 'failed'])) {
+                return [false, '网络错误', true];
+            } elseif ($code === '00') {
+                return [true, $resp['bizOrderId'], false];
+            } elseif (in_array($code, [23, 31])) {
+                $net_errno = "HTTP-{$code}";
+                return [false, $code, true];
+            } else {
+                return [false, $code, false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['userId'] = config::USER_ID;
+        $params['serialno'] = $refill_info['order_sn'];
+        $key = config::KEY;
+        $content = "{$params['userId']}{$params['serialno']}{$key}";
+        $params['sign'] = md5($content);
+
+        $resp = http_request(config::QUERY_URL, $params);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = $this->xmlToArray($resp);
+            if (empty($resp))
+            {
+                return [false, '网络错误'];
+            }
+            else
+            {
+                $status = $resp['status'];
+                $code   = $resp['code'];
+
+                if (!in_array($status, ['success', 'failed'])) {
+                    return [false, $status];
+                }
+                elseif($code === '00')
+                {
+                    $status = intval($resp['data']['status']);
+                    if ($status === 2) {
+                        Model('refill_order')->edit($refill_info['order_id'], ['official_sn' => $resp['data']['outOrderNo']]);
+                        $order_state = ORDER_STATE_SUCCESS;
+                    } elseif ($status === 3) {
+                        $order_state = ORDER_STATE_CANCEL;
+                    } elseif (in_array($status, [0, 1, 4, 9])) {
+                        $order_state = ORDER_STATE_SEND;
+                    } else {
+                        return [false, $status];
+                    }
+                    return [true, $order_state];
+                }
+                elseif ($code === '22' && (time() - $refill_info['commit_time'] >= 600)) {
+                    return [true, ORDER_STATE_NOEXIST];
+                }
+                else {
+                    return [false, $code];
+                }
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['userId'] = config::USER_ID;
+        $key = config::KEY;
+        $body = "{$params['userId']}{$key}";
+        $params['sign'] = md5($body);
+
+        $resp = http_request(config::BALANCE_URL, $params);
+
+        if (empty($resp)) {
+            return [false, '网络错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = $this->xmlToArray($resp);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            } elseif ($resp['status'] === 'success' && $resp['code'] === '00') {
+                return [true, $resp['balance']/1000];
+            } else {
+                return [false, $resp['code']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $userid = config::USER_ID;
+        $key = config::KEY;
+        $content = "{$params['amt']}{$params['checkItemFacePrice']}{$params['dtCreate']}{$params['itemId']}{$params['itemPrice']}{$params['serialno']}";
+        $content .= "{$params['uid']}{$userid}{$key}";
+        return md5($content);
+    }
+
+    public function xmlToArray($xml)
+    {
+        return json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
+    }
+}

+ 47 - 0
helper/refill/api/xyz/dashang_normal/config.php

@@ -0,0 +1,47 @@
+<?php
+
+
+namespace refill\dashang_normal;
+
+use mtopcard;
+class config
+{
+    //回调地址需配置
+    const ORDER_URL = 'http://47.114.209.57/unicomAync/buy.do';
+    const QUERY_URL= 'http://47.114.209.57/unicomAync/queryBizOrder.do';
+    const BALANCE_URL = 'http://47.114.209.57/unicomAync/queryBalance.do';
+
+    const USER_ID= '80800357';
+    const KEY = '1d3a51d49c3b0ba2685389b52f26bffb';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_dashang_normal.php";
+
+    const Products = [
+        mtopcard\ChinaMobileCard =>
+            [
+                10  => 60030010,
+                20  => 60030020,
+                30  => 60030030,
+                50  => 60030050,
+                100 => 60030100,
+                200 => 60030200
+            ],
+        mtopcard\ChinaUnicomCard =>
+            [
+                10  => 60050010,
+                20  => 60050020,
+                30  => 60050030,
+                50  => 60050050,
+                100 => 60050100,
+                200 => 60050200
+            ],
+        mtopcard\ChinaTelecomCard =>
+            [
+                10  => 60040010,
+                20  => 60040020,
+                30  => 60040030,
+                50  => 60040050,
+                100 => 60040100,
+                200 => 60040200
+            ]
+    ];
+}

BIN
helper/refill/api/xyz/dashang_normal/下游对接供货接口.docx


+ 34 - 0
helper/refill/api/xyz/dashang_normal/开户信息.txt

@@ -0,0 +1,34 @@
+ 开户信息如下:
+北京国研方略信息科学研究院
+查单平台:http://bm.jiaoyi101.com
+登录名:gyflbilldj
+初始密码:sup123456
+对接信息
+userId:80800357
+key: 1d3a51d49c3b0ba2685389b52f26bffb
+下单:http://47.114.209.57/unicomAync/buy.do
+查询:http://47.114.209.57/unicomAync/queryBizOrder.do
+余额:http://47.114.209.57/unicomAync/queryBalance.do
+
+
+话费低价产品编码
+60040010 全国电信10
+60040020 全国电信20
+60040030 全国电信30
+60040050 全国电信50
+60040100 全国电信100
+60040200 全国电信200
+
+60050010 全国联通10
+60050020 全国联通20
+60050030 全国联通30
+60050050 全国联通50
+60050100 全国联通100
+60050200 全国联通200
+
+60030010 全国移动10
+60030020 全国移动20
+60030030 全国移动30
+60030050 全国移动50
+60030100 全国移动100
+60030200 全国移动200

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

@@ -0,0 +1,51 @@
+<?php
+namespace refill\feimingyu;
+
+require_once(BASE_HELPER_RAPI_PATH . '/feimingyu/config.php');
+
+use refill;
+
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $input = $params;
+        unset($input['sign']);
+        unset($input['voucher']);
+        $sign = $this->sign($input);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        ksort($params);
+        $str = implode('', $params);
+        $str .= config::KEY;
+        return strtoupper(md5($str));
+    }
+
+    public function notify($params)
+    {
+        $status = $params['state'];
+        $order_sn = $params['user_order'];
+        $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 === 'success') {
+            $data['official_sn'] = strtolower($params['voucher']) == 'null' ? '' : $params['voucher'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false, true];
+        } elseif ($status === 'failed') {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 142 - 0
helper/refill/api/xyz/feimingyu/RefillPhone.php

@@ -0,0 +1,142 @@
+<?php
+declare(strict_types=0);
+
+namespace refill\feimingyu;
+
+require_once(BASE_HELPER_RAPI_PATH . '/feimingyu/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['create_time'] = date("YmdHis");
+        $params['buy_type'] = 1;
+        $params['account'] = $phone;
+        $params['product_id'] = config::Products[$card_type][$amount];
+        $params['amount'] = $amount;
+        $params['user_order'] = $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['cat_id'] = config::operator[$card_type];
+
+        $resp = http_request(config::ORDER_URL, $params, 'GET', 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];
+            }
+            $status = $resp['status'];
+
+            if ($status === '0') {
+                return [true, $resp['order_id'], false];
+            } elseif (in_array($status, config::ERR_NOS, true)) {
+                return [false, $resp['msg'], false];
+            } elseif (in_array($status, ['110', '113', '-999'], true)) {
+                $net_errno = "HTTP-{$status}";
+                return [false, $resp['msg'], true];
+            } else {
+                //未知状态码
+                $net_errno = "HTTP-998";
+                return [false, $resp['msg'], true];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['userid'] = config::USER_ID;
+        $params['create_time'] = date("YmdHis");
+        $params['user_order'] = $refill_info['order_sn'];
+        $params['sign'] = $this->sign($params);
+
+        $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, '网络错误'];
+            }
+            else
+            {
+                if ($resp['status'] === '0') {
+                    $status = $resp['state'];
+                    if ($status === 'success') {
+                        Model('refill_order')->edit($refill_info['order_id'], ['official_sn' => $resp['voucher']]);
+                        $order_state = ORDER_STATE_SUCCESS;
+                    } elseif ($status === 'failed') {
+                        $order_state = ORDER_STATE_CANCEL;
+                    } elseif ($status === 'untreated') {
+                        $order_state = ORDER_STATE_SEND;
+                    } else {
+                        return [false, $status];
+                    }
+                    return [true, $order_state];
+                } else {
+                    return [false, $resp['msg']];
+                }
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['userid'] = config::USER_ID;
+        $params['create_time'] = date("YmdHis");
+        $params['sign'] = $this->sign($params);
+
+        $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['status'] === '0') {
+                return [true, $resp['balance']];
+            } else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        ksort($params);
+        $str = implode('', $params);
+        $str .= config::KEY;
+        return strtoupper(md5($str));
+    }
+}

+ 49 - 0
helper/refill/api/xyz/feimingyu/config.php

@@ -0,0 +1,49 @@
+<?php
+
+
+namespace refill\feimingyu;
+
+use mtopcard;
+class config
+{
+    //回调地址需配置
+    const ORDER_URL = 'http://47.98.163.205:80/recharge/buy.do';
+    const QUERY_URL= 'http://47.98.163.205:80/recharge/query.do';
+    const BALANCE_URL = 'http://47.98.163.205:80/user/balance.do';
+
+    const USER_ID= '69876';
+    const KEY = 'AC7F7353AAA6';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_feimingyu.php";
+
+    const operator = [
+        mtopcard\ChinaMobileCard  => 1,
+        mtopcard\ChinaUnicomCard  => 2,
+        mtopcard\ChinaTelecomCard => 3
+    ];
+
+    const Products = [
+        mtopcard\ChinaMobileCard =>
+            [
+                30  => 20003,
+                50  => 20004,
+                100 => 20005,
+                200 => 20006
+            ],
+        mtopcard\ChinaUnicomCard =>
+            [
+                30  => 20011,
+                50  => 20012,
+                100 => 20013,
+                200 => 20014
+            ],
+        mtopcard\ChinaTelecomCard =>
+            [
+                30  => 20019,
+                50  => 20020,
+                100 => 20021,
+                200 => 20022
+            ]
+    ];
+
+    const ERR_NOS = ['101', '102', '103', '104', '105', '106', '107', '108', '109', '100', '112', '115', '116', '117', '118', '119', '120'];
+}

BIN
helper/refill/api/xyz/feimingyu/互联网增值业务接口文档.pdf


BIN
helper/refill/api/xyz/feimingyu/产品编码.xlsx


+ 8 - 0
helper/refill/api/xyz/feimingyu/北京椰子对接信息.txt

@@ -0,0 +1,8 @@
+客户端入口:http://47.98.163.205:80/
+下单接口:http://47.98.163.205:80/recharge/buy.do
+订单查询:http://47.98.163.205:80/recharge/query.do
+余额查询:http://47.98.163.205:80/user/balance.do
+帐号:北京椰子
+密码:123456
+用户编号:69876
+秘钥:AC7F7353AAA6

+ 6 - 8
helper/refill/api/xyz/yikatong/RefillCallBack.php

@@ -9,7 +9,7 @@ class RefillCallBack implements refill\IRefillCallBack
     public function verify($params): bool
     {
         $sign = $this->sign($params);
-        if ($params['szVerifyString'] == $sign) {
+        if ($params['sign'] == $sign) {
             return true;
         } else {
             return false;
@@ -18,17 +18,15 @@ class RefillCallBack implements refill\IRefillCallBack
 
     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}";
+        $content  = config::USER_ID . $params['ordernum'] . $params['timestamp'] . config::KEY;
         return md5($content);
     }
 
+    //[$order_id, $success, $can_try, $need_handle]
     public function notify($params)
     {
-        $status = intval($params['nFlag']);
-        $order_sn = $params['szOrderId'];
+        $status = intval($params['state']);
+        $order_sn = $params['ordernum'];
         $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
         if (empty($order_info)) {
             return [false, false, false,false];
@@ -36,7 +34,7 @@ class RefillCallBack implements refill\IRefillCallBack
 
         $order_id = $order_info['order_id'];
         if ($status === 2) {
-            $data['official_sn'] = strtolower($params['szRtnMsg']) == 'null' ? '' : $params['szRtnMsg'];
+            $data['official_sn'] = strtolower($params['serialno']) == 'null' ? '' : $params['serialno'];
             Model('refill_order')->edit($order_id, $data);
             return [$order_id, true, false, true];
         } elseif ($status === 3) {

+ 58 - 59
helper/refill/api/xyz/yikatong/RefillPhone.php

@@ -6,6 +6,7 @@ require_once(BASE_HELPER_RAPI_PATH . '/yikatong/config.php');
 
 use refill;
 use Log;
+use mtopcard;
 
 class RefillPhone extends refill\IRefillPhone
 {
@@ -14,90 +15,87 @@ class RefillPhone extends refill\IRefillPhone
         parent::__construct($cfgs);
     }
 
-    private function req_params(int $phone, int $amount, int $card_type, string $order_sn)
+    private function req_params(int $phone,int $card_type,int $amount, 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;
+        $params['userid'] = config::USER_ID;
+        $params['orderid'] = $order_sn;
+        $params['echo'] = rand(100000,999999);
+        $params['timestamp'] = date("YmdHis");
+        $params['version'] = '1.0';
+        $params['packcode'] = $amount;
+        $params['mobile'] = $phone;
+        $params['flowtype'] = 'fee_quick';
+        $params['callback_url'] = config::NOTIFY_URL;
+        $params['channelcode'] = config::ChannelCode[$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);
-
+        $params = $this->req_params($card_no, $card_type, $amount, $params['order_sn']);
         $sign = $this->sign($params);
-        $params['szVerifyString'] = $sign;
+        $params['chargeSign'] = $sign;
 
-        $resp = http_request(config::ORDER_URL, $params, 'POST', false, config::ExtHeaders, $net_errno);
+        $params = json_encode($params);
+        $resp = http_post_data(config::ORDER_URL, $params , config::ExtHeaders, $net_errno);
 
         if (empty($resp)) {
-            return [false, '网络错误', true];
+            return [false, '系统错误', true];
         }
         else
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
-
-            $nRtn = $resp['nRtn'];
+            $code = $resp['code'];
+            $desc = urldecode($resp['desc']);
             if (empty($resp)) {
-                return [false, '网络错误', true];
-            } elseif ($nRtn === 0) {
+                return [false, '系统错误', true];
+            } elseif ($code === '0000' || $code === '2000') {
                 return [true, '', false];
-            } elseif (in_array($nRtn, config::ERR_NOS, true)) {
-                return [false, $resp['szRtnCode'], false];
-            } elseif (in_array($nRtn, [2050, 999], true)) {
-                $net_errno = "HTTP-{$nRtn}";
-                return [false, $resp['szRtnCode'], true];
+            } elseif ($code === '0006' || $code === '0010') {
+                $net_errno = "HTTP-{$code}";
+                return [false, $desc, true];
             } else {
-                $err = 998;
-                $net_errno = "HTTP-{$err}";
-                return [false, $resp['szRtnCode'], true];
+                return [false, $desc, 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);
+        $params['userid'] = config::USER_ID;
+        $params['timestamp'] = date("YmdHis");
+        $params['orderid'] = $refill_info['order_sn'];
+        $content = $params['userid'] . $params['orderid'] . $params['timestamp'] . config::KEY;
+        $params['sign'] = md5($content);
+        $params = json_encode($params);
 
-        $resp = http_request(config::QUERY_URL, $params, 'POST', false, config::ExtHeaders);
+        $resp = http_post_data(config::QUERY_URL, $params , config::ExtHeaders);
 
         if (empty($resp)) {
-            return [false, '网络错误'];
+            return [false, '系统错误'];
         }
         else
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
-            if (empty($resp)) {
-                return [false, '网络错误'];
-            }
+            $desc = urldecode($resp['desc']);
 
-            $status = $resp['nRtn'];
-            if ($status === 5012) {
-                $updata['official_sn'] = $resp['szRtnMsg'];
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            } elseif ($resp['code'] === '0000') {
+                $updata['official_sn'] = $resp['serialno'];
                 Model('refill_order')->edit($refill_info['order_id'], $updata);
                 $order_state = ORDER_STATE_SUCCESS;
-            } elseif ($status === 5013) {
+            } elseif ($resp['code'] === '0004') {
                 $order_state = ORDER_STATE_CANCEL;
-            } elseif (in_array($status, [5011,5019],true)) {
+            } elseif ($resp['code'] === '0002' || $resp['code'] === '0003') {
                 $order_state = ORDER_STATE_SEND;
-            } elseif ($status === 5005 && (time() - $refill_info['commit_time'] >= 300)) {
+            } elseif ($resp['code'] === '0005' && time() - $refill_info['commit_time'] > 600) {
                 $order_state = ORDER_STATE_NOEXIST;
             } else {
-                return [false, $resp['szRtnMsg']];
+                return [false, $desc];
             }
 
             return [true, $order_state];
@@ -106,36 +104,37 @@ class RefillPhone extends refill\IRefillPhone
 
     public function balance()
     {
-        $params['szAgentId'] = config::USER_ID;
-        $key = config::KEY;
-        $content = "szAgentId={$params['szAgentId']}&szKey={$key}";
-        $params['szVerifyString'] = md5($content);
+        $params['userid'] = config::USER_ID;
+        $params['timestamp'] = date("YmdHis");
+        $content = $params['userid'] . $params['timestamp'] . config::KEY;
+        $params['sign'] = md5($content);
+        $params = json_encode($params);
 
-        $resp = http_request(config::BALANCE_URL, $params, 'POST', false, config::ExtHeaders);
+        $resp = http_post_data(config::BALANCE_URL, $params , config::ExtHeaders);
 
         if (empty($resp)) {
-            return [false, '网络错误'];
+            return [false, '系统错误'];
         }
         else
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
+            $desc = urldecode($resp['desc']);
+
             if (empty($resp)) {
-                return [false, '网络错误'];
-            } elseif ($resp['nRtn'] === 0) {
-                return [true, $resp['fBalance']];
+                return [false, '系统错误'];
+            } elseif ($resp['code'] === '0000') {
+                return [true, $resp['balance']];
             } else {
-                return [false, $resp['szRtnCode']];
+                return [false, $desc];
             }
         }
     }
 
     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}";
+        $content  = $params['userid'] . $params['orderid'] . config::KEY . $params['echo'] . $params['timestamp'];
         return md5($content);
     }
+
 }

+ 10 - 14
helper/refill/api/xyz/yikatong/config.php

@@ -6,22 +6,18 @@ use mtopcard;
 
 class config
 {
-    //yd95 lt/dx 945
-    const ORDER_URL = 'http://47.96.90.165:10186/plat/api/old/submitorder';
-    const QUERY_URL = 'http://47.96.90.165:10186/plat/api/old/queryorder';
-    const BALANCE_URL = 'http://47.96.90.165:10186/plat/api/old/queryBalance';
+    const ORDER_URL = 'http://47.104.76.103:8080/fee/api/charge.do';
+    const QUERY_URL = 'http://47.104.76.103:8080/fee/api/query_state.do';
+    const BALANCE_URL = 'http://47.104.76.103:8080/fee/api/query_balance.do';
 
-    const USER_ID = '200001';
-    const KEY = '6723bcb59e574050bc65feeca937af2b';
+    const USER_ID = '04f46671c696436aa30d';
+    const KEY = '29defd3a5a634b6a9988';
     const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_yikatong.php";
-    const operator = [
-        mtopcard\ChinaMobileCard => 1,
-        mtopcard\ChinaUnicomCard => 2,
-        mtopcard\ChinaTelecomCard => 3
-    ];
-    const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
 
-    const ERR_NOS = [
-        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    const ExtHeaders = ['Content-Type: application/json'];
+    const ChannelCode = [
+        mtopcard\ChinaMobileCard => 'cmcc',
+        mtopcard\ChinaUnicomCard => 'cucc',
+        mtopcard\ChinaTelecomCard => 'ctcc'
     ];
 }

+ 12 - 0
helper/refill/api/xyz/yikatong/国椰.txt

@@ -0,0 +1,12 @@
+ID:04f46671c696436aa30d
+秘钥:29defd3a5a634b6a9988
+提单地址:http://47.104.76.103:8080/fee/api/charge.do
+
+查询地址:http://47.104.76.103:8080/fee/api/query_state.do
+
+余额地址:http://47.104.76.103:8080/fee/api/query_balance.do
+
+http://47.104.76.103:8080/fee/
+账号:guoyanyezi
+密码:123456   (登录后请立即修改)
+

+ 0 - 12
helper/refill/api/xyz/yikatong/国研椰子-开户信息.txt

@@ -1,12 +0,0 @@
-对接文档地址:https://docs.qq.com/doc/DWkV1VkxQVk13eEtQ
-ID:200001
-秘钥:6723bcb59e574050bc65feeca937af2b
-
-正式环境:
-话费下单地址:http://47.96.90.165:10186/plat/api/old/submitorder
-查询地址:http://47.96.90.165:10186/plat/api/old/queryorder
-查询余额地址:http://47.96.90.165:10186/plat/api/old/queryBalance
-
-客户端地址:http://47.96.90.165:10186/plat/index
-账号:guoyanheyezi
-密码:123456      (登录后请立即修改)

BIN
helper/refill/api/xyz/yikatong/话费分销系统接口文档.doc


+ 4 - 0
mobile/callback/refill_dashang_normal.php

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

+ 4 - 0
mobile/callback/refill_feimingyu.php

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

+ 7 - 2
mobile/callback/refill_yikatong.php

@@ -1,4 +1,9 @@
 <?php
 
-refill\util::push_notify('yikatong',$_POST);
-echo ('ok');
+$content = $_SERVER['post_content'];
+$inputs = json_decode($content,true);
+refill\util::push_notify('yikatong',$inputs);
+
+$response = ["code" => "0000", "desc" => ""];
+$body = json_encode($response);
+echo($body);

+ 32 - 4
test/TestRefill.php

@@ -873,13 +873,13 @@ class TestRefill extends TestCase
     public function testYikatong()
     {
         $provider = $this->getProvider('yikatong');
-        $resp = $provider->balance();
-//        $resp = $provider->add(18500608333, 5, 50, [
+//        $resp = $provider->balance();
+//        $resp = $provider->add(13699279618, 4, 50, [
 //            'order_sn' => $this->make_sn()
 //        ]);
-//        $resp = $provider->query(['order_sn' => '17631630896153830023']);
+        $resp = $provider->query(['order_sn' => '47461635931681279436']);
 
-//        $body = '{"szOrderId":"17631630896153830023","fSalePrice":"47.25","szAgentId":"200001","nFlag":"2","szVerifyString":"4ab7914e333a452d32be85b51b075f48","szPhoneNum":"18500608333","szRtnMsg":"110103353182109061043150295134","nDemo":"50"}';
+//        $body = '{"userid":"04f46671c696436aa30d","ordernum":"20201635929812426409","mobile":"13699279618","timestamp":"20211103165659","state":"3","desc":"%E5%85%85%E5%80%BC%E5%A4%B1%E8%B4%A5%21","sign":"d1e821043c3efcf966b3e415ba175e1e"}';
 //        $params = json_decode($body, true);
 //        $provider = $this->getProvider('yikatong','RefillCallBack');
 //        $ret = $provider->verify($params);
@@ -1271,6 +1271,34 @@ class TestRefill extends TestCase
         $data = $provider->notify($params);
     }
 
+    public function testFeimingyu()
+    {
+//        $provider = $this->getProvider('feimingyu');
+//        $resp = $provider->balance();
+//        $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
+//        $resp = $provider->query(['order_sn' => '99741635757876781160']);
+
+        $body = '{"userid":"69876","order_id":"21110117111869876daed6b187","account":"18500608333","amount":"30","price":"28.41","state":"failed","user_order":"99741635757876781160","sign":"C82F4821547BBFC462E9758EE28287E1","voucher":""}';
+        $params = json_decode($body, true);
+        $provider = $this->getProvider('feimingyu','RefillCallBack');
+        $ret = $provider->verify($params);
+        $resp = $provider->notify($params);
+    }
+
+    public function testDashangnormal()
+    {
+//        $provider = $this->getProvider('dashang_normal');
+//        $resp = $provider->balance();
+//        $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
+//        $resp = $provider->query(['order_sn' => '34461636081408575185']);
+
+        $body = '{"userId":"80800357","bizId":"60040030","ejId":"91105110431325","downstreamSerialno":"34461636081408575185","status":"3","voucher":"","voucherType":"0","sign":"24a40c2b677820533e418d4a2b3f0806"}';
+        $params = json_decode($body, true);
+        $provider = $this->getProvider('dashang_normal','RefillCallBack');
+        $ret = $provider->verify($params);
+        $resp = $provider->notify($params);
+    }
+
     public function testAmingjd()
     {
 //        $provider = new refill\amingjd\RefillPhone([]);