添加调试
parent
765660a7aa
commit
64da2caa8a
|
|
@ -30,21 +30,25 @@ class ApiCustomToken
|
||||||
//拿出sign,剩下的参数按照key排序, 拼接
|
//拿出sign,剩下的参数按照key排序, 拼接
|
||||||
$postSign = Arr::get($postData, 'sign', '');
|
$postSign = Arr::get($postData, 'sign', '');
|
||||||
|
|
||||||
|
//记录请求日志
|
||||||
|
$log = new ThirdLog();
|
||||||
|
$log->app_id = $appKey;
|
||||||
|
$log->api_path = $request->path();
|
||||||
|
$log->request_params = json_encode($postData);
|
||||||
|
|
||||||
if(empty($appKey) || empty($postSign) || empty($timeStamp)){
|
if(empty($appKey) || empty($postSign) || empty($timeStamp)){
|
||||||
$resData = [
|
$resData = [
|
||||||
'respCd' => '02',
|
'respCd' => '02',
|
||||||
'respMsg' => '参数缺失',
|
'respMsg' => '参数缺失',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$log->sign_status = 0;
|
||||||
|
$log->http_code = 400;
|
||||||
|
$log->response_params = json_encode($resData);
|
||||||
|
$log->save();
|
||||||
return response()->json($resData, 400);
|
return response()->json($resData, 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
//记录请求日志
|
|
||||||
$log = new ThirdLog();
|
|
||||||
$log->app_id = $appKey;
|
|
||||||
$log->api_path = $request->path();
|
|
||||||
$log->request_params = json_encode($postData);
|
|
||||||
|
|
||||||
unset($postData['sign']);
|
unset($postData['sign']);
|
||||||
|
|
||||||
ksort($postData);
|
ksort($postData);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue