瀏覽代碼

dev qianqian

stanley-king 4 年之前
父節點
當前提交
a7f813cb64
共有 2 個文件被更改,包括 23 次插入2 次删除
  1. 2 2
      helper/refill/api/xyz/qianqian/config.php
  2. 21 0
      test/TestRefill.php

+ 2 - 2
helper/refill/api/xyz/qianqian/config.php

@@ -6,8 +6,8 @@ use mtopcard;
 
 class config
 {
-    const ORDER_URL = 'http://47.99.65.204/flow-receiver/fee/recharge';
-    const QUERY_URL = 'http://47.99.65.204/flow-receiver/fee/query/single';
+    const ORDER_URL = 'http://112.124.55.235/flow-receiver/fee/recharge';
+    const QUERY_URL = 'http://112.124.55.235/flow-receiver/fee/query/single';
     const NOTIFY_URL = BASE_SITE_URL . '/mobile/callback/qianqian.php';
 
     const ACCOUNT = 'lz16888';

+ 21 - 0
test/TestRefill.php

@@ -438,6 +438,27 @@ class TestRefill extends TestCase
 
     public function testFenshengPhone()
     {
+        $file = BASE_HELPER_RAPI_PATH . "/qianqian/RefillPhone.php";
+        if(!file_exists($file)){
+            Log::record("provider api file={$file} not exist.",Log::DEBUG);
+            return false;
+        } else {
+            require_once($file);
+            Log::record("file={$file} load success.",Log::DEBUG);
+        }
+
+        $providers = new refill\qianqian\RefillPhone([]);
+        $resp = $providers->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '27511617764278021035']);
+//        $datas = '[{"orderNo":"F2104071058069438461","status":"001","consumerNo":"27511617764278021035","voucherNo":"510490688023364042","mobile":"13699279618"}]';
+//        $datas = json_decode($datas,true);
+//        foreach ($datas as $data) {
+//            refill\RefillFactory::instance()->notify('fensheng',$data);
+//        }
+    }
+
+    public function testQianqianPhone()
+    {
         $providers = new refill\fensheng\RefillPhone([]);
 //        $resp = $providers->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
         $resp = $providers->query(['order_sn' => '27511617764278021035']);