修改音视频签名
This commit is contained in:
parent
893ec62df6
commit
ca2d5e4d5a
@ -93,7 +93,7 @@ class VideoService extends BaseService
|
|||||||
$params['order_inquiry_id'] = $order_inquiry_id;
|
$params['order_inquiry_id'] = $order_inquiry_id;
|
||||||
$video_records = VideoRecord::getOne($params);
|
$video_records = VideoRecord::getOne($params);
|
||||||
if (!empty($video_records)) {
|
if (!empty($video_records)) {
|
||||||
return fail(HttpEnumCode::HTTP_ERROR, "已开过视频时间,无需再修改预约时间");
|
return fail(HttpEnumCode::HTTP_ERROR, "已开过视频,无需再修改预约时间");
|
||||||
}
|
}
|
||||||
|
|
||||||
$is_reservation = true;
|
$is_reservation = true;
|
||||||
|
|||||||
@ -737,11 +737,7 @@ Router::addGroup('/callback', function () {
|
|||||||
Router::post('/im', [CallBackController::class, 'imCallBack']);
|
Router::post('/im', [CallBackController::class, 'imCallBack']);
|
||||||
|
|
||||||
// 音视频回调
|
// 音视频回调
|
||||||
Router::addGroup('/trtc', function () {
|
Router::post('/trtc', [CallBackController::class, 'trtcCallBack']);
|
||||||
// 房间
|
|
||||||
Router::post('', [CallBackController::class, 'trtcCallBack']);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 处方平台物流回调
|
// 处方平台物流回调
|
||||||
Router::post('/platform/logistics', [CallBackController::class, 'platformLogisticsCallBack']);
|
Router::post('/platform/logistics', [CallBackController::class, 'platformLogisticsCallBack']);
|
||||||
|
|||||||
@ -24,18 +24,15 @@ class Safe extends Base
|
|||||||
*/
|
*/
|
||||||
public function validateSign(string $body, string $sign): bool
|
public function validateSign(string $body, string $sign): bool
|
||||||
{
|
{
|
||||||
// $token = config('video.token');
|
$token = config('video.token');
|
||||||
// if (empty($token)) {
|
if (empty($token)) {
|
||||||
// throw new BusinessException("Video Token Config Error");
|
throw new BusinessException("Video Token Config Error");
|
||||||
// }
|
}
|
||||||
// dump($token);
|
|
||||||
|
|
||||||
$hash = hash_hmac( 'sha256', $body, "NDc5MzExMDIYdusl2NDMxNDg5L", true );
|
$hash = hash_hmac( 'sha256', $body, $token, true );
|
||||||
|
|
||||||
$sys_sign = base64_encode($hash);
|
$sys_sign = base64_encode($hash);
|
||||||
|
|
||||||
dump($sign);
|
|
||||||
dump($sys_sign);
|
|
||||||
if ($sign != $sys_sign) {
|
if ($sign != $sys_sign) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user