Browse Source

tiancheng provider

ayHaru 4 years ago
parent
commit
649453b015
2 changed files with 14 additions and 5 deletions
  1. 1 2
      helper/refill/api/xyz/tiancheng/config.php
  2. 13 3
      test/TestRefill.php

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

@@ -11,8 +11,7 @@ class config
 
     const SID = '16193208193424561706';
     const KEY = 'CwVAoQboguX2DZkdDXk0AIA2csWWnAp1gmKS0KyKKVoX8cX8qJLQa3exEfGevM5J';
-//    const NOTIFY_URL = BASE_SITE_URL . "/mobile/refill_tiancheng.php";
-    const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.php";
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/refill_tiancheng.php";
     const operator = [
         mtopcard\ChinaMobileCard  => 1,
         mtopcard\ChinaUnicomCard  => 2,

+ 13 - 3
test/TestRefill.php

@@ -511,13 +511,23 @@ class TestRefill extends TestCase
     public function testYunlingfsPhone()
     {
         $providers = new refill\yunlingfs\RefillPhone([]);
-//        $resp = $providers->add(15139608757, 4, 30, ['order_sn' => $this->make_sn()]);
-        $resp = $providers->query(['order_sn' => '89451618975609262234']);
+//        $resp = $providers->add(18500608333, 4, 30, ['order_sn' => $this->make_sn()]);
+        $resp = $providers->query(['order_sn' => '72761619399048607916']);
         $data = '{"userid":"10073527","sporderid":"89451618975609262234","orderid":"02D8A7D2ADD7F4DC73527","resultno":"1","merchantsubmittime":"20210421112737","ordermoney":"28.68","verifystring":"95e3fe834a25cc8c524e09480354d9ba","sign":"b4fb11138a9f883749be320772965add","supnumber":"20210421112716840298"}';
         $input = json_decode($data, true);
 //        refill\RefillFactory::instance()->notify('yunlingfs',$input);
     }
 
+    public function testTianchengPhone()
+    {
+        $providers = new refill\tiancheng\RefillPhone([]);
+        $resp = $providers->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '15301619399212504464']);
+        $data = ' {"result":"fail","msg":"0","order":"null","phone_no":"13699279618","amount":"10","op_no":"84801619340283980506","settle":"0","sign":"D64039ED791920B08BDA9DD95700C0E6"}';
+        $input = json_decode($data, true);
+//        refill\RefillFactory::instance()->notify('tiancheng',$input);
+    }
+
     public function testLingzhPhone()
     {
         $providers = new refill\lingzh\RefillPhone([]);
@@ -625,7 +635,7 @@ class TestRefill extends TestCase
 
     public function testGFTDCB()
     {
-        $data = '{"channelOrderNumber":"79091610959059372019","orderNumber":"GYFL1610959060397001","message":"充值成功","signature":"881036222bd8f067ff47d248c75f4c8d","voucher":"","status":101}';
+        $data = '{"channelOrderNumber":"79091610959059372019","orderNumber":"GYFL1610959060397001","message":"充值成功","storage":"881036222bd8f067ff47d248c75f4c8d","voucher":"","status":101}';
         $url = "http://192.168.1.220/mobile/refill_gftd.php?" . $data;
         $resp = http_post_data($url, $data, ['Content-Type: application/json;charset=UTF-8;', 'Accept:application/json;charset=UTF-8;']);
     }