stanley-king 3 سال پیش
والد
کامیت
08c76c7714
2فایلهای تغییر یافته به همراه17 افزوده شده و 1 حذف شده
  1. 1 1
      core/framework/db/mysql.php
  2. 16 0
      test/TestRefillThird.php

+ 1 - 1
core/framework/db/mysql.php

@@ -131,7 +131,7 @@ class Db
 			    return false;
 			}
 		} else {
-		    Log::record($sql." [ RunTime:".addUpTime('queryStartTime','queryEndTime',6)."s ]",Log::SQL);
+		    Log::record($sql." [ {$host} RunTime:".addUpTime("queryStartTime",'queryEndTime',6)."s ]",Log::SQL);
 			return $query;
 		}
 	}

+ 16 - 0
test/TestRefillThird.php

@@ -277,4 +277,20 @@ class TestRefillThird extends TestCase
             ['order_sn' => $order_sn, 'goods_id' => 6619,
                 'quantity' => 5, 'product_code' => 'XYZ100745', 'third_card_type' => 1]);
     }
+
+    public function testSendMobile()
+    {
+        $phone = '13911129867';
+        $amount = 30;
+        $url = "https://www.xyzshops.cn" . "/mobile/index.php";
+        $params = ['mchid' => 1092,
+            'cardno' => $phone,
+            'amount' => $amount,
+            "act" => "refill",
+            "op" => "add",
+            'order_sn' => $this->make_sn(),
+            'notifyurl' => "https://www.xyzshops.cn/signature.php"];
+        $proxy = new refill_proxy("210fe406954220f56085997d6a4c5b80");
+        $resp = $proxy->send($url, $params);
+    }
 }