芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/myvyralapp.com/bck/vendor/shakurov/coinbase/src/Http/Middleware/VerifySignature.php
header('X-CC-Webhook-Signature'); if (! $signature) { throw WebhookFailed::missingSignature(); } if (! $this->isValid($signature, $request->getContent())) { throw WebhookFailed::invalidSignature($signature); } return $next($request); } protected function isValid(string $signature, string $payload): bool { $secret = config('coinbase.webhookSecret'); if (empty($secret)) { throw WebhookFailed::sharedSecretNotSet(); } $computedSignature = hash_hmac('sha256', $payload, $secret); return hash_equals($signature, $computedSignature); } }