stanley-king 3 years ago
parent
commit
4339e82fd7
1 changed files with 31 additions and 1 deletions
  1. 31 1
      test/TestRefillThird.php

+ 31 - 1
test/TestRefillThird.php

@@ -12,7 +12,8 @@ require_once(BASE_ROOT_PATH . '/global.php');
 require_once(BASE_CORE_PATH . '/lrlz.php');
 require_once(BASE_ROOT_PATH . '/fooder.php');
 require_once(BASE_HELPER_PATH . '/refill/RefillFactory.php');
-require_once(BASE_HELPER_PATH . '/refill/RefillFactory.php');
+require_once(BASE_HELPER_PATH . '/refill_proxy.php');
+
 
 class TestRefillThird extends TestCase
 {
@@ -29,7 +30,36 @@ class TestRefillThird extends TestCase
 
     public function testAddthird()
     {
+        $params = [ 'mchid' => 1092,
+            "act" => "refill",
+            "op" => "add_third",
+            'order_sn' => $this->make_sn(),
+            'notifyurl' => 'https://www.xyzshops.cn/mobile/signature.php',
+            'card_type' => 1,
+            'card_no' => '403149064',
+            'product_code' => 'XYZ100744',
+            'quantity' => 5,
+        ];
+
+        $proxy = new refill_proxy('210fe406954220f56085997d6a4c5b80');
+        $proxy->send("https://www.xyzshops.cn/mobile/index.php",$params);
+    }
+
+    public function testAddthirdExample()
+    {
+        $params = [ 'mchid' => 'xxxx', //贵方账号
+            "act" => "refill",
+            "op" => "add_third",
+            'order_sn' => $this->make_sn(), //贵方单号
+            'notifyurl' => 'xxxx', //回调URL
+            'card_type' => 1,//卡类型,1 2,3 回头写文档
+            'card_no' => '403149064',//充值号码`
+            'product_code' => 'XYZ100744', //充值产品编码
+            'quantity' => 5, //数量
+        ];
 
+        $proxy = new refill_proxy('秘钥');
+        $proxy->send("https://www.xyzshops.cn/mobile/index.php",$params);
     }
 
     public function testPushPhone()