Jelajahi Sumber

afandnew feiniao debug

ayHaru 4 tahun lalu
induk
melakukan
f9a00e4e56

+ 290 - 224
data/config/win/refill.ini.php

@@ -2,297 +2,363 @@
 
 global $config;
 
-$config['refill_oil_specs'] = [100 , 200 , 500 , 1000 , 2000];
-$config['refill_phone_specs'] = [10 , 20 , 30 , 50 , 100 , 200 , 300 , 500];
+$config['refill_oil_specs'] = [100, 200, 500, 1000, 2000];
+$config['refill_phone_specs'] = [10, 20, 30, 50, 100, 200, 300, 500];
+
 //充值额度基本表
 $config['refill_specs'] = [
-    'petrochina'    => $config['refill_oil_specs'],
-    'sinopec'       => $config['refill_oil_specs'],
-    'chinamobile'   => $config['refill_phone_specs'],
-    'chinaunicom'   => $config['refill_phone_specs'],
-    'chinatelecom'  => $config['refill_phone_specs']
+    'petrochina'  => $config['refill_oil_specs'],
+    'sinopec'     => $config['refill_oil_specs'],
+    'chinamobile' => $config['refill_phone_specs'],
+    'chinaunicom' => $config['refill_phone_specs'],
+    'chinatelecom' => $config['refill_phone_specs']
 ];
 
-
 //充值渠道配置表
-$oil_providers = [];
+//速汇充京东加油通道
+$tianjt_oil = ['name' => 'tianjt', 'store_id' => 7,'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 6290, 'price' => 97.0, 'quality' => 1, 'card_type' => 'sinopec']],
+        200 => [['goods_id' => 6291, 'price' => 194, 'quality' => 1, 'card_type' => 'sinopec']],
+        500 => [['goods_id' => 6292, 'price' => 485, 'quality' => 1, 'card_type' => 'sinopec']],
+        1000 => [['goods_id' => 6293, 'price' => 970, 'quality' => 1, 'card_type' => 'sinopec']]
+    ],
+    'period' => ['start' => '8:30', 'end' => '22:20'], 'refill_type' => 'api'];
+
+//速汇充天猫加油通道
+$suhctm_oil = ['name' => 'suhctm', 'store_id' => 7,'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 6290, 'price' => 96.8, 'quality' => 1, 'card_type' => 'sinopec']],
+        200 => [['goods_id' => 6291, 'price' => 193.6, 'quality' => 1, 'card_type' => 'sinopec']],
+        500 => [['goods_id' => 6292, 'price' => 484, 'quality' => 1, 'card_type' => 'sinopec']],
+        1000 => [['goods_id' => 6293, 'price' => 968, 'quality' => 1, 'card_type' => 'sinopec']]
+    ],
+    'period' => ['start' => '8:30', 'end' => '22:20'], 'refill_type' => 'api'];
+
+$suhcpdd_oil = ['name' => 'suhcpdd', 'store_id' => 7,'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 6290, 'price' => 96.8, 'quality' => 1, 'card_type' => 'sinopec']],
+        200 => [['goods_id' => 6291, 'price' => 193.6, 'quality' => 1, 'card_type' => 'sinopec']],
+        500 => [['goods_id' => 6292, 'price' => 484, 'quality' => 1, 'card_type' => 'sinopec']],
+        1000 => [['goods_id' => 6293, 'price' => 968, 'quality' => 1, 'card_type' => 'sinopec']]
+    ],
+    'period' => ['start' => '8:30', 'end' => '22:20'], 'refill_type' => 'api'];
+
+//赵梓暄提供的加油通道
+$zzx_oil = ['name' => 'zzx', 'store_id' => 13,'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 6307, 'price' => 97.8, 'quality' => 1, 'card_type' => 'petrochina,sinopec']],
+        200 => [['goods_id' => 6308, 'price' => 195.6, 'quality' => 1, 'card_type' => 'petrochina,sinopec']],
+        500 => [['goods_id' => 6309, 'price' => 489, 'quality' => 1, 'card_type' => 'petrochina,sinopec']],
+        1000 => [['goods_id' => 6310, 'price' => 978, 'quality' => 1, 'card_type' => 'petrochina,sinopec']]
+    ],
+    'refill_type' => 'api'];
+
+//赵梓暄提供的加油通道
+$lx_oil = ['name' => 'lx', 'store_id' => 14,'qualitys' => '1',
+    'amount' => [
+        500 => [['goods_id' => 6322, 'price' => 479, 'quality' => 1, 'card_type' => 'sinopec']],
+        1000 => [['goods_id' => 6311, 'price' => 958, 'quality' => 1, 'card_type' => 'sinopec']] //,
+//        2000 => ['goods_id' => 6322, 'price' => 1916]
+    ],
+    'period' => ['start' => '14:00', 'end' => '19:00'], 'official_sn' => true, 'refill_type' => 'inner_store'];
+
+//赛虎
+$saihu_oil = ['name' => 'saihu', 'store_id' => 15,'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 6313, 'price' => 97, 'quality' => 1, 'card_type' => 'sinopec']],
+        200 => [['goods_id' => 6314, 'price' => 194, 'quality' => 1, 'card_type' => 'sinopec']],
+        500 => [['goods_id' => 6315, 'price' => 485, 'quality' => 1, 'card_type' => 'sinopec']],
+        1000 => [['goods_id' => 6316, 'price' => 970, 'quality' => 1, 'card_type' => 'sinopec']],
+        2000 => [['goods_id' => 6317, 'price' => 1940, 'quality' => 1, 'card_type' => 'sinopec']]
+    ],
+    'refill_type' => 'api'];
+
+#官方中石油通道
+$gftd_oil = ['name' => 'gftd', 'store_id' => 19,'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 6339, 'price' => 95, 'quality' => 1, 'card_type' => 'petrochina']],
+        200 => [['goods_id' => 6340, 'price' => 190, 'quality' => 1, 'card_type' => 'petrochina']],
+        500 => [['goods_id' => 6341, 'price' => 475, 'quality' => 1, 'card_type' => 'petrochina']],
+        1000 => [['goods_id' => 6342, 'price' => 950, 'quality' => 1, 'card_type' => 'petrochina']]
+    ],
+    'period' => [], 'refill_type' => 'api'];
+
+#官方中石化通道
+$gftdsinop_oil = ['name' => 'gftdsinop', 'store_id' => 20,'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 6343, 'price' => 95, 'quality' => 1, 'card_type' => 'sinopec']],
+        200 => [['goods_id' => 6344, 'price' => 190, 'quality' => 1, 'card_type' => 'sinopec']],
+        500 => [['goods_id' => 6345, 'price' => 475, 'quality' => 1, 'card_type' => 'sinopec']],
+        1000 => [['goods_id' => 6346, 'price' => 950, 'quality' => 1, 'card_type' => 'sinopec']]
+    ],
+    'period' => [], 'refill_type' => 'api'];
+
+$oil_providers = [
+    ['name' => 'tianjt', 'cfg' => $tianjt_oil],
+    ['name' => 'suhctm', 'cfg' => $suhctm_oil],
+    ['name' => 'suhcpdd', 'cfg' => $suhcpdd_oil],
+    ['name' => 'zzx', 'cfg' => $zzx_oil],
+    ['name' => 'lx', 'cfg' => $lx_oil],
+    ['name' => 'saihu', 'cfg' => $saihu_oil],
+    ['name' => 'gftd', 'cfg' => $gftd_oil],
+    ['name' => 'gftdsinop', 'cfg' => $gftdsinop_oil]
+];
 $config['oil_providers'] = $oil_providers;
 
+$beixt_phone = ['name' => 'beixt', 'store_id' => 8,'qualitys' => '1',
+    'amount' => [
+        50 => [['goods_id' => 6295, 'price' => 48.75, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6296, 'price' => 97.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6297, 'price' => 195,  'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'refill_type' => 'api'];
 
-$baizeyd = ['name' => 'baizeyd', 'store_id' => 32,'qualitys' => '1',
+$bxtwt_phone = ['name' => 'bxtwt', 'store_id' => 10,'qualitys' => '1',
     'amount' => [
-        10 => [
-            ['goods_id' => 1, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
-        30 => [
-            ['goods_id' => 3, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
-        50 => [
-            ['goods_id' => 4, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
-        100 => [
-            ['goods_id' => 5, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
-        200 => [
-            ['goods_id' => 6, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
+        50 => [['goods_id' => 6298, 'price' => 48,   'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6299, 'price' => 96,  'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6300, 'price' => 192, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
-    'official_sn' => true, 'refill_type' => 'api'];
+    'refill_type' => 'api'];
 
+$bjb_phone = ['name' => 'bjb', 'store_id' => 12,'qualitys' => '1',
+    'amount' => [
+        10 => [['goods_id' => 6305, 'price' => 9.51,  'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6306, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6301, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6302, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6303, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6304, 'price' => 190.20, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6327, 'price' => 285.30, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6328, 'price' => 475.50, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
 
-$aming_phone = ['name' => 'aming', 'store_id' => 34,'qualitys' => '1',
+$lingzh_phone = ['name' => 'lingzh', 'store_id' => 28,'qualitys' => '1,5',
     'amount' => [
         10 => [
-            ['goods_id'  => 9, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6389, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6389, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6389, 'price' => 9.20, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         20 => [
-            ['goods_id' => 10, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6390, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6390, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6390, 'price' => 18.40, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         30 => [
-            ['goods_id' => 11, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6391, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6391, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6391, 'price' => 27.60, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         50 => [
-            ['goods_id' => 12, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6392, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6392, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6392, 'price' => 46.00, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
         ],
         100 => [
-            ['goods_id' => 13, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6393, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6393, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6393, 'price' => 92.0, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         200 => [
-            ['goods_id' => 14, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6394, 'price' => 190.60, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6394, 'price' => 190.20, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6394, 'price' => 184.00, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         300 => [
-            ['goods_id' => 15, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6395, 'price' => 285.90, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6395, 'price' => 285.30, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6395, 'price' => 276.00, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         500 => [
-            ['goods_id' => 16, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
+            ['goods_id' => 6396, 'price' => 476.50, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6396, 'price' => 475.50, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
+            ['goods_id' => 6396, 'price' => 460.00, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$binghc_phone = ['name' => 'binghc', 'store_id' => 35,'qualitys' => '1',
+//$lingzhdl_phone = ['name' => 'lingzhdl', 'store_id' => 29, 'qualitys' => '1',
+//    'amount' => [
+//        10 => [['goods_id' => 6397, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        20 => [['goods_id' => 6398, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        30 => [['goods_id' => 6399, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        50 => [['goods_id' => 6400, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//
+//        100 => [['goods_id' => 6401, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        200 => [['goods_id' => 6402, 'price' => 190.20, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        300 => [['goods_id' => 6403, 'price' => 285.30, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+//        500 => [['goods_id' => 6404, 'price' => 475.50, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
+//    ],
+//    'official_sn' => true, 'refill_type' => 'api'];
+
+$bjbyd_phone = ['name' => 'bjbyd', 'store_id' => 24,'qualitys' => '1',
     'amount' => [
-        10 => [
-            ['goods_id' => 17, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 18, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 19, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 20, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 21, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 22, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 23, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        500 => [
-            ['goods_id' => 24, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
+        30 => [['goods_id' => 6367, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 6368, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 6369, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 6370, 'price' => 190.2, 'quality' => 1, 'card_type' => 'chinamobile']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$ruishun_phone = ['name' => 'ruishun', 'store_id' => 36,'qualitys' => '1',
+$afandnew_phone = ['name' => 'afandnew', 'store_id' => 25,'qualitys' => '1',
     'amount' => [
-        10 => [
-            ['goods_id' => 25, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 26, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 27, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 28, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 29, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 30, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 31, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
-        500 => [
-            ['goods_id' => 32, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
-        ],
+        50 => [['goods_id' => 6371, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6372, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6373, 'price' => 191, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'refill_type' => 'api'];
+
+$tianx_phone = ['name' => 'tianx', 'store_id' => 25,'qualitys' => '1',
+    'amount' => [
+        50 => [['goods_id' => 6371, 'price' => 46.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6372, 'price' => 93,  'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6373, 'price' => 186, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'refill_type' => 'api'];
+
+$yifa_phone = ['name' => 'yifa', 'store_id' => 16,'qualitys' => '1',
+    'amount' => [
+        30 => [['goods_id' => 6318, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 6319, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 6320, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 6321, 'price' => 191,  'quality' => 1, 'card_type' => 'chinamobile']]
+    ],
+    'refill_type' => 'api'];
+
+$jiec_phone = ['name' => 'jiec', 'store_id' => 17,'qualitys' => '1',
+    'amount' => [
+        30 => [['goods_id' => 6323, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6324, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6325, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6326, 'price' => 191, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6329, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6330, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$wuchen_phone = ['name' => 'wuchen', 'store_id' => 37,'qualitys' => '1',
+$weit_phone = ['name' => 'weit', 'store_id' => 18,'qualitys' => '1',
     'amount' => [
-        10 => [
-            ['goods_id' => 33, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 34, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 35, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 36, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 37, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 38, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 39, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        500 => [
-            ['goods_id' => 40, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
+        10 => [['goods_id' => 6337, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6338, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6331, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6332, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6333, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6334, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6335, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6336, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$yibao_phone = ['name' => 'yibao', 'store_id' => 38,'qualitys' => '1',
+$afand_phone = ['name' => 'afand', 'store_id' => 26,'qualitys' => '1',
     'amount' => [
-        30 => [
-            ['goods_id' => 41, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 42, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 43, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 44, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
+        30 => [['goods_id' => 6374, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6375, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6376, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6377, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6378, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6379, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$amingyd_phone = ['name' => 'amingyd', 'store_id' => 39,'qualitys' => '1',
+$afandeng_phone = ['name' => 'afandeng', 'store_id' => 27,'qualitys' => '1',
     'amount' => [
-        30 => [
-            ['goods_id' => 45, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
-        50 => [
-            ['goods_id' => 46, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
-        100 => [
-            ['goods_id' => 47, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
-        200 => [
-            ['goods_id' => 48, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']
-        ],
+        10 => [['goods_id' => 6406, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6407, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6380, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6381, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6382, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6383, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6384, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6385, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$chuka_phone = ['name' => 'chuka', 'store_id' => 40,'qualitys' => '1',
+$tongy_phone = ['name' => 'tongy', 'store_id' => 31,'qualitys' => '2',
     'amount' => [
-        20 => [
-            ['goods_id' => 49, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom']
-        ],
-        30 => [
-            ['goods_id' => 50, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom']
-        ],
-        50 => [
-            ['goods_id' => 51, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom']
-        ],
-        100 => [
-            ['goods_id' => 52, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom']
-        ],
+        30 => [['goods_id' => 6408, 'price' => 29.76, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6408, 'price' => 29.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6408, 'price' => 29.64, 'quality' => 2, 'card_type' => 'chinatelecom']],
+
+        50 => [['goods_id' => 6409, 'price' => 49.6, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6409, 'price' => 48.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6409, 'price' => 49.4, 'quality' => 2, 'card_type' => 'chinatelecom']],
+
+        100 => [['goods_id' => 6410, 'price' => 99.2, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6410, 'price' => 97.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6410, 'price' => 98.8, 'quality' => 2, 'card_type' => 'chinatelecom']],
+
+        200 => [['goods_id' => 6411, 'price' => 198.4, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6411, 'price' => 194.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6411, 'price' => 197.6, 'quality' => 2, 'card_type' => 'chinatelecom']],
+
+        300 => [['goods_id' => 6412, 'price' => 297.6, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6412, 'price' => 291.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6412, 'price' => 296.4, 'quality' => 2, 'card_type' => 'chinatelecom']],
+
+        500 => [['goods_id' => 6413, 'price' => 496, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6413, 'price' => 486.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 6413, 'price' => 494, 'quality' => 2, 'card_type' => 'chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$amingjd_phone = ['name' => 'amingjd', 'store_id' => 41,'qualitys' => '5',
+$weiyi_phone = ['name' => 'weiyi', 'store_id' => 32,'qualitys' => '1',
     'amount' => [
-        30 => [
-            ['goods_id' => 55, 'price' => 27, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 56, 'price' => 45, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 53, 'price' => 90, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 54, 'price' => 180, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ]
+        10 => [['goods_id' => 6414, 'price' => 9.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6415, 'price' => 19.2, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6416, 'price' => 28.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6417, 'price' => 48, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6418, 'price' => 96, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6419, 'price' => 192, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6420, 'price' => 288, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6421, 'price' => 480, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$legou_phone = ['name' => 'legou', 'store_id' => 42,'qualitys' => '3',
+$tonglu_phone = ['name' => 'tonglu', 'store_id' => 33,'qualitys' => '4',
     'amount' => [
-        10 => [
-            ['goods_id' => 57, 'price' => 9.7, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 58, 'price' => 19.4, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 59, 'price' => 29.1, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 60, 'price' => 48.5, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 61, 'price' => 97, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 62, 'price' => 194, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 63, 'price' => 291, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        500 => [
-            ['goods_id' => 64, 'price' => 485, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
+        10 => [['goods_id' => 6422, 'price' => 9.4, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6423, 'price' => 18.8, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6424, 'price' => 28.2, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6425, 'price' => 47, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6426, 'price' => 94, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6427, 'price' => 188, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6428, 'price' => 282, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6429, 'price' => 470, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$feiniao_phone = ['name' => 'feiniao', 'store_id' => 44,'qualitys' => '1',
+$xc_phone = ['name' => 'xc', 'store_id' => 34, 'qualitys' => '4',
     'amount' => [
-        10 => [
-            ['goods_id' => 65, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        20 => [
-            ['goods_id' => 66, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        30 => [
-            ['goods_id' => 67, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        50 => [
-            ['goods_id' => 68, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        100 => [
-            ['goods_id' => 69, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        200 => [
-            ['goods_id' => 70, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        300 => [
-            ['goods_id' => 71, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
-        500 => [
-            ['goods_id' => 72, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ],
+        10 => [['goods_id' => 6430, 'price' => 9.6, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6431, 'price' => 19.2, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6432, 'price' => 28.8, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6433, 'price' => 48, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6434, 'price' => 96, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6435, 'price' => 192, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6436, 'price' => 288, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6437, 'price' => 480, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
 $phone_providers = [
-    ['name' => 'baizeyd', 'cfg' => $baizeyd, 'opened' => true, 'sort' => 1],
-    ['name' => 'aming', 'cfg' => $aming_phone, 'opened' => true, 'sort' => 1],
-    ['name' => 'binghc', 'cfg' => $binghc_phone, 'opened' => true, 'sort' => 1],
-    ['name' => 'ruishun', 'cfg' => $ruishun_phone, 'opened' => true, 'sort' => 1],
-    ['name' => 'wuchen', 'cfg' => $wuchen_phone, 'opened' => true, 'sort' => 1],
-    ['name' => 'yibao', 'cfg' => $yibao_phone, 'opened' => true, 'sort' => 1],
-    ['name' => 'amingyd', 'cfg' => $amingyd_phone, 'opened' => true, 'sort' => 1],
-    ['name' => 'chuka', 'cfg' => $chuka_phone, 'opened' => true, 'sort' => 1],
-    ['name' => 'amingjd', 'cfg' => $amingjd_phone],
-    ['name' => 'legou', 'cfg' => $legou_phone],
-    ['name' => 'feiniao', 'cfg' => $feiniao_phone],
+//    ['name' => 'beixt', 'cfg' => $beixt_phone],
+//    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
+//    ['name' => 'bjb', 'cfg' => $bjb_phone],
+//    ['name' => 'bjbyd', 'cfg' => $bjbyd_phone],
+//    ['name' => 'yifa', 'cfg' => $yifa_phone],
+//    ['name' => 'jiec', 'cfg' => $jiec_phone],
+//    ['name' => 'weit', 'cfg' => $weit_phone],
+
+    ['name' => 'afand', 'cfg' => $afand_phone],
+    ['name' => 'afandeng', 'cfg' => $afandeng_phone],
+    ['name' => 'afandnew', 'cfg' => $afandnew_phone],
+    ['name' => 'lingzh', 'cfg' => $lingzh_phone],
+    ['name' => 'tongy', 'cfg' => $tongy_phone],
+    ['name' => 'weiyi', 'cfg' => $weiyi_phone],
+    ['name' => 'tonglu', 'cfg' => $tonglu_phone],
+    ['name' => 'xc', 'cfg' => $xc_phone]
 ];
 $config['phone_providers'] = $phone_providers;

+ 1 - 2
helper/refill/api/lingzh/feiniao/config.php

@@ -12,6 +12,5 @@ class config
 
     const SID = '16169989196195774444';
     const KEY = 'o9IDsycJXqxIeDVPkZ0ldMEO24rkX3Eg1bnupCPzV6rjWtqaImIidQCrMPIezDvM';
-//    const NOTIFY_URL = BASE_SITE_URL . "/racc/callback/lingzh/feiniao.php";
-    const NOTIFY_URL =  "https://www.xyzshops.cn/mobile/signature.php";
+    const NOTIFY_URL = BASE_SITE_URL . "/racc/callback/lingzh/feiniao.php";
 }

+ 9 - 12
helper/refill/api/xyz/afandnew/RefillCallBack.php

@@ -5,7 +5,6 @@ namespace refill\afandnew;
 
 require_once(BASE_HELPER_RAPI_PATH . '/afandnew/config.php');
 
-
 use refill;
 
 class RefillCallBack implements refill\IRefillCallBack
@@ -39,12 +38,12 @@ class RefillCallBack implements refill\IRefillCallBack
     {
         $content = '';
         ksort($params);
-        foreach ($params as $key => $val){
+        foreach ($params as $key => $val) {
             if (false === $this->check_empty($val) && "@" != substr($val, 0, 1)) {
                 $content .= "{$key}={$val}&";
             }
         }
-        $content .= "key=".config::KEY;
+        $content .= "key=" . config::KEY;
 
         return strtoupper(md5($content));
     }
@@ -55,21 +54,19 @@ class RefillCallBack implements refill\IRefillCallBack
         $order_sn = $params['orderNo'];
         $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
         if (empty($order_info)) {
-            return [false, false, false,false];
+            return [false, false, false, false];
         }
         $order_id = $order_info['order_id'];
-        
+
         $data['official_sn'] = strtolower($params['carrierOrderNo']) == 'null' ? '' : $params['carrierOrderNo'];
 
         if ($status === 2) {
             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];
+            return [$order_id, true, false, true];
+        } elseif ($status === 3) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
         }
     }
 }

+ 14 - 10
helper/refill/api/xyz/afandnew/RefillPhone.php

@@ -28,10 +28,13 @@ class RefillPhone extends refill\IRefillPhone
     {
         $params = $this->req_params($card_no, $amount, $params['order_sn']);
         $params['productNo'] = config::ProductIDS[$card_type][$amount];
+        if (empty($params['productNo'])) {
+            return [false, '产品编号错误', false];
+        }
         $sign = $this->sign($params);
         $params['sign'] = $sign;
 
-        $resp = http_request(config::ORDER_URL, $params , 'POST' , false , config::ExtHeaders);
+        $resp = http_request(config::ORDER_URL, $params, 'POST', false, config::ExtHeaders);
         if ($resp === false) {
             return [false, '系统错误', true];
         } else {
@@ -51,28 +54,29 @@ class RefillPhone extends refill\IRefillPhone
         $params['appId'] = config::APP_ID;
         $sign = $this->sign($params);
         $params['sign'] = $sign;
-        $resp = http_request(config::QUERY_URL, $params , 'POST' , false , config::ExtHeaders);
+        $resp = http_request(config::QUERY_URL, $params, 'POST', false, config::ExtHeaders);
         if ($resp === false) {
             return [false, '系统错误'];
         } else {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
-            if($resp == false) {
+            if ($resp == false) {
                 return [false, '系统错误'];
             }
             if ($resp['code'] == 200) {
                 $order_state = -1;
-                if ($resp['orderStatus'] == 2) {
+                $data = $resp['data'];
+                if ($data['orderStatus'] == 2) {
                     $order_state = ORDER_STATE_SUCCESS;
-                    $updata['official_sn'] = strtolower($resp['carrierOrderNo']) == 'null' ? '' : $resp['carrierOrderNo'];
+                    $updata['official_sn'] = strtolower($data['carrierOrderNo']) == 'null' ? '' : $data['carrierOrderNo'];
                     Model('refill_order')->edit($refill_info['order_id'], $updata);
-                } elseif ($resp['orderStatus'] == 3) {
+                } elseif ($data['orderStatus'] == 3) {
                     $order_state = ORDER_STATE_CANCEL;
-                } elseif ($resp['orderStatus'] == 1){
+                } elseif ($data['orderStatus'] == 1) {
                     $order_state = ORDER_STATE_SEND;
                 }
                 if ($order_state == -1) {
-                    return [false, $resp['data']];
+                    return [false, $resp['msg']];
                 }
                 return [true, $order_state];
             } else {
@@ -85,12 +89,12 @@ class RefillPhone extends refill\IRefillPhone
     {
         $content = '';
         ksort($params);
-        foreach ($params as $key => $val){
+        foreach ($params as $key => $val) {
             if (false === $this->check_empty($val) && "@" != substr($val, 0, 1)) {
                 $content .= "{$key}={$val}&";
             }
         }
-        $content .= "key=".config::KEY;
+        $content .= "key=" . config::KEY;
 
         return strtoupper(md5($content));
     }

+ 1 - 2
helper/refill/api/xyz/afandnew/config.php

@@ -11,8 +11,7 @@ class config
 
     const APP_ID = 'RC5229f3ef515e4b34adfb9aa251b5e15e';
     const KEY = '9803e5a3e4984ea4b8f847de28f22e2f';
-//    const NOTIFY_URL =  BASE_SITE_URL."/mobile/refill_afandnew.php";
-    const NOTIFY_URL =  "https://www.xyzshops.cn/mobile/signature.php";
+    const NOTIFY_URL =  BASE_SITE_URL."/mobile/refill_afandnew.php";
     const ExtHeaders = ['Content-Type: application/x-www-form-urlencoded'];
     const ProductIDS = [
         4 => [50 => '2110000050000', 100 => '21100000100000', 200 => '21100000200101'],

TEMPAT SAMPAH
helper/refill/api/xyz/afandnew/~$灯充值系统2.2.doc


+ 3 - 2
mobile/refill_afandnew.php

@@ -1,6 +1,7 @@
 <?php
-
-refill\util::push_notify('afandnew',$_POST);
+$content = $_SERVER['post_content'];
+$input = json_decode($content,true);
+refill\util::push_notify('afandnew',$input);
 
 echo ('success');
 

+ 101 - 122
test/TestRefill.php

@@ -68,7 +68,7 @@ class TestRefill extends TestCase
     public function testRandomMobile()
     {
         $no = "1" . mt_rand(1, 9999999999);
-        Log::record("phone no={$no}",Log::DEBUG);
+        Log::record("phone no={$no}", Log::DEBUG);
     }
 
     public function testBJBAddPhone()
@@ -91,7 +91,7 @@ class TestRefill extends TestCase
     public function testBjbRet()
     {
         $resp = '0|提交成功|14936.8600';
-        $resp = explode('|' , $resp);
+        $resp = explode('|', $resp);
     }
 
     public function testIpWhiteList()
@@ -130,29 +130,26 @@ class TestRefill extends TestCase
 
     private function parse_request($squery)
     {
-        if(empty($squery)) return [];
+        if (empty($squery)) return [];
 
         $result = [];
         $params = preg_split('/&/', $squery);
-        foreach ($params as $pair)
-        {
-            if(empty($pair)) continue;
+        foreach ($params as $pair) {
+            if (empty($pair)) continue;
 
             $kv = explode('=', $pair);
             $count = count($kv);
-            if($count === 1) {
+            if ($count === 1) {
                 $key = $kv[0];
                 $val = "";
-            }
-            elseif($count === 2) {
+            } elseif ($count === 2) {
                 $key = $kv[0];
                 $val = urldecode($kv[1]);
-            }
-            else {
+            } else {
                 continue;
             }
 
-            if(!empty($key)) {
+            if (!empty($key)) {
                 $result[$key] = $val;
             }
         }
@@ -170,7 +167,7 @@ class TestRefill extends TestCase
         $input['sign'] = 'c925ad19c63c3eb36ffc52d938e24604';
         $input['amount'] = '10.00';
         $input['op_no'] = '42601615096072517841';
-        refill\RefillFactory::instance()->notify('aming',$input);
+        refill\RefillFactory::instance()->notify('aming', $input);
     }
 
     public function testBhcPhone()
@@ -198,7 +195,7 @@ class TestRefill extends TestCase
         $input['sign'] = 'e234f7d1c0458ca236f53a0008436b46';
         $input['amount'] = "10.00";
         $input['op_no'] = '76361615095403188513';
-        refill\RefillFactory::instance()->notify('ruishun',$input);
+        refill\RefillFactory::instance()->notify('ruishun', $input);
     }
 
     public function testWuchenPhone()
@@ -249,7 +246,7 @@ class TestRefill extends TestCase
         $params['number'] = '18500608333';
         $params['money'] = '20';
         $params['amount'] = '0';
-        refill\RefillFactory::instance()->notify('chuka',$params);
+        refill\RefillFactory::instance()->notify('chuka', $params);
 
     }
 
@@ -293,7 +290,7 @@ class TestRefill extends TestCase
     public function testTongyPhone()
     {
         $providers = new refill\tongy\RefillPhone([]);
-        $resp = $providers->add('18500608333', 5, 30, ['order_sn' => '690653407667699667' , 'order_id' => 248 , 'buyer_id' => 52667]);
+        $resp = $providers->add('18500608333', 5, 30, ['order_sn' => '690653407667699667', 'order_id' => 248, 'buyer_id' => 52667]);
     }
 
     public function testWeiyiPhone()
@@ -324,15 +321,15 @@ class TestRefill extends TestCase
 //        $resp = $providers->add(13699279618, 5, 30, ['order_sn' => $this->make_sn()]);
 //        $resp = $providers->query(['order_sn' => '42301616475989518588']);
         $body = '{"order_id":"83321616478215494884","mchid":"10003","tel":"13699279618","price":"30.00","sign":"01c49620c155a80bc43cecc2b1651868","status":"0","out_order_id":"0"}';
-        $params = json_decode($body , true);
-        refill\RefillFactory::instance()->notify('amingjd',$params);
+        $params = json_decode($body, true);
+        refill\RefillFactory::instance()->notify('amingjd', $params);
     }
 
     public function testPrice()
     {
-        $amounts = [10,20,30,50,100,200,300,500];
+        $amounts = [10, 20, 30, 50, 100, 200, 300, 500];
         $rate = 0.97;
-        foreach ($amounts as $amount){
+        foreach ($amounts as $amount) {
             $price[] = $amount * $rate;
         }
 
@@ -363,7 +360,7 @@ class TestRefill extends TestCase
     {
         $providers = new refill\afand\RefillPhone([]);
 //        for ($i = 3; $i > 0; --$i) {
-            $resp = $providers->query(['order_sn' => '540668612768904780']);
+        $resp = $providers->query(['order_sn' => '540668612768904780']);
 //        }
     }
 
@@ -371,7 +368,7 @@ class TestRefill extends TestCase
     {
         $providers = new refill\afandeng\RefillPhone([]);
 //        for ($i = 5; $i > 0; --$i) {
-            $resp = $providers->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
+        $resp = $providers->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
 //        }
 //        $resp = $providers->query(['order_sn' => '20941616115610023539']);
 //        $params['usr'] = 'afandeng';
@@ -400,16 +397,11 @@ class TestRefill extends TestCase
     public function testAfandnewPhone()
     {
         $providers = new refill\afandnew\RefillPhone([]);
-        $resp = $providers->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
-//        $resp = $providers->query(['order_sn' => '54481615109732967195']);
-//        $input['order_id'] = '54481615109732967195';
-//        $input['mchid'] = 10002;
-//        $input['tel'] = 13699279618;
-//        $input['price'] = '30.00';
-//        $input['status'] = 0;
-//        $input['out_order_id'] = '0';
-//        $input['sign'] = '26b0baef38daba7f423da23bfe56e3e0';
-//        refill\RefillFactory::instance()->notify('afandnew',$input);
+//        $resp = $providers->add(18500608333, 5, 100, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '45371617101073876975', 'ch_trade_no' => '33018443659736309']);
+        $params = '{"amount":"100","carrierOrderNo":null,"mobile":"18500608333","orderNo":"45371617101073876975","orderStatus":3,"sign":"8DE392AD6B4730AD9EE0FC2B95BBDF17","tradeNo":"33018443659736309"}';
+        $input = json_decode($params, true);
+        refill\RefillFactory::instance()->notify('afandnew', $input);
     }
 
     public function testYifaPhone()
@@ -428,7 +420,7 @@ class TestRefill extends TestCase
     public function testWeitPhone()
     {
         $providers = new refill\weit\RefillPhone([]);
-        for ($i = 0;$i<=10;$i++){
+        for ($i = 0; $i <= 10; $i++) {
             $resp = $providers->add(18500608333, 5, 10, ['order_sn' => $this->make_sn()]);
         }
     }
@@ -444,14 +436,14 @@ class TestRefill extends TestCase
         $params['pay_type'] = '';
         $params['tel'] = 18500608333;
         $params['mchid'] = 10014;
-        $resp = http_request($this->mReqHost . "/mobile/refill_weit.php", $params , 'POST');
+        $resp = http_request($this->mReqHost . "/mobile/refill_weit.php", $params, 'POST');
     }
 
     public function testYifaCB()
     {
         $body = '{"app_id":"e4a61b2acf1119c72c1ed9b61781494e","nonce_str":"OQMEBRQWJGPKOWYUXDVPTNMLEQJHXFWG","timestamp":1610275083,"order_sn":"161027325773032634","coder_order_sn":"60641610273255214687","isp_order_sn":null,"phone":"15120035568","amount":"94.000","discount":"0.9400","create_time":"2021-01-10 18:07:42","recharge_time":"","status":"fail","channel_id":3,"sign":"47278AD74EFA7F5FC8DE3A6D362C409B"}';
-        $input = json_decode($body,true);
-        refill\RefillFactory::instance()->notify('yifa',$input);
+        $input = json_decode($body, true);
+        refill\RefillFactory::instance()->notify('yifa', $input);
     }
 
     public function testBjbQuery()
@@ -497,7 +489,7 @@ class TestRefill extends TestCase
     {
         $data = '{"channelOrderNumber":"79091610959059372019","orderNumber":"GYFL1610959060397001","message":"充值成功","signature":"881036222bd8f067ff47d248c75f4c8d","voucher":"","status":101}';
         $url = "http://192.168.1.220/mobile/refill_gftd.php?" . $data;
-        $resp = http_post_data($url, $data, ['Content-Type: application/json;charset=UTF-8;','Accept:application/json;charset=UTF-8;']);
+        $resp = http_post_data($url, $data, ['Content-Type: application/json;charset=UTF-8;', 'Accept:application/json;charset=UTF-8;']);
     }
 
     public function testJiecPhone()
@@ -774,20 +766,20 @@ class TestRefill extends TestCase
 
     public function testCheckphone()
     {
-        $check = function($phone){
+        $check = function ($phone) {
             $url = 'https://mobileempty.shumaidata.com/mobileempty';
             $params['mobile'] = $phone;
             $headers = array();
             array_push($headers, "Authorization:APPCODE " . '8f92d951293f4d2ea48ff86d5a70c537');
-            $resp = http_request($url,$params,'GET',false,$headers);
-            $resp = json_decode($resp , true);
-            if($resp['success'] == true && $resp['code'] == 200) {
-                Log::record("data phone:{$phone} , status : {$resp['data']['status']}" , Log::DEBUG);
-                if(in_array($resp['data']['status'] , [0,3,4,5])){
+            $resp = http_request($url, $params, 'GET', false, $headers);
+            $resp = json_decode($resp, true);
+            if ($resp['success'] == true && $resp['code'] == 200) {
+                Log::record("data phone:{$phone} , status : {$resp['data']['status']}", Log::DEBUG);
+                if (in_array($resp['data']['status'], [0, 3, 4, 5])) {
                     return false;
                 }
-            }else{
-                Log::record("data phone:{$phone} , 不支持的号段" , Log::DEBUG);
+            } else {
+                Log::record("data phone:{$phone} , 不支持的号段", Log::DEBUG);
             }
         };
         $check(17801048874);
@@ -826,7 +818,7 @@ class TestRefill extends TestCase
     public function testCallMech()
     {
         $logic = Logic('queue');
-        $logic->NotifyMerchantComplete(['order_id' => 18171,'manual' => true]);
+        $logic->NotifyMerchantComplete(['order_id' => 18171, 'manual' => true]);
     }
 
     //docker-compose run phpcli php /var/www/html/phpunit-9.2.5.phar --filter "/(TestRefill::testCallMech)( .*)?$/" --test-suffix TestRefill.php /var/www/html/test
@@ -970,7 +962,7 @@ class TestRefill extends TestCase
     public function testCall()
     {
         $order_id = 14974;
-        QueueClient::async_push("NotifyMerchantComplete", ['order_id' => $order_id,'manual' => true], 10);
+        QueueClient::async_push("NotifyMerchantComplete", ['order_id' => $order_id, 'manual' => true], 10);
     }
 
     public function testSyncconfig()
@@ -993,22 +985,19 @@ class TestRefill extends TestCase
             return $result;
         };
 
-        $match = function ($all,$cur)
-        {
+        $match = function ($all, $cur) {
             $insert = [];
-            foreach ($all as $key => $value)
-            {
-                if(!array_key_exists($key,$cur)) {
+            foreach ($all as $key => $value) {
+                if (!array_key_exists($key, $cur)) {
                     $insert[] = $key;
                 }
             }
             return $insert;
         };
 
-        $inserter = function ($mod,$type,$names)
-        {
+        $inserter = function ($mod, $type, $names) {
             foreach ($names as $name) {
-                $data = ['name' => $name,'type' => $type];
+                $data = ['name' => $name, 'type' => $type];
                 $mod->insert($data);
             }
         };
@@ -1021,14 +1010,14 @@ class TestRefill extends TestCase
 
         $oil_items = $mod_prov->getProviderList(['type' => 1]);
         $oil_items = $name_val_row($oil_items);
-        $oil_inserts = $match($oils,$oil_items);
+        $oil_inserts = $match($oils, $oil_items);
 
         $phone_items = $mod_prov->getProviderList(['type' => 2]);
         $phone_items = $name_val_row($phone_items);
-        $phone_inserts = $match($phones,$phone_items);
+        $phone_inserts = $match($phones, $phone_items);
 
-        $inserter($mod_prov,1,$oil_inserts);
-        $inserter($mod_prov,2,$phone_inserts);
+        $inserter($mod_prov, 1, $oil_inserts);
+        $inserter($mod_prov, 2, $phone_inserts);
     }
 
     public function testStat()
@@ -1039,6 +1028,7 @@ class TestRefill extends TestCase
             ->field('sum(refill_amount) as refill_amounts , sum(channel_amount) as channel_amounts , sum(mch_amount) as mch_amounts')
             ->where([])->select();
     }
+
     public function testRefillGoods()
     {
         $goods = refill\RefillFactory::instance()->goods();
@@ -1053,20 +1043,18 @@ class TestRefill extends TestCase
     private function refill_info($card_no, $card_type)
     {
         $data = rcache($card_no, 'cardrefill-');
-        if(empty($data))
-        {
+        if (empty($data)) {
             $mod_topcard = Model('topcard');
             $ret = $mod_topcard->get_card($card_no);
-            if(empty($ret)) {
+            if (empty($ret)) {
                 $bind_phone = $this->make_mobile();
-                $mod_topcard->add($card_no,$card_type,time(),$bind_phone);
+                $mod_topcard->add($card_no, $card_type, time(), $bind_phone);
                 $data['bind_phone'] = $bind_phone;
                 $data['refill_time'] = time();
                 $data['times'] = 0;
 
-                wcache($card_no,$data,'cardrefill-');
-            }
-            else {
+                wcache($card_no, $data, 'cardrefill-');
+            } else {
                 $val = $ret[0];
 
                 $data['bind_phone'] = $val['bind_phone'];
@@ -1083,18 +1071,17 @@ class TestRefill extends TestCase
         $card_no = '1000119000001679247';
         $card_type = 1;
 
-        $info = $this->refill_info($card_no,$card_type);
+        $info = $this->refill_info($card_no, $card_type);
 
     }
 
-    private function check_mchorder($mchid,$mch_order)
+    private function check_mchorder($mchid, $mch_order)
     {
-        if(empty($mch_order)) {
+        if (empty($mch_order)) {
             return true;
-        }
-        else {
+        } else {
             $refill_order = Model('refill_order');
-            $ret = $refill_order->getOrderInfo(['mchid' => $mchid,'mch_order' => $mch_order]);
+            $ret = $refill_order->getOrderInfo(['mchid' => $mchid, 'mch_order' => $mch_order]);
 
             return empty($ret);
         }
@@ -1102,7 +1089,7 @@ class TestRefill extends TestCase
 
     public function testCheckMchorder()
     {
-        $ret = $this->check_mchorder(1,'13281475');
+        $ret = $this->check_mchorder(1, '13281475');
     }
 
     public function testMakemobile()
@@ -1115,37 +1102,35 @@ class TestRefill extends TestCase
     {
         $path = BASE_DATA_PATH . "/log";
         $names = ['20210119-mobile.log',
-            '20210120-mobile.log','20210121-mobile.log','20210122-mobile.log','20210123-mobile.log',
-            '20210124-mobile.log','20210125-mobile.log'];
+            '20210120-mobile.log', '20210121-mobile.log', '20210122-mobile.log', '20210123-mobile.log',
+            '20210124-mobile.log', '20210125-mobile.log'];
 
-        foreach ($names as $name)
-        {
+        foreach ($names as $name) {
             $file_name = $path . "/" . $name;
             refill\util::black_from_log($file_name);
         }
     }
 
 
-
     public function testStats()
     {
-        $date = date('Y-m-d',time());
+        $date = date('Y-m-d', time());
         $today = strtotime("{$date}");
 
         $times_begin = function ($start) {
             $times = [];
             $begin = $start;
-            for($i = 0; $i < 7; $i++) {
+            for ($i = 0; $i < 7; $i++) {
                 $times[] = $begin;
                 $begin -= 86400;
             }
             return $times;
         };
 
-        $reader = function ($mchid,$time) {
+        $reader = function ($mchid, $time) {
             $cond['mchid'] = $mchid;
             $cond['inner_status'] = 0;
-            $cond['refill_order.order_time'] = ['between', [$time, $time + 86400 -1]];
+            $cond['refill_order.order_time'] = ['between', [$time, $time + 86400 - 1]];
 
             $items = Model('')->table('refill_order,vr_order')->join('inner')
                 ->on('refill_order.order_id=vr_order.order_id')
@@ -1161,17 +1146,15 @@ class TestRefill extends TestCase
         $mchid = 10096;
 //        $states = rcache($this->mchid() , 'refillstat-');
         $states = unserialize($states ?? "");
-        if(empty($states)) $states = [];
+        if (empty($states)) $states = [];
 
         $result = [];
         $cache = [];
-        foreach ($begins as $begin)
-        {
-            if(array_key_exists($begin,$states)) {
+        foreach ($begins as $begin) {
+            if (array_key_exists($begin, $states)) {
                 $item = $states[$begin];
-            }
-            else {
-                $item = $reader($mchid,$begin);
+            } else {
+                $item = $reader($mchid, $begin);
             }
             $result[$begin] = $item;
 
@@ -1180,43 +1163,39 @@ class TestRefill extends TestCase
 
         }
 
-        wcache($this->mchid() ,$cache, 'refillstat-');
+        wcache($this->mchid(), $cache, 'refillstat-');
 
         return $result;
     }
 
     public function testNotifyx()
     {
-        $mch_cache = rcache("merchant-notify" , 'refill-');
+        $mch_cache = rcache("merchant-notify", 'refill-');
         $caches = empty($mch_cache['data']) ? [] : unserialize($mch_cache['data']);
 
         $new_caches = [];
-        $merchants = Model('merchant')->getMerchantList([],'','','merchant.*,member.available_predeposit' ,"0,1000");
-        foreach ($merchants as $merchant)
-        {
+        $merchants = Model('merchant')->getMerchantList([], '', '', 'merchant.*,member.available_predeposit', "0,1000");
+        foreach ($merchants as $merchant) {
             $mchid = $merchant['mchid'];
             $phone = $merchant['contact_phone'] ?? "";
             $available_pd = intval($merchant['available_predeposit']);
             $alarm_pd = intval($merchant['alarm_amount']) < 10000 ? 10000 : intval($merchant['alarm_amount']);
 
-            if(array_key_exists($mchid,$caches)) {
+            if (array_key_exists($mchid, $caches)) {
                 $mch_cache = $caches[$mchid];
-            }
-            else {
+            } else {
                 $mch_cache = ['last_time' => 0, 'send_count' => 0];
             }
 
-            if(!empty($phone) && ($available_pd < $alarm_pd))
-            {
-                $counts =  $mch_cache['send_count'];
-                if(($mch_cache['last_time'] + 300 < time()) && $counts < 5) {
+            if (!empty($phone) && ($available_pd < $alarm_pd)) {
+                $counts = $mch_cache['send_count'];
+                if (($mch_cache['last_time'] + 300 < time()) && $counts < 5) {
                     $mch_cache = ['last_time' => time(), 'send_count' => $counts + 1];
-                    QueueClient::push('sendSMS', ['mobile'=>$merchant['contact_phone'],
-                        'type'=>'balance_warning','datas' => [date("m月d日H时") , $merchant['available_predeposit']]]);
+                    QueueClient::push('sendSMS', ['mobile' => $merchant['contact_phone'],
+                        'type' => 'balance_warning', 'datas' => [date("m月d日H时"), $merchant['available_predeposit']]]);
 
                 }
-            }
-            else {
+            } else {
                 $mch_cache = ['last_time' => 0, 'send_count' => 0];
             }
             $new_caches[$mchid] = $mch_cache;
@@ -1232,11 +1211,12 @@ class TestRefill extends TestCase
 
     public function testAllow()
     {
-        $allow = refill\RefillFactory::instance()->allow(10096,1,100);
+        $allow = refill\RefillFactory::instance()->allow(10096, 1, 100);
 
     }
 
-    public function testCheckData(){
+    public function testCheckData()
+    {
         $str = '|2|110667993758599771-充值失败|';
 //        $str = '0|提交成功|-36557.7400';
 //        if(preg_match( '/^-*[0-9]{1,3}\|[\x{4e00}-\x{9fa5}]+\|-*[0-9]+\.*[0-9]+$/u',$str,$matches)) {
@@ -1246,54 +1226,53 @@ class TestRefill extends TestCase
 //            return true;
 //        }
 //        return false;
-        $resp = ltrim($str , '|');
-        $resp = explode('|' , $resp);
-        if(count($resp) != 3) {
-            return [false,'返回值错误'];
+        $resp = ltrim($str, '|');
+        $resp = explode('|', $resp);
+        if (count($resp) != 3) {
+            return [false, '返回值错误'];
         }
     }
 
     public function testErrre()
     {
         $line = '[13 2021-01-24 16:07:03] DEBUG: type = application/json;charset=utf-8, content={"channelOrderNumber":"610664819621371793","orderNumber":"GYFL1611475621525437","message":"充值失败","signature":"6c28c15b9ce2b2243742ecebbd929ac5","status":109}';
-        $ret = preg_match('/[\w\W]+"channelOrderNumber":"(?P<order_sn>[^"]+)"[\w\W]+"message":"(?P<message>[\x{4e00}-\x{9fa5}]+)"[\w\W]+"status":109/u',$line,$matches);
+        $ret = preg_match('/[\w\W]+"channelOrderNumber":"(?P<order_sn>[^"]+)"[\w\W]+"message":"(?P<message>[\x{4e00}-\x{9fa5}]+)"[\w\W]+"status":109/u', $line, $matches);
     }
 
     public function testLog()
     {
 //        $line = './LOG/20210203-mobile.log:[15 2021-02-03 10:41:17] SQL: UPDATE `lrlz_member` SET available_predeposit=available_predeposit+975 WHERE ( member_id = \'65818\' ) [ RunTime:0.000297s ]';
-        $fn = fopen(BASE_ROOT_PATH . "/10096.log","r");
+        $fn = fopen(BASE_ROOT_PATH . "/10096.log", "r");
         $mod = Model();
-        $mod->table('tfloat')->where(['member_id' => 65818])->update( ['pdamount'=>0]);
+        $mod->table('tfloat')->where(['member_id' => 65818])->update(['pdamount' => 0]);
 
 
         $total_amount = ncPriceFormat(0.00);
 
         $i = 0;
-        while(! feof($fn))  {
+        while (!feof($fn)) {
 
             $i++;
             $line = trim(fgets($fn));
-            $ret = preg_match('/[\w\W]+UPDATE[\w\W]+available_predeposit=available_predeposit(?P<oper>[-+]+)(?P<amount>[.\d]+)/i',$line,$matches);
-            if($ret) {
+            $ret = preg_match('/[\w\W]+UPDATE[\w\W]+available_predeposit=available_predeposit(?P<oper>[-+]+)(?P<amount>[.\d]+)/i', $line, $matches);
+            if ($ret) {
                 $oper = $matches['oper'];
                 $amount = $matches['amount'];
-                if($oper == '-') {
+                if ($oper == '-') {
                     $total_amount = ncPriceFormat($total_amount) - ncPriceFormat($amount);
 //                    $mod->table('tfloat')->where(['member_id' => 65818])->update( ['pdamount'=>['exp','pdamount-'.$amount]]);
 
-                }
-                else {
+                } else {
                     $total_amount = ncPriceFormat($total_amount) + ncPriceFormat($amount);
 //                    $mod->table('tfloat')->where(['member_id' => 65818])->update( ['pdamount'=>['exp','pdamount+'.$amount]]);
 
                 }
 
-                Log::record("index = {$i} {$total_amount} = {$total_amount} {$oper} {$amount}",Log::DEBUG);
+                Log::record("index = {$i} {$total_amount} = {$total_amount} {$oper} {$amount}", Log::DEBUG);
             }
         }
 
-        Log::record("total_amount:{$total_amount}",Log::DEBUG);
+        Log::record("total_amount:{$total_amount}", Log::DEBUG);
         fclose($fn);