Webhook laravel Error spatie (The signature is invalid)

Viewed 336

The signature is invalid.

{"exception":"[object] (Spatie\\WebhookClient\\Exceptions\\WebhookFailed(code: 0): The signature is invalid. at /home//public_html//vendor/spatie/laravel-webhook-client/src/Exceptions/WebhookFailed.php:11)

1 Answers

in my case the error is in

'signature_header_name' => 'Signature',

must be the sent from webhook server

'signature_header_name' => 'tookan_shared_secret',

can also make custom validation ex

use Illuminate\Http\Request; use Spatie\WebhookClient\SignatureValidator\SignatureValidator; use

Spatie\WebhookClient\WebhookConfig; use Spatie\WebhookClient\Exceptions\WebhookFailed;

class CustomSignatureValidator implements SignatureValidator { public function isValid(Request $request, WebhookConfig $config): bool

Related