Browse Source

add refill_xyz.php

stanley-king 4 years ago
parent
commit
efb6ce47cb
2 changed files with 28 additions and 1 deletions
  1. 1 1
      helper/fcgi_server.php
  2. 27 0
      test/TestRefill.php

+ 1 - 1
helper/fcgi_server.php

@@ -28,7 +28,7 @@ class fcgi_server
             'wxnotify.php','pub_wxnotify.php','alipay_notify_url.php','dispatch_notify.php','kdniao_notify.php',
             'cmbpay_notify.php','cmbpay_sign.php','wxauthor.php','api/wxLogin/index.php','api/wxLogin/callback.php',
             'signature.php','merchant_xyz.php',
-            'refill_suhc.php','refill_beixt.php','refill_bxtwt.php','refill_bjb.php'
+            'refill_suhc.php','refill_beixt.php','refill_bxtwt.php','refill_bjb.php','refill_xyz.php'
         ];
         $path = BASE_ROOT_PATH . '/mobile/';
         $file = str_replace($path,'',$file);

+ 27 - 0
test/TestRefill.php

@@ -193,6 +193,33 @@ class TestRefill extends TestCase
         }
     }
 
+    public function testAddPhoe()
+    {
+        $phones = [//13911129867,
+            18500608333,
+            18510683168,
+            18513846008,
+            18518237398];
+        $amount = 10;
+
+        for ($i = 0; $i < 3; $i++)
+        {
+            foreach ($phones as $phone) {
+                $url = $this->mReqHost . "/mobile/index.php";
+                $params = ['mchid' => 1092,
+                    'cardno' => $phone,
+                    'amount' => $amount,
+                    "act"=>"refill",
+                    "op"=>"add",
+                    'order_sn' => $this->make_sn(),
+                    'notifyurl'=> $this->mReqHost . "/mobile/refill_xyz.php"];
+
+                $resp = $this->send_md5($url,$params);
+                Log::record($resp,Log::DEBUG);
+            }
+        }
+    }
+
     public function testGoods()
     {
         //        $req_url = 'https://www.xyzshops.cn/mobile/index.php';