|
@@ -19,6 +19,21 @@ const CurrentTest = NetTest;
|
|
|
|
|
|
class TestRefillYl extends TestCase
|
|
|
{
|
|
|
+ public function __construct(?string $name = null, array $data = [], $dataName = '')
|
|
|
+ {
|
|
|
+ parent::__construct($name, $data, $dataName);
|
|
|
+
|
|
|
+ if (CurrentTest == LocalTest) {
|
|
|
+ $this->mReqHost = BASE_SITE_URL;
|
|
|
+ $this->mMchid = 1;
|
|
|
+ $this->mKey = '1ff02223b771c0414468c8892151c602';
|
|
|
+ } else {
|
|
|
+ $this->mReqHost = 'https://ylapi.xyzshops.cn';
|
|
|
+ $this->mMchid = 1092;
|
|
|
+ $this->mKey = '210fe406954220f56085997d6a4c5b80';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public static function setUpBeforeClass(): void
|
|
|
{
|
|
|
Base::run_util();
|
|
@@ -47,6 +62,22 @@ class TestRefillYl extends TestCase
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public function testAddPhoe()
|
|
|
+ {
|
|
|
+ $url = $this->mReqHost . "/mobile/index.php";
|
|
|
+ $params = ['mchid' => $this->mMchid,
|
|
|
+ 'cardno' => '',
|
|
|
+ 'amount' => 100,
|
|
|
+ "act" => "refill",
|
|
|
+ "op" => "add",
|
|
|
+ 'order_sn' => '',
|
|
|
+ 'notifyurl' => "https://www.baoyung.com/api/unionservice/yezicharge"];
|
|
|
+
|
|
|
+ Log::record(json_encode($params), Log::DEBUG);
|
|
|
+// $resp = $this->send_md5($url, $params);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
private function make_sn()
|
|
|
{
|
|
|
return mt_rand(1000, 9999)
|