Browse Source

wantong provider debug

HARUHARU 4 years ago
parent
commit
90c7954cef

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

@@ -437,7 +437,7 @@ $phone_providers = [
     ['name' => 'tonglu', 'cfg' => $tonglu_phone],
     ['name' => 'tonglu', 'cfg' => $tonglu_phone],
     ['name' => 'xc', 'cfg' => $xc_phone],
     ['name' => 'xc', 'cfg' => $xc_phone],
     ['name' => 'xunyin', 'cfg' => $xunyin_phone],
     ['name' => 'xunyin', 'cfg' => $xunyin_phone],
-//    ['name' => 'wantong', 'cfg' => $wantong_phone],
+    ['name' => 'wantong', 'cfg' => $wantong_phone],
     ['name' => 'yunling', 'cfg' => $yunling_phone],
     ['name' => 'yunling', 'cfg' => $yunling_phone],
 ];
 ];
 $config['phone_providers'] = $phone_providers;
 $config['phone_providers'] = $phone_providers;

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

@@ -437,7 +437,7 @@ $phone_providers = [
     ['name' => 'tonglu', 'cfg' => $tonglu_phone],
     ['name' => 'tonglu', 'cfg' => $tonglu_phone],
     ['name' => 'xc', 'cfg' => $xc_phone],
     ['name' => 'xc', 'cfg' => $xc_phone],
     ['name' => 'xunyin', 'cfg' => $xunyin_phone],
     ['name' => 'xunyin', 'cfg' => $xunyin_phone],
-//    ['name' => 'wantong', 'cfg' => $wantong_phone],
+    ['name' => 'wantong', 'cfg' => $wantong_phone],
     ['name' => 'yunling', 'cfg' => $yunling_phone],
     ['name' => 'yunling', 'cfg' => $yunling_phone],
 ];
 ];
 $config['phone_providers'] = $phone_providers;
 $config['phone_providers'] = $phone_providers;

+ 1 - 1
helper/fcgisrv/MobileServer.php

@@ -57,7 +57,7 @@ class MobileServer extends BaseServer
             'bridge_shr.php','refill_weit.php','refill_afand.php','refill_afandeng.php',
             'bridge_shr.php','refill_weit.php','refill_afand.php','refill_afandeng.php',
             'refill_afandnew.php','refill_lingzh.php','refill_lingzhdl.php','refill_tongy.php',
             'refill_afandnew.php','refill_lingzh.php','refill_lingzhdl.php','refill_tongy.php',
             'refill_weiyi.php','refill_tonglu.php','refill_xc.php','refill_xunyin.php',
             'refill_weiyi.php','refill_tonglu.php','refill_xc.php','refill_xunyin.php',
-            'refill_yunling.php'
+            'refill_yunling.php','refill_wantong.php'
         ];
         ];
 
 
         $this->setExFiles($exfiles);
         $this->setExFiles($exfiles);

+ 0 - 3
helper/refill/api/xyz/wantong/RefillPhone.php

@@ -77,9 +77,6 @@ class RefillPhone extends refill\IRefillPhone
                 } elseif (in_array($status, [1, 2])) {
                 } elseif (in_array($status, [1, 2])) {
                     $order_state = ORDER_STATE_SEND;
                     $order_state = ORDER_STATE_SEND;
                 } else {
                 } else {
-                    $order_state = -1;
-                }
-                if ($order_state == -1) {
                     return [false, $resp['data']];
                     return [false, $resp['data']];
                 }
                 }
                 return [true, $order_state];
                 return [true, $order_state];

+ 1 - 1
helper/refill/api/xyz/wantong/api.txt

@@ -1,5 +1,5 @@
 http://mm.jm618.cn/account/profile
 http://mm.jm618.cn/account/profile
-商户id  10016
+商户id  10037
 密码123456
 密码123456
 
 
 话费充值接口文档
 话费充值接口文档

+ 3 - 4
helper/refill/api/xyz/wantong/config.php

@@ -9,8 +9,7 @@ class config
     const ORDER_URL = 'https://mm.jm618.cn/api/telpay';
     const ORDER_URL = 'https://mm.jm618.cn/api/telpay';
     const QUERY_URL = 'https://mm.jm618.cn/api/telpay/query';
     const QUERY_URL = 'https://mm.jm618.cn/api/telpay/query';
 
 
-    const MCHID = 10016;
-    const KEY = '06be014a9c14b12d893663bff36372ba';
-//    const NOTIFY_URL = BASE_SITE_URL . "/mobile/refill_wantong.php";
-    const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.php";
+    const MCHID = 10037;
+    const KEY = '7ad5f64b90f7f02a30fbd26641195f58';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/refill_wantong.php";
 }
 }

+ 4 - 0
mobile/refill_wantong.php

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

+ 5 - 2
test/TestRefill.php

@@ -386,8 +386,11 @@ class TestRefill extends TestCase
     public function testWantongPhone()
     public function testWantongPhone()
     {
     {
         $providers = new refill\wantong\RefillPhone([]);
         $providers = new refill\wantong\RefillPhone([]);
-        $resp = $providers->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
-//        $resp = $providers->query(['order_sn' => '50261617199864602428']);
+//        $resp = $providers->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '91531617802656873903']);
+        $data = '{"order_id":"91531617802656873903","mchid":"10037","tel":"13699279618","price":"30.00","sign":"6224acb8dca9232ccdd07b4454016fc2","status":"0","out_order_id":"0"}';
+        $input = json_decode($data, true);
+        refill\RefillFactory::instance()->notify('wantong',$input);
     }
     }
 
 
     public function testXunyinPhone()
     public function testXunyinPhone()