|
@@ -1,5 +1,6 @@
|
|
|
<?php
|
|
|
|
|
|
+use mapi\config;
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
|
define('APP_ID', 'test');
|
|
@@ -35,7 +36,7 @@ class TestCTCard extends TestCase
|
|
|
"detailedAddr" => "海南省海口市琼山区凤翔街道测试",
|
|
|
"consignee" => "董朋",
|
|
|
"receiContact" => "13581540217",
|
|
|
- "scenarioCode" => "20230830180956577"
|
|
|
+ "scenarioCode" => "20230803081241551"
|
|
|
];
|
|
|
|
|
|
$ctcard->fraud_check($params);
|
|
@@ -53,4 +54,24 @@ class TestCTCard extends TestCase
|
|
|
|
|
|
$ctcard->address_delivery($params);
|
|
|
}
|
|
|
+ public function testTime()
|
|
|
+ {
|
|
|
+ $x = date("ymdhm", time());
|
|
|
+
|
|
|
+ $guider = function (): string
|
|
|
+ {
|
|
|
+ $str = md5(uniqid(mt_rand(), true));
|
|
|
+ $uuid = substr($str, 0, 8);
|
|
|
+ $uuid .= substr($str, 8, 4);
|
|
|
+ $uuid .= substr($str, 12, 4);
|
|
|
+ $uuid .= substr($str, 16, 4);
|
|
|
+ $uuid .= substr($str, 20, 12);
|
|
|
+ return $uuid;
|
|
|
+ };
|
|
|
+ $make_sn = function () use ($guider){
|
|
|
+ return config::SYS_CODE . config::APP_CODE . date("ymdhm", time()) . $guider();
|
|
|
+ };
|
|
|
+
|
|
|
+ $y = $make_sn();
|
|
|
+ }
|
|
|
}
|