xiaoyu 3 vuotta sitten
vanhempi
commit
de372fb5d8

+ 41 - 9
data/config/win/refill.ini.php

@@ -2111,7 +2111,7 @@ $wenye_san_phone = ['name' => 'wenye_san', 'store_id' => 114, 'qualitys' => '4',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$xianghongruifs_phone = ['name' => 'xianghongruifs', 'store_id' => 115, 'qualitys' => '1',
+$xianghongruifs_phone = ['name' => 'xianghongruifs', 'store_id' => 116, 'qualitys' => '1',
     'amount' => [
         10 => [['goods_id' => 6488, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile']],
         20 => [['goods_id' => 6489, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile']],
@@ -2126,14 +2126,46 @@ $xianghongruifs_phone = ['name' => 'xianghongruifs', 'store_id' => 115, 'quality
 
 $yilin_phone = ['name' => 'yilin', 'store_id' => 115, 'qualitys' => '1',
     'amount' => [
-        10 => [['goods_id' => 6488, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile']],
-        20 => [['goods_id' => 6489, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile']],
-        30 => [['goods_id' => 6490, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']],
-        50 => [['goods_id' => 6491, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']],
-        100 => [['goods_id' => 6492, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']],
-        200 => [['goods_id' => 6493, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']],
-        300 => [['goods_id' => 6494, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile']],
-        500 => [['goods_id' => 6495, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile']]
+        10 => [
+            ['goods_id' => 7003, 'price' => 9.58, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7003, 'price' => 9.57, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7003, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 7004, 'price' => 19.16, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7004, 'price' => 19.14, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7004, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 7005, 'price' => 28.74, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7005, 'price' => 28.71, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7005, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7006, 'price' => 47.9, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7006, 'price' => 47.85, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7006, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7007, 'price' => 95.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7007, 'price' => 95.7, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7007, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7008, 'price' => 191.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7008, 'price' => 191.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7008, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 7009, 'price' => 287.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7009, 'price' => 287.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7009, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 7010, 'price' => 479, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7010, 'price' => 478.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7010, 'price' => 478, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 

+ 61 - 1
data/config/xyz/refill.ini.php

@@ -2111,6 +2111,64 @@ $wenye_san_phone = ['name' => 'wenye_san', 'store_id' => 114, 'qualitys' => '4',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$xianghongruifs_phone = ['name' => 'xianghongruifs', 'store_id' => 116, 'qualitys' => '1',
+    'amount' => [
+        10 => [['goods_id' => 6488, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        20 => [['goods_id' => 6489, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile']],
+        30 => [['goods_id' => 6490, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 6491, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 6492, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 6493, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']],
+        300 => [['goods_id' => 6494, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile']],
+        500 => [['goods_id' => 6495, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$yilin_phone = ['name' => 'yilin', 'store_id' => 115, 'qualitys' => '1',
+    'amount' => [
+        10 => [
+            ['goods_id' => 7003, 'price' => 9.58, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7003, 'price' => 9.57, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7003, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 7004, 'price' => 19.16, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7004, 'price' => 19.14, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7004, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 7005, 'price' => 28.74, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7005, 'price' => 28.71, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7005, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7006, 'price' => 47.9, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7006, 'price' => 47.85, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7006, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7007, 'price' => 95.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7007, 'price' => 95.7, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7007, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7008, 'price' => 191.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7008, 'price' => 191.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7008, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 7009, 'price' => 287.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7009, 'price' => 287.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7009, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 7010, 'price' => 479, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7010, 'price' => 478.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7010, 'price' => 478, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -2193,7 +2251,9 @@ $phone_providers = [
     ['name' => 'dianchong', 'cfg' => $dianchong_phone],
     ['name' => 'wangliantx', 'cfg' => $wangliantx_phone],
     ['name' => 'zhuojian', 'cfg' => $zhuojian_phone],
-    ['name' => 'wenye_san', 'cfg' => $wenye_san_phone]
+    ['name' => 'wenye_san', 'cfg' => $wenye_san_phone],
+//    ['name' => 'xianghongruifs', 'cfg' => $xianghongruifs_phone]
+    ['name' => 'yilin', 'cfg' => $yilin_phone],
 ];
 $config['phone_providers'] = $phone_providers;
 

+ 61 - 1
data/config/xyzadm/refill.ini.php

@@ -2111,6 +2111,64 @@ $wenye_san_phone = ['name' => 'wenye_san', 'store_id' => 114, 'qualitys' => '4',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$xianghongruifs_phone = ['name' => 'xianghongruifs', 'store_id' => 116, 'qualitys' => '1',
+    'amount' => [
+        10 => [['goods_id' => 6488, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        20 => [['goods_id' => 6489, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile']],
+        30 => [['goods_id' => 6490, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 6491, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 6492, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 6493, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']],
+        300 => [['goods_id' => 6494, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile']],
+        500 => [['goods_id' => 6495, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$yilin_phone = ['name' => 'yilin', 'store_id' => 115, 'qualitys' => '1',
+    'amount' => [
+        10 => [
+            ['goods_id' => 7003, 'price' => 9.58, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7003, 'price' => 9.57, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7003, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 7004, 'price' => 19.16, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7004, 'price' => 19.14, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7004, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 7005, 'price' => 28.74, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7005, 'price' => 28.71, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7005, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7006, 'price' => 47.9, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7006, 'price' => 47.85, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7006, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7007, 'price' => 95.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7007, 'price' => 95.7, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7007, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7008, 'price' => 191.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7008, 'price' => 191.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7008, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 7009, 'price' => 287.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7009, 'price' => 287.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7009, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 7010, 'price' => 479, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7010, 'price' => 478.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7010, 'price' => 478, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -2193,7 +2251,9 @@ $phone_providers = [
     ['name' => 'dianchong', 'cfg' => $dianchong_phone],
     ['name' => 'wangliantx', 'cfg' => $wangliantx_phone],
     ['name' => 'zhuojian', 'cfg' => $zhuojian_phone],
-    ['name' => 'wenye_san', 'cfg' => $wenye_san_phone]
+    ['name' => 'wenye_san', 'cfg' => $wenye_san_phone],
+//    ['name' => 'xianghongruifs', 'cfg' => $xianghongruifs_phone]
+    ['name' => 'yilin', 'cfg' => $yilin_phone],
 ];
 $config['phone_providers'] = $phone_providers;
 

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

@@ -12,8 +12,7 @@ class config
 
     const USER_ID= '10002543';
     const KEY = 'WMTekc8mYd485Qawj75kFXY68tAkmNEG';
-//    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_yilin.php";
-    const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.php";
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_yilin.php";
     const operator = [
         mtopcard\ChinaMobileCard  => 'yd',
         mtopcard\ChinaUnicomCard  => 'lt',

+ 4 - 0
mobile/callback/refill_yilin.php

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

+ 11 - 4
test/TestRefill.php

@@ -802,10 +802,17 @@ class TestRefill extends TestCase
     public function testYilin()
     {
         $providers = $this->getProvider('yilin');
-//        $resp = $providers->balance();
-        $resp = $providers->add(18500608333, 5, 30, [
-            'order_sn' => $this->make_sn()
-        ]);
+        $resp = $providers->balance();
+//        $resp = $providers->add(18500608333, 5, 30, [
+//            'order_sn' => $this->make_sn()
+//        ]);
+//        $resp = $providers->query(['order_sn' => '86981630484634157631']);
+
+//        $body = '{"orderid":"NZX21090116244713140","sporderid":"86981630484634157631","userid":"10002543","merchantsubmittime":"20210901163039","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.71","sign":"53717BF9ECE83F4AD96C1EDD4BAE4E87"}';
+//        $params = json_decode($body, true);
+//        $providers = $this->getProvider('yilin','RefillCallBack');
+//        $ret = $providers->verify($params);
+//        $resp = $providers->notify($params);
     }
 
     public function testAmingjd()