瀏覽代碼

wangliantx

xiaoyu 3 年之前
父節點
當前提交
c184b5f336

+ 40 - 2
data/config/win/refill.ini.php

@@ -2024,6 +2024,43 @@ $dianchong_phone = ['name' => 'dianchong', 'store_id' => 108, 'qualitys' => '1',
     ],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
     'official_sn' => true, 'refill_type' => 'api'];
 
 
+$wangliantx_phone = ['name' => 'wangliantx', 'store_id' => 112,'qualitys' => '1',
+    'amount' => [
+        10 => [
+            ['goods_id' => 6979, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6979, 'price' => 9.47, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 6980, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6980, 'price' => 18.94, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 6981, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6981, 'price' => 28.41, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 6982, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6982, 'price' => 47.35, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 6983, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6983, 'price' => 94.7, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 6984, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6984, 'price' => 189.4, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 6985, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6985, 'price' => 284.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 6986, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6986, 'price' => 473.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -2103,7 +2140,8 @@ $phone_providers = [
     ['name' => 'xinyang', 'cfg' => $xinyang_phone],
     ['name' => 'xinyang', 'cfg' => $xinyang_phone],
     ['name' => 'guochuang', 'cfg' => $guochuang_phone],
     ['name' => 'guochuang', 'cfg' => $guochuang_phone],
     ['name' => 'xianghongrui', 'cfg' => $xianghongrui_phone],
     ['name' => 'xianghongrui', 'cfg' => $xianghongrui_phone],
-    ['name' => 'dianchong', 'cfg' => $dianchong_phone]
+    ['name' => 'dianchong', 'cfg' => $dianchong_phone],
+    ['name' => 'wangliantx', 'cfg' => $wangliantx_phone]
 ];
 ];
 $config['phone_providers'] = $phone_providers;
 $config['phone_providers'] = $phone_providers;
 
 
@@ -2123,7 +2161,7 @@ $jumithird = ['name' => 'jumithird', 'store_id' => 111,'qualitys' => '1',
 
 
 $third_providers = [
 $third_providers = [
     ['name' => 'lingzhthird', 'cfg' => $lingzhthird],
     ['name' => 'lingzhthird', 'cfg' => $lingzhthird],
-    ['name' => 'jumithird', 'cfg' => $jumithird],
+//    ['name' => 'jumithird', 'cfg' => $jumithird],
 ];
 ];
 $config['third_providers'] = $third_providers;
 $config['third_providers'] = $third_providers;
 
 

+ 3 - 3
helper/refill/api/xyz/wangliantx/RefillPhone.php

@@ -152,9 +152,9 @@ class RefillPhone extends refill\IRefillPhone
 
 
     public function xmlToArray($xml)
     public function xmlToArray($xml)
     {
     {
-        $replace_str = str_replace(' ','','encoding="gb2312"');
-        $xml = mb_convert_encoding($xml,"UTF-8","gb2312");
-        $xml = str_replace($replace_str, "encoding='utf-8'", $xml);
+//        $replace_str = str_replace(' ','','encoding="gb2312"');
+//        $xml = mb_convert_encoding($xml,"UTF-8","gb2312");
+//        $xml = str_replace($replace_str, "encoding='utf-8'", $xml);
         return json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
         return json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
     }
     }
 }
 }

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

@@ -11,8 +11,9 @@ class config
     const BALANCE_UTL = 'http://39.99.143.124:8177/soft/searchbalance.do';
     const BALANCE_UTL = 'http://39.99.143.124:8177/soft/searchbalance.do';
 
 
     const USER_ID= '10073664';
     const USER_ID= '10073664';
-    const KEY = 'ZcWJfd4Jt63JAwiymPEXzGDHyjy8H62F';
-    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_wangliantx.php";
+    const KEY = 'ADE28CAF69A0FFE7E5E3C5FD5EBCA7F9';
+//    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_wangliantx.php";
+    const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.php";
     const operator = [
     const operator = [
         mtopcard\ChinaMobileCard  => '移动',
         mtopcard\ChinaMobileCard  => '移动',
         mtopcard\ChinaUnicomCard  => '联通',
         mtopcard\ChinaUnicomCard  => '联通',

+ 11 - 0
test/TestRefill.php

@@ -756,6 +756,17 @@ class TestRefill extends TestCase
 //        $resp = $providers->notify($params);
 //        $resp = $providers->notify($params);
     }
     }
 
 
+    public function testWangliantx()
+    {
+        $providers = $this->getProvider('wangliantx');
+//        $resp = $providers->balance();
+//        $resp = $providers->add(18500608333, 5, 30, [
+//            'order_sn' => $this->make_sn(),
+//            'regin_no' => 1
+//        ]);
+        $resp = $providers->query(['order_sn' => '68241629799006092369']);
+    }
+
     public function testAmingjd()
     public function testAmingjd()
     {
     {
 //        $providers = new refill\amingjd\RefillPhone([]);
 //        $providers = new refill\amingjd\RefillPhone([]);