ayHaru 4 år sedan
förälder
incheckning
85c61f4aca

+ 1 - 1
conf/php/php-debug.ini

@@ -928,7 +928,7 @@ default_socket_timeout = 60
 ; Module Settings ;
 ;;;;;;;;;;;;;;;;;;;
 
-extension=swoole.so
+;extension=swoole.so
 
 [CLI Server]
 ; Whether the CLI web server uses ANSI color coding in its terminal output.

+ 38 - 1
data/config/lingzh/refill.ini.php

@@ -26,6 +26,43 @@ $baidu_phone = ['name' => 'baidu', 'store_id' => 28, 'card_type' => ['chinamobil
         300 => ['goods_id' => 6392, 'price' => 285.30],
         500 => ['goods_id' => 6393, 'price' => 475.50]],
     'official_sn' => true, 'refill_type' => 'api'];
+
+$lingd_phone = ['name' => 'lingd', 'store_id' => 29, 'card_type' => ['chinaunicom', 'chinatelecom'],
+    'amount' => [10 => ['goods_id' => 6394, 'price' => 9.5],
+        20 => ['goods_id' => 6395, 'price' => 19],
+        30 => ['goods_id' => 6396, 'price' => 28.5],
+        50 => ['goods_id' => 6397, 'price' => 47.5],
+        100 => ['goods_id' => 6398, 'price' => 95],
+        200 => ['goods_id' => 6399, 'price' => 190],
+        300 => ['goods_id' => 6400, 'price' => 285],
+        500 => ['goods_id' => 6401, 'price' => 475]],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$baizeyd_phone = ['name' => 'baizeyd', 'store_id' => 30, 'card_type' => ['chinamobile'],
+    'amount' => [10 => ['goods_id' => 6406, 'price' => 9.5],
+        20 => ['goods_id' => 6408, 'price' => 19],
+        30 => ['goods_id' => 6410, 'price' => 28.5],
+        50 => ['goods_id' => 6412, 'price' => 47.5],
+        100 => ['goods_id' => 6414, 'price' => 95],
+        200 => ['goods_id' => 6415, 'price' => 190],
+        300 => ['goods_id' => 6416, 'price' => 285],
+        500 => ['goods_id' => 6417, 'price' => 475]],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$weisyd_phone = ['name' => 'weisyd', 'store_id' => 31, 'card_type' => ['chinamobile'],
+    'amount' => [10 => ['goods_id' => 6418, 'price' => 9.5],
+        20 => ['goods_id' => 6419, 'price' => 19],
+        30 => ['goods_id' => 6420, 'price' => 28.5],
+        50 => ['goods_id' => 6421, 'price' => 47.5],
+        100 => ['goods_id' => 6422, 'price' => 95],
+        200 => ['goods_id' => 6423, 'price' => 190],
+        300 => ['goods_id' => 6424, 'price' => 285],
+        500 => ['goods_id' => 6425, 'price' => 475]],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
-    ['name' => 'baidu', 'cfg' => $baidu_phone, 'opened' => true, 'sort' => 1]];
+    ['name' => 'baidu', 'cfg' => $baidu_phone, 'opened' => true, 'sort' => 1],
+    ['name' => 'lingd', 'cfg' => $lingd_phone, 'opened' => true, 'sort' => 1],
+    ['name' => 'baizeyd', 'cfg' => $baizeyd_phone, 'opened' => true, 'sort' => 1],
+    ['name' => 'weisyd', 'cfg' => $weisyd_phone, 'opened' => true, 'sort' => 1]];
 $config['phone_providers'] = $phone_providers;

+ 4 - 1
helper/refill/api/test/api.php

@@ -1,4 +1,7 @@
 <?php
 
 require_once(BASE_HELPER_RAPI_PATH . '/baidu/RefillPhone.php');
-require_once(BASE_HELPER_RAPI_PATH . '/baidu/RefillCallBack.php');
+require_once(BASE_HELPER_RAPI_PATH . '/baidu/RefillCallBack.php');
+
+require_once(BASE_HELPER_RAPI_PATH . '/baizeyd/RefillPhone.php');
+require_once(BASE_HELPER_RAPI_PATH . '/baizeyd/RefillCallBack.php');

helper/refill/afandeng/RefillCallBack.php → helper/refill/api/xyz/afandeng/RefillCallBack.php


helper/refill/afandeng/RefillPhone.php → helper/refill/api/xyz/afandeng/RefillPhone.php


helper/refill/afandeng/config.php → helper/refill/api/xyz/afandeng/config.php


+ 6 - 0
test/TestRefill.php

@@ -100,6 +100,12 @@ class TestRefill extends TestCase
         }
     }
 
+    public function testBaizePhone()
+    {
+        $providers = new refill\baizeyd\RefillPhone([]);
+        $resp = $providers->add(17801048874, 5, 10, ['order_sn' => $this->make_sn()]);
+    }
+
     public function testXcPhone()
     {
         $providers = new refill\xc\RefillPhone([]);