diff --git a/app/Services/VideoService.php b/app/Services/VideoService.php index 0cc3efa..9c68efe 100644 --- a/app/Services/VideoService.php +++ b/app/Services/VideoService.php @@ -93,7 +93,7 @@ class VideoService extends BaseService $params['order_inquiry_id'] = $order_inquiry_id; $video_records = VideoRecord::getOne($params); if (!empty($video_records)) { - return fail(HttpEnumCode::HTTP_ERROR, "已开过视频时间,无需再修改预约时间"); + return fail(HttpEnumCode::HTTP_ERROR, "已开过视频,无需再修改预约时间"); } $is_reservation = true; diff --git a/config/routes.php b/config/routes.php index e1b9665..d4ac47b 100644 --- a/config/routes.php +++ b/config/routes.php @@ -737,11 +737,7 @@ Router::addGroup('/callback', function () { Router::post('/im', [CallBackController::class, 'imCallBack']); // 音视频回调 - Router::addGroup('/trtc', function () { - // 房间 - Router::post('', [CallBackController::class, 'trtcCallBack']); - }); - + Router::post('/trtc', [CallBackController::class, 'trtcCallBack']); // 处方平台物流回调 Router::post('/platform/logistics', [CallBackController::class, 'platformLogisticsCallBack']); diff --git a/extend/TencentVideo/Safe.php b/extend/TencentVideo/Safe.php index 62a679c..e055dc7 100644 --- a/extend/TencentVideo/Safe.php +++ b/extend/TencentVideo/Safe.php @@ -24,18 +24,15 @@ class Safe extends Base */ public function validateSign(string $body, string $sign): bool { -// $token = config('video.token'); -// if (empty($token)) { -// throw new BusinessException("Video Token Config Error"); -// } -// dump($token); + $token = config('video.token'); + if (empty($token)) { + throw new BusinessException("Video Token Config Error"); + } - $hash = hash_hmac( 'sha256', $body, "NDc5MzExMDIYdusl2NDMxNDg5L", true ); + $hash = hash_hmac( 'sha256', $body, $token, true ); $sys_sign = base64_encode($hash); - dump($sign); - dump($sys_sign); if ($sign != $sys_sign) { return false; }