Forráskód Böngészése

sialan and sialan_tax new api

xiaoyu 3 éve
szülő
commit
c2cd7d3669

+ 48 - 48
data/config/win/refill.ini.php

@@ -1743,44 +1743,44 @@ $cangbukami_phone = ['name' => 'cangbukami', 'store_id' => 83, 'qualitys' => '3'
 $sialan_phone = ['name' => 'sialan', 'store_id' => 94, 'qualitys' => '2',
     'amount' => [
         10 => [
-            ['goods_id' => 6851, 'price' => 10.03, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6851, 'price' => 10.05, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6851, 'price' => 10.025, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 6851, 'price' => 10.03, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6851, 'price' => 10.025, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6851, 'price' => 10.025, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 6852, 'price' => 20.06, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6852, 'price' => 20.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6852, 'price' => 20.05, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 6852, 'price' => 20.06, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6852, 'price' => 20.05, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6852, 'price' => 20.05, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 6853, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6853, 'price' => 30.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6853, 'price' => 30.075, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 6853, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6853, 'price' => 30.075, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6853, 'price' => 30.075, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 6854, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6854, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6854, 'price' => 50.125, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 6854, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6854, 'price' => 50.125, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6854, 'price' => 50.125, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 6855, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6855, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6855, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6855, 'price' => 100.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6855, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6855, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6856, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6856, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6856, 'price' => 200.7, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6856, 'price' => 200.3, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6856, 'price' => 200.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6856, 'price' => 200.7, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 6857, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6857, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6857, 'price' => 301.05, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6857, 'price' => 300.45, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6857, 'price' => 300.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6857, 'price' => 301.05, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
-            ['goods_id' => 6858, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6858, 'price' => 502, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6858, 'price' => 501.75, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6858, 'price' => 500.75, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6858, 'price' => 501.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6858, 'price' => 501.75, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -2325,44 +2325,44 @@ $yikatong_phone = ['name' => 'yikatong', 'store_id' => 118, 'qualitys' => '1',
 $sialan_tax_phone = ['name' => 'sialan_tax', 'store_id' => 119, 'qualitys' => '2',
     'amount' => [
         10 => [
-            ['goods_id' => 7035, 'price' => 10.54, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7035, 'price' => 10.365, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7035, 'price' => 10.54, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7035, 'price' => 10.54, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7035, 'price' => 10.335, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7035, 'price' => 10.54, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7036, 'price' => 21.08, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7036, 'price' => 20.73, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7036, 'price' => 20.94, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7036, 'price' => 21.08, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7036, 'price' => 20.67, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7036, 'price' => 20.94, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 7037, 'price' => 31.17, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7037, 'price' => 31.095, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7037, 'price' => 31.41, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7037, 'price' => 31.17, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7037, 'price' => 31.005, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7037, 'price' => 31.41, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7038, 'price' => 51.95, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7038, 'price' => 51.725, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7038, 'price' => 52.35, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7038, 'price' => 51.95, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7038, 'price' => 51.675, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7038, 'price' => 52.35, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7039, 'price' => 103.9, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7039, 'price' => 103.45, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7039, 'price' => 103.55, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7039, 'price' => 103.25, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7039, 'price' => 103.35, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7039, 'price' => 103.55, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7040, 'price' => 207.8, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7040, 'price' => 206.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7040, 'price' => 207.1, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7040, 'price' => 206.5, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7040, 'price' => 206.7, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7040, 'price' => 207.1, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 7041, 'price' => 311.7, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7041, 'price' => 310.35, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7041, 'price' => 310.65, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7041, 'price' => 309.75, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7041, 'price' => 310.05, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7041, 'price' => 310.65, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
-            ['goods_id' => 7042, 'price' => 519.5, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7042, 'price' => 517.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7042, 'price' => 517.75, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7042, 'price' => 516.25, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7042, 'price' => 516.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7042, 'price' => 517.75, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];

+ 48 - 48
data/config/xyz/refill.ini.php

@@ -1743,44 +1743,44 @@ $cangbukami_phone = ['name' => 'cangbukami', 'store_id' => 83, 'qualitys' => '3'
 $sialan_phone = ['name' => 'sialan', 'store_id' => 94, 'qualitys' => '2',
     'amount' => [
         10 => [
-            ['goods_id' => 6851, 'price' => 10.03, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6851, 'price' => 10.05, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6851, 'price' => 10.025, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 6851, 'price' => 10.03, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6851, 'price' => 10.025, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6851, 'price' => 10.025, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 6852, 'price' => 20.06, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6852, 'price' => 20.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6852, 'price' => 20.05, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 6852, 'price' => 20.06, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6852, 'price' => 20.05, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6852, 'price' => 20.05, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 6853, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6853, 'price' => 30.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6853, 'price' => 30.075, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 6853, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6853, 'price' => 30.075, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6853, 'price' => 30.075, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 6854, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6854, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6854, 'price' => 50.125, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 6854, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6854, 'price' => 50.125, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6854, 'price' => 50.125, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 6855, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6855, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6855, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6855, 'price' => 100.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6855, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6855, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6856, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6856, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6856, 'price' => 200.7, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6856, 'price' => 200.3, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6856, 'price' => 200.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6856, 'price' => 200.7, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 6857, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6857, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6857, 'price' => 301.05, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6857, 'price' => 300.45, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6857, 'price' => 300.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6857, 'price' => 301.05, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
-            ['goods_id' => 6858, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6858, 'price' => 502, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6858, 'price' => 501.75, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6858, 'price' => 500.75, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6858, 'price' => 501.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6858, 'price' => 501.75, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -2325,44 +2325,44 @@ $yikatong_phone = ['name' => 'yikatong', 'store_id' => 118, 'qualitys' => '1',
 $sialan_tax_phone = ['name' => 'sialan_tax', 'store_id' => 119, 'qualitys' => '2',
     'amount' => [
         10 => [
-            ['goods_id' => 7035, 'price' => 10.54, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7035, 'price' => 10.365, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7035, 'price' => 10.54, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7035, 'price' => 10.54, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7035, 'price' => 10.335, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7035, 'price' => 10.54, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7036, 'price' => 21.08, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7036, 'price' => 20.73, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7036, 'price' => 20.94, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7036, 'price' => 21.08, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7036, 'price' => 20.67, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7036, 'price' => 20.94, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 7037, 'price' => 31.17, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7037, 'price' => 31.095, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7037, 'price' => 31.41, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7037, 'price' => 31.17, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7037, 'price' => 31.005, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7037, 'price' => 31.41, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7038, 'price' => 51.95, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7038, 'price' => 51.725, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7038, 'price' => 52.35, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7038, 'price' => 51.95, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7038, 'price' => 51.675, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7038, 'price' => 52.35, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7039, 'price' => 103.9, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7039, 'price' => 103.45, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7039, 'price' => 103.55, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7039, 'price' => 103.25, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7039, 'price' => 103.35, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7039, 'price' => 103.55, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7040, 'price' => 207.8, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7040, 'price' => 206.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7040, 'price' => 207.1, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7040, 'price' => 206.5, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7040, 'price' => 206.7, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7040, 'price' => 207.1, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 7041, 'price' => 311.7, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7041, 'price' => 310.35, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7041, 'price' => 310.65, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7041, 'price' => 309.75, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7041, 'price' => 310.05, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7041, 'price' => 310.65, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
-            ['goods_id' => 7042, 'price' => 519.5, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7042, 'price' => 517.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7042, 'price' => 517.75, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7042, 'price' => 516.25, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7042, 'price' => 516.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7042, 'price' => 517.75, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];

+ 48 - 48
data/config/xyzadm/refill.ini.php

@@ -1743,44 +1743,44 @@ $cangbukami_phone = ['name' => 'cangbukami', 'store_id' => 83, 'qualitys' => '3'
 $sialan_phone = ['name' => 'sialan', 'store_id' => 94, 'qualitys' => '2',
     'amount' => [
         10 => [
-            ['goods_id' => 6851, 'price' => 10.03, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6851, 'price' => 10.05, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6851, 'price' => 10.025, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 6851, 'price' => 10.03, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6851, 'price' => 10.025, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6851, 'price' => 10.025, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 6852, 'price' => 20.06, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6852, 'price' => 20.1, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6852, 'price' => 20.05, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 6852, 'price' => 20.06, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6852, 'price' => 20.05, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6852, 'price' => 20.05, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 6853, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6853, 'price' => 30.15, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6853, 'price' => 30.075, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 6853, 'price' => 30.09, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6853, 'price' => 30.075, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6853, 'price' => 30.075, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 6854, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6854, 'price' => 50.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6854, 'price' => 50.125, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 6854, 'price' => 50.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6854, 'price' => 50.125, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6854, 'price' => 50.125, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 6855, 'price' => 100.3, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6855, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6855, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6855, 'price' => 100.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6855, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6855, 'price' => 100.25, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6856, 'price' => 200.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6856, 'price' => 200.8, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6856, 'price' => 200.7, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6856, 'price' => 200.3, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6856, 'price' => 200.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6856, 'price' => 200.7, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 6857, 'price' => 300.9, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6857, 'price' => 301.2, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6857, 'price' => 301.05, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6857, 'price' => 300.45, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6857, 'price' => 300.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6857, 'price' => 301.05, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
-            ['goods_id' => 6858, 'price' => 501.5, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6858, 'price' => 502, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6858, 'price' => 501.75, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 6858, 'price' => 500.75, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6858, 'price' => 501.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 6858, 'price' => 501.75, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -2325,44 +2325,44 @@ $yikatong_phone = ['name' => 'yikatong', 'store_id' => 118, 'qualitys' => '1',
 $sialan_tax_phone = ['name' => 'sialan_tax', 'store_id' => 119, 'qualitys' => '2',
     'amount' => [
         10 => [
-            ['goods_id' => 7035, 'price' => 10.54, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7035, 'price' => 10.365, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7035, 'price' => 10.54, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7035, 'price' => 10.54, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7035, 'price' => 10.335, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7035, 'price' => 10.54, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         20 => [
-            ['goods_id' => 7036, 'price' => 21.08, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7036, 'price' => 20.73, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7036, 'price' => 20.94, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7036, 'price' => 21.08, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7036, 'price' => 20.67, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7036, 'price' => 20.94, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         30 => [
-            ['goods_id' => 7037, 'price' => 31.17, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7037, 'price' => 31.095, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7037, 'price' => 31.41, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7037, 'price' => 31.17, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7037, 'price' => 31.005, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7037, 'price' => 31.41, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
-            ['goods_id' => 7038, 'price' => 51.95, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7038, 'price' => 51.725, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7038, 'price' => 52.35, 'quality' => 2, 'card_type' => 'chinatelecom']
+//            ['goods_id' => 7038, 'price' => 51.95, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7038, 'price' => 51.675, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7038, 'price' => 52.35, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
-            ['goods_id' => 7039, 'price' => 103.9, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7039, 'price' => 103.45, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7039, 'price' => 103.55, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7039, 'price' => 103.25, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7039, 'price' => 103.35, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7039, 'price' => 103.55, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
-            ['goods_id' => 7040, 'price' => 207.8, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7040, 'price' => 206.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7040, 'price' => 207.1, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7040, 'price' => 206.5, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7040, 'price' => 206.7, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7040, 'price' => 207.1, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
-            ['goods_id' => 7041, 'price' => 311.7, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7041, 'price' => 310.35, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7041, 'price' => 310.65, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7041, 'price' => 309.75, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7041, 'price' => 310.05, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7041, 'price' => 310.65, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
-            ['goods_id' => 7042, 'price' => 519.5, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7042, 'price' => 517.25, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 7042, 'price' => 517.75, 'quality' => 2, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7042, 'price' => 516.25, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7042, 'price' => 516.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7042, 'price' => 517.75, 'quality' => 2, 'card_type' => 'chinatelecom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];

+ 15 - 16
helper/refill/api/xyz/sialan/RefillCallBack.php

@@ -22,34 +22,33 @@ class RefillCallBack implements refill\IRefillCallBack
     private function sign($params)
     {
         ksort($params);
-        $body = "";
+        $content = "";
         foreach ($params as $k => $v) {
-            $body .= "{$k}{$v}";
+            $content .= "{$k}={$v}&";
         }
-        $body .= config::CPKEY;
-        return md5($body);
+        $content = rtrim($content, '&');
+        $content .= config::API_KEY;
+        return md5($content);
     }
 
     public function notify($params)
     {
-        $status = $params['status'];
-        $order_sn = $params['ret_para'];
+        $status = intval($params['status']);
+        $order_sn = $params['query_sn'];
         $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['sz_order_no']) == 'null' ? '' : $params['sz_order_no'];
+        $order_id = $order_info['order_id'];
+        if ($status === 1) {
+            $data['official_sn'] = strtolower($params['operator_sn']) == 'null' ? '' : $params['operator_sn'];
             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];
+            return [$order_id, true, false, true];
+        } elseif ($status === 2) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
         }
     }
 }

+ 141 - 147
helper/refill/api/xyz/sialan/RefillPhone.php

@@ -1,148 +1,142 @@
-<?php
-
-namespace refill\sialan;
-
-require_once(BASE_HELPER_RAPI_PATH . '/sialan/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['cpid'] = config::CPID;
-        $params['create_time'] = date("YmdHis");
-        $params['mobile'] = $phone;
-        $params['type'] = 1;
-        $params['product_id'] = config::product_id[$card_type][$amount];
-        $params['amount'] = $amount;
-        $params['op'] = config::operator[$card_type];
-        $params['ret_para'] = $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;
-
-        $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);
-            $status = $resp['status'];
-            if (empty($resp)) {
-                return [false, '网络错误', true];
-            } elseif ($status == 0) {
-                return [true, $resp['order_no'], false];
-            } elseif (in_array($status, config::ERR_NOS)) {
-                return [false, $resp['msg'], false];
-            } elseif (in_array($status, [-10010, -10000, -999])) {
-                $net_errno = "HTTP-{$status}";
-                return [false, $resp['msg'], true];
-            } else {
-                $err = 998;
-                $net_errno = "HTTP-{$err}";
-                return [false, $resp['msg'], true];
-            }
-        }
-    }
-
-    public function query($refill_info)
-    {
-        $params['cpid'] = config::CPID;
-        $params['order_no'] = $refill_info['order_sn'];
-        $params['mobile'] = $refill_info['card_no'];
-        $params['create_time'] = date("YmdHis");
-        $params['sign'] = $this->sign($params);
-
-        $resp = http_request(config::QUERY_URL, $params, 'GET', false, []);
-
-        if (empty($resp)) {
-            return [false, '网络错误'];
-        }
-        else
-        {
-            Log::record($resp, Log::DEBUG);
-            $resp = json_decode($resp, true);
-            if (empty($resp))
-            {
-                return [false, '网络错误'];
-            }
-            else
-            {
-                $status = $resp['status'];
-                if ($status == 0)
-                {
-                    $order_status = $resp['data'];
-                    if ($order_status == 'success') {
-                        $updata['official_sn'] = $resp['operator_serial_number'];
-                        Model('refill_order')->edit($refill_info['order_id'], $updata);
-                        $order_state = ORDER_STATE_SUCCESS;
-                    } elseif ($order_status == 'failed') {
-                        $order_state = ORDER_STATE_CANCEL;
-                    } elseif ($order_status == 'untreated') {
-                        $order_state = ORDER_STATE_SEND;
-                    } else {
-                        return [false, $resp['msg']];
-                    }
-
-                    return [true, $order_state];
-                }
-                elseif ($status == -10013) {
-                    return [true, ORDER_STATE_NOEXIST];
-                }
-                else {
-                    return [false, $resp['msg']];
-                }
-            }
-        }
-    }
-
-    public function balance()
-    {
-        $params['cpid'] = config::CPID;
-        $params['create_time'] = date("YmdHis");
-        $params['sign'] = $this->sign($params);
-
-        $resp = http_request(config::BALANCE_URL, $params, 'GET', false, []);
-
-        if (empty($resp)) {
-            return [false, '网络错误'];
-        } else {
-            Log::record($resp, Log::DEBUG);
-            $resp = json_decode($resp, true);
-            if ($resp['status'] == 0) {
-                return [true, $resp['balance']];
-            } else {
-                return [false, $resp['msg']];
-            }
-        }
-    }
-
-    private function sign($params)
-    {
-        ksort($params);
-        $body = "";
-        foreach ($params as $k => $v) {
-            $body .= "{$k}{$v}";
-        }
-        $body .= config::CPKEY;
-        return md5($body);
-    }
+<?php
+
+namespace refill\sialan;
+
+require_once(BASE_HELPER_RAPI_PATH . '/sialan/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['api_id'] = config::API_ID;
+        $params['recharge'] = $phone;
+        $params['amount'] = $amount;
+        $params['type'] = 1;
+        $params['goods_id'] = config::product_id[$card_type][$amount];
+        $params['query_sn'] = $order_sn;
+        $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['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 = json_decode($resp, true);
+            $code = $resp['code'];
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            } elseif ($code === '0') {
+                return [true, $resp['order_sn'], false];
+            } elseif (in_array($code, config::ERR_NOS, true)) {
+                return [false, $resp['msg'], false];
+            } elseif (in_array($code, ['-10000', '-10010', '-999'], true)) {
+                $net_errno = "HTTP-{$code}";
+                return [false, $resp['msg'], true];
+            } else {
+                $err = 998;
+                $net_errno = "HTTP-{$err}";
+                return [false, $resp['msg'], true];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['api_id'] = config::API_ID;
+        $params['order_sn'] = $refill_info['ch_trade_no'];
+        $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
+            {
+                $code = $resp['code'];
+                if ($code === '0')
+                {
+                    $order_status = $resp['data']['status'];
+                    if ($order_status === '1') {
+                        $updata['official_sn'] = $resp['data']['operator_sn'];
+                        Model('refill_order')->edit($refill_info['order_id'], $updata);
+                        $order_state = ORDER_STATE_SUCCESS;
+                    } elseif ($order_status === '2') {
+                        $order_state = ORDER_STATE_CANCEL;
+                    } elseif ($order_status === '0') {
+                        $order_state = ORDER_STATE_SEND;
+                    } else {
+                        return [false, $order_status];
+                    }
+
+                    return [true, $order_state];
+                }
+                else {
+                    return [false, $resp['msg']];
+                }
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['api_id'] = config::API_ID;
+        $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 ($resp['code'] === '0') {
+                return [true, $resp['balance']];
+            } else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        ksort($params);
+        $content = "";
+        foreach ($params as $k => $v) {
+            $content .= "{$k}={$v}&";
+        }
+        $content = rtrim($content, '&');
+        $content .= config::API_KEY;
+        return md5($content);
+    }
 }

+ 8 - 11
helper/refill/api/xyz/sialan/account.txt

@@ -1,11 +1,8 @@
-下单接口:http://39.98.234.165/api/do
-查单接口:http://39.98.234.165/api/queryorder
-余额接口:http://39.98.234.165/api/querybalance
-
-登录地址:http://39.98.234.165
-帐号:GYYZ
-密码:123456
-CPID:39780
-CPKEY:966cbd556c90ae75d  
-
-https://docs.qq.com/doc/DQmdubmxCdXp6bkxu 对接文档
+商户: guoyanyeziop
+密码: 20033aa9 (初始密码)
+商户后台: http://120.27.19.82/index/user.html
+API_ID: 16855
+API_KEY: d9057a2dda886bb48244314044df9696
+对接文档: http://120.27.19.82/api.html
+接单地址: http://120.27.19.82:9168
+查询地址: http://120.27.19.82

+ 10 - 9
helper/refill/api/xyz/sialan/config.php

@@ -6,17 +6,18 @@ namespace refill\sialan;
 use mtopcard;
 class config
 {
-    const ORDER_URL = 'http://39.98.234.165/api/do';
-    const QUERY_URL = 'http://39.98.234.165/api/queryorder';
-    const BALANCE_URL = 'http://39.98.234.165/api/querybalance';
+    //回调地址需上游配置
+    const ORDER_URL = 'http://120.27.19.82:9168/api/recharge';
+    const QUERY_URL = 'http://120.27.19.82/api/query/order';
+    const BALANCE_URL = 'http://120.27.19.82/api/query/balance';
 
-    const CPID = '39780';
-    const CPKEY = '966cbd556c90ae75d';
+    const API_ID = '16855';
+    const API_KEY = 'd9057a2dda886bb48244314044df9696';
     const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_sialan.php";
     const operator = [
-        mtopcard\ChinaMobileCard  => 1,
-        mtopcard\ChinaUnicomCard  => 2,
-        mtopcard\ChinaTelecomCard => 3
+        mtopcard\ChinaMobileCard  => 2,
+        mtopcard\ChinaUnicomCard  => 3,
+        mtopcard\ChinaTelecomCard => 4
     ];
     const product_id = [
         mtopcard\ChinaMobileCard  => [
@@ -52,6 +53,6 @@ class config
     ];
 
     const ERR_NOS = [
-        -10001,-10002,-10003,-10004,-10013,-10005,-10006,-10007,-10008,-10009,-10011,-10012,-10015,-10016
+        '-10001','-10002','-10003','-10004','-10005','-10006','-10007','-10008','-10009','-10011','-10012','-10013','-10015','-10016','-10017'
     ];
 }

+ 15 - 16
helper/refill/api/xyz/sialan_tax/RefillCallBack.php

@@ -22,34 +22,33 @@ class RefillCallBack implements refill\IRefillCallBack
     private function sign($params)
     {
         ksort($params);
-        $body = "";
+        $content = "";
         foreach ($params as $k => $v) {
-            $body .= "{$k}{$v}";
+            $content .= "{$k}={$v}&";
         }
-        $body .= config::CPKEY;
-        return md5($body);
+        $content = rtrim($content, '&');
+        $content .= config::API_KEY;
+        return md5($content);
     }
 
     public function notify($params)
     {
-        $status = $params['status'];
-        $order_sn = $params['ret_para'];
+        $status = intval($params['status']);
+        $order_sn = $params['query_sn'];
         $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['sz_order_no']) == 'null' ? '' : $params['sz_order_no'];
+        $order_id = $order_info['order_id'];
+        if ($status === 1) {
+            $data['official_sn'] = strtolower($params['operator_sn']) == 'null' ? '' : $params['operator_sn'];
             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];
+            return [$order_id, true, false, true];
+        } elseif ($status === 2) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
         }
     }
 }

+ 141 - 147
helper/refill/api/xyz/sialan_tax/RefillPhone.php

@@ -1,148 +1,142 @@
-<?php
-
-namespace refill\sialan_tax;
-
-require_once(BASE_HELPER_RAPI_PATH . '/sialan_tax/config.php');
-
-use refill;
-use Log;
-
-class RefillPhone extends refill\IRefillPhone
-{
-    public function __construct($cfgs)
-    {
-        parent::__construct($cfgs);
-    }
-
-    private function req_params(int $phone, int $amount, int $card_type,string $order_sn)
-    {
-        $params['cpid'] = config::CPID;
-        $params['create_time'] = date("YmdHis");
-        $params['mobile'] = $phone;
-        $params['type'] = 1;
-        $params['product_id'] = config::product_id[$card_type][$amount];
-        $params['amount'] = $amount;
-        $params['op'] = config::operator[$card_type];
-        $params['ret_para'] = $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;
-
-        $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);
-            $status = $resp['status'];
-            if (empty($resp)) {
-                return [false, '网络错误', true];
-            } elseif ($status == 0) {
-                return [true, $resp['order_no'], false];
-            } elseif (in_array($status, config::ERR_NOS)) {
-                return [false, $resp['msg'], false];
-            } elseif (in_array($status, [-10010, -10000, -999])) {
-                $net_errno = "HTTP-{$status}";
-                return [false, $resp['msg'], true];
-            } else {
-                $err = 998;
-                $net_errno = "HTTP-{$err}";
-                return [false, $resp['msg'], true];
-            }
-        }
-    }
-
-    public function query($refill_info)
-    {
-        $params['cpid'] = config::CPID;
-        $params['order_no'] = $refill_info['order_sn'];
-        $params['mobile'] = $refill_info['card_no'];
-        $params['create_time'] = date("YmdHis");
-        $params['sign'] = $this->sign($params);
-
-        $resp = http_request(config::QUERY_URL, $params, 'GET', false, []);
-
-        if (empty($resp)) {
-            return [false, '网络错误'];
-        }
-        else
-        {
-            Log::record($resp, Log::DEBUG);
-            $resp = json_decode($resp, true);
-            if (empty($resp))
-            {
-                return [false, '网络错误'];
-            }
-            else
-            {
-                $status = $resp['status'];
-                if ($status == 0)
-                {
-                    $order_status = $resp['data'];
-                    if ($order_status == 'success') {
-                        $updata['official_sn'] = $resp['operator_serial_number'];
-                        Model('refill_order')->edit($refill_info['order_id'], $updata);
-                        $order_state = ORDER_STATE_SUCCESS;
-                    } elseif ($order_status == 'failed') {
-                        $order_state = ORDER_STATE_CANCEL;
-                    } elseif ($order_status == 'untreated') {
-                        $order_state = ORDER_STATE_SEND;
-                    } else {
-                        return [false, $resp['msg']];
-                    }
-
-                    return [true, $order_state];
-                }
-                elseif ($status == -10013) {
-                    return [true, ORDER_STATE_NOEXIST];
-                }
-                else {
-                    return [false, $resp['msg']];
-                }
-            }
-        }
-    }
-
-    public function balance()
-    {
-        $params['cpid'] = config::CPID;
-        $params['create_time'] = date("YmdHis");
-        $params['sign'] = $this->sign($params);
-
-        $resp = http_request(config::BALANCE_URL, $params, 'GET', false, []);
-
-        if (empty($resp)) {
-            return [false, '网络错误'];
-        } else {
-            Log::record($resp, Log::DEBUG);
-            $resp = json_decode($resp, true);
-            if ($resp['status'] == 0) {
-                return [true, $resp['balance']];
-            } else {
-                return [false, $resp['msg']];
-            }
-        }
-    }
-
-    private function sign($params)
-    {
-        ksort($params);
-        $body = "";
-        foreach ($params as $k => $v) {
-            $body .= "{$k}{$v}";
-        }
-        $body .= config::CPKEY;
-        return md5($body);
-    }
+<?php
+
+namespace refill\sialan_tax;
+
+require_once(BASE_HELPER_RAPI_PATH . '/sialan_tax/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, int $card_type,string $order_sn)
+    {
+        $params['api_id'] = config::API_ID;
+        $params['recharge'] = $phone;
+        $params['amount'] = $amount;
+        $params['type'] = 1;
+        $params['goods_id'] = config::product_id[$card_type][$amount];
+        $params['query_sn'] = $order_sn;
+        $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['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 = json_decode($resp, true);
+            $code = $resp['code'];
+            if (empty($resp)) {
+                return [false, '网络错误', true];
+            } elseif ($code === '0') {
+                return [true, $resp['order_sn'], false];
+            } elseif (in_array($code, config::ERR_NOS, true)) {
+                return [false, $resp['msg'], false];
+            } elseif (in_array($code, ['-10000', '-10010', '-999'], true)) {
+                $net_errno = "HTTP-{$code}";
+                return [false, $resp['msg'], true];
+            } else {
+                $err = 998;
+                $net_errno = "HTTP-{$err}";
+                return [false, $resp['msg'], true];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['api_id'] = config::API_ID;
+        $params['order_sn'] = $refill_info['ch_trade_no'];
+        $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
+            {
+                $code = $resp['code'];
+                if ($code === '0')
+                {
+                    $order_status = $resp['data']['status'];
+                    if ($order_status === '1') {
+                        $updata['official_sn'] = $resp['data']['operator_sn'];
+                        Model('refill_order')->edit($refill_info['order_id'], $updata);
+                        $order_state = ORDER_STATE_SUCCESS;
+                    } elseif ($order_status === '2') {
+                        $order_state = ORDER_STATE_CANCEL;
+                    } elseif ($order_status === '0') {
+                        $order_state = ORDER_STATE_SEND;
+                    } else {
+                        return [false, $order_status];
+                    }
+
+                    return [true, $order_state];
+                }
+                else {
+                    return [false, $resp['msg']];
+                }
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['api_id'] = config::API_ID;
+        $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 ($resp['code'] === '0') {
+                return [true, $resp['balance']];
+            } else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        ksort($params);
+        $content = "";
+        foreach ($params as $k => $v) {
+            $content .= "{$k}={$v}&";
+        }
+        $content = rtrim($content, '&');
+        $content .= config::API_KEY;
+        return md5($content);
+    }
 }

+ 8 - 14
helper/refill/api/xyz/sialan_tax/account.txt

@@ -1,17 +1,11 @@
-下单接口:http://39.98.234.165/api/do
-查单接口:http://39.98.234.165/api/queryorder
-余额接口:http://39.98.234.165/api/querybalance
-
-登录地址:http://39.98.234.165
-帐号:salyz
-密码:123456
-CPID:23412
-CPKEY:dbe2e887fc09bea0b
-
-
-
-https://docs.qq.com/doc/DQmdubmxCdXp6bkxu 
-对接文档
+商户: guoyanyezi
+密码: aaf603b7 (初始密码)
+商户后台: http://120.27.19.82/index/user.html
+API_ID: 16856
+API_KEY: 6f019c452158f107740926092a8200f7
+对接文档: http://120.27.19.82/api.html
+接单地址: http://120.27.19.82:9168
+查询地址: http://120.27.19.82
 
 20001	全国移动10元
 20002	全国移动20元

+ 10 - 10
helper/refill/api/xyz/sialan_tax/config.php

@@ -6,18 +6,18 @@ namespace refill\sialan_tax;
 use mtopcard;
 class config
 {
-    //回调地址需后台设
-    const ORDER_URL = 'http://39.98.234.165/api/do';
-    const QUERY_URL = 'http://39.98.234.165/api/queryorder';
-    const BALANCE_URL = 'http://39.98.234.165/api/querybalance';
+    //回调地址需上游配
+    const ORDER_URL = 'http://120.27.19.82:9168/api/recharge';
+    const QUERY_URL = 'http://120.27.19.82/api/query/order';
+    const BALANCE_URL = 'http://120.27.19.82/api/query/balance';
 
-    const CPID = '23412';
-    const CPKEY = 'dbe2e887fc09bea0b';
+    const API_ID = '16856';
+    const API_KEY = '6f019c452158f107740926092a8200f7';
     const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_sialan_tax.php";
     const operator = [
-        mtopcard\ChinaMobileCard  => 1,
-        mtopcard\ChinaUnicomCard  => 2,
-        mtopcard\ChinaTelecomCard => 3
+        mtopcard\ChinaMobileCard  => 2,
+        mtopcard\ChinaUnicomCard  => 3,
+        mtopcard\ChinaTelecomCard => 4
     ];
     const product_id = [
         mtopcard\ChinaMobileCard  => [
@@ -53,6 +53,6 @@ class config
     ];
 
     const ERR_NOS = [
-        -10001,-10002,-10003,-10004,-10013,-10005,-10006,-10007,-10008,-10009,-10011,-10012,-10015,-10016
+        '-10001','-10002','-10003','-10004','-10005','-10006','-10007','-10008','-10009','-10011','-10012','-10013','-10015','-10016','-10017'
     ];
 }

+ 1 - 3
mobile/callback/refill_sialan.php

@@ -1,6 +1,4 @@
 <?php
 refill\util::push_notify('sialan',$_POST);
 
-$reponse = ["status" => "success"];
-$body = json_encode($reponse);
-echo($body);
+echo ('ok');

+ 1 - 3
mobile/callback/refill_sialan_tax.php

@@ -1,6 +1,4 @@
 <?php
 refill\util::push_notify('sialan_tax',$_POST);
 
-$reponse = ["status" => "success"];
-$body = json_encode($reponse);
-echo($body);
+echo ('ok');

+ 12 - 11
test/TestRefill.php

@@ -566,13 +566,16 @@ class TestRefill extends TestCase
 
     public function testSialan()
     {
-        $provider = new refill\sialan\RefillPhone([]);
-//        $resp = $provider->add(13699279618, 4, 10, ['order_sn' => $this->make_sn()]);
-//        $resp = $provider->query(['order_sn' => '79651627436983840352', 'card_no' => 13699279618]);
-//        $body = '{"cpid":"39780","order_no":"21072809494539780728903528","mobile":"13699279618","amount":"10","status":"success","sz_order_no":"2021072822001158391454773955","ret_para":"79651627436983840352","sign":"aa7e8a2e589660e98319c5546cb432fa"}';
+        $provider = $this->getProvider('sialan');
+//        $resp = $provider->balance();
+//        $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
+        $resp = $provider->query(['ch_trade_no' => '21112214053736552180705']);
+
+//        $body = '{"api_id":"16855","recharge":"18500608333","amount":"10","order_sn":"21112213553615606755893","query_sn":"29151637560521755792","operator_sn":"","status":"2","sign":"32867363957ed9688b8bbdd8f42c08eb"}';
 //        $params = json_decode($body, true);
-//        refill\RefillFactory::instance()->notify('sialan', $params);
-        $resp = $provider->balance();
+//        $provider = $this->getProvider('sialan', 'RefillCallBack');
+//        $ret = $provider->verify($params);
+//        $resp = $provider->notify($params);
     }
 
     public function testMoxj_new()
@@ -911,13 +914,11 @@ class TestRefill extends TestCase
     public function testSialan_tax()
     {
 //        $provider = $this->getProvider('sialan_tax');
-//        $resp = $provider->add(18500608333, 5, 100, [
-//            'order_sn' => $this->make_sn()
-//        ]);
-//        $resp = $provider->query(['order_sn' => '98871630991459034712', 'card_no' => 18500608333]);
 //        $resp = $provider->balance();
+//        $resp = $provider->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
+//        $resp = $provider->query(['ch_trade_no' => '21112214170092559557647']);
 
-        $body = '{"cpid":"23412","order_no":"21090713111223412478608977","mobile":"18500608333","amount":"100","status":"success","sz_order_no":"11010335O202109071311130276561","ret_para":"98871630991459034712","sign":"82cf6e08339f5b859e8946cc7c2a5e14"}';
+        $body = '{"api_id":"16856","recharge":"18500608333","amount":"10","order_sn":"21112214170092559557647","query_sn":"64801637561821444619","operator_sn":"","status":"2","sign":"900a01a1268cb14a37d6567691303ed9"}';
         $params = json_decode($body, true);
         $provider = $this->getProvider('sialan_tax', 'RefillCallBack');
         $ret = $provider->verify($params);