Closed robsontenorio closed 4 years ago
I am getting invalid signature error from webhook. After debug just noticed :
$request->except()
$request->all()
The problem is $request automatically includes a extra field q, and this field should not be included on signature validation process.
$request
q
https://github.com/laravel/cashier-paddle/blob/409f9305093ca57c78588c82671691c7c1141a47/src/Http/Middleware/VerifyWebhookSignature.php#L45
By removing q from field list it works.
$fields = $request->except([self::SIGNATURE_KEY, 'q']);
store()
dd($request->all()))
It was a problem with nginx config
before
try_files $uri $uri/ /index.php?q=$uri&$args;
after
try_files $uri $uri/ /index.php?$query_string;
Description:
I am getting invalid signature error from webhook. After debug just noticed :
$request->except()
, so$request->all()
The problem is
$request
automatically includes a extra fieldq
, and this field should not be included on signature validation process.https://github.com/laravel/cashier-paddle/blob/409f9305093ca57c78588c82671691c7c1141a47/src/Http/Middleware/VerifyWebhookSignature.php#L45
By removing
q
from field list it works.Steps To Reproduce:
store()
method placedd($request->all()))
q