ソースを参照

xinhengyangnew

xiaoyu 3 年 前
コミット
fb99a9d0ab

+ 1 - 1
data/config/yl/refill.ini.php

@@ -5450,7 +5450,7 @@ $phone_providers = [
 //    ['name' => 'huoshenguo', 'cfg' => $huoshenguo_phone],
 //    ['name' => 'huoshenguo_high', 'cfg' => $huoshenguo_high_phone],
 //    ['name' => 'chizeng_normal', 'cfg' => $chizeng_normal_phone],
-//    ['name' => 'xinhengyangnew', 'cfg' => $xinhengyangnew_phone],
+    ['name' => 'xinhengyangnew', 'cfg' => $xinhengyangnew_phone],
 //    ['name' => 'tianchen', 'cfg' => $tianchen_phone],
 //    ['name' => 'yunchonggong_lt', 'cfg' => $yunchonggong_lt_phone],
 //    ['name' => 'tianchen_fs', 'cfg' => $tianchen_fs_phone],

+ 4 - 4
helper/refill/api/yl/xinhengyangnew/API信息.txt

@@ -1,7 +1,7 @@
-账号:XHYyezi
-密码: 123456
-秘钥:7d1229a832a84d89824c01d201030331
-ID:200050
+ID:200065
+账号:XHYyelin
+密码:123456
+秘钥:5904044139a4428b98bd494c9e25aa86
 登录地址:http://121.43.140.47:10186/plat/index
 
 话费下单地址:http://121.43.140.47:10186/plat/api/px/submit

+ 2 - 2
helper/refill/api/yl/xinhengyangnew/config.php

@@ -10,8 +10,8 @@ class config
     const QUERY_URL = 'http://121.43.140.47:10186/plat/api/px/query';
     const BALANCE_URL = 'http://121.43.140.47:10186/plat/api/px/balance';
 
-    const MCHID = '200050';
-    const KEY = '7d1229a832a84d89824c01d201030331';
+    const MCHID = '200065';
+    const KEY = '5904044139a4428b98bd494c9e25aa86';
     const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_xinhengyangnew.php";
     const operator = [
         mtopcard\ChinaMobileCard => 1,

+ 13 - 0
test/TestRefillYl.php

@@ -124,4 +124,17 @@ class TestRefillYl extends TestCase
         $resp = $provider->notify($params);
     }
 
+    public function testXinhengyangnew()
+    {
+//        $provider = $this->getProvider('xinhengyangnew');
+//        $resp = $provider->balance();
+//        $resp = $provider->add(13699279618, mtopcard\ChinaMobileCard, 30, ['order_sn' => $this->make_sn()]);
+//        $resp = $provider->query(['order_sn' => '98351648200827982694']);
+
+        $body = '{"mchid":"200065","msg":"充值失败","oid":"1000432223966","orderid":"98351648200827982694","price":"28.770","sign":"f3364cabace651f55f464aa5c6fa2d0b","status":"2","voucher":""}';
+        $params = json_decode($body, true);
+        $provider = $this->getProvider('xinhengyangnew', 'RefillCallBack');
+        $ret = $provider->verify($params);
+        $resp = $provider->notify($params);
+    }
 }