header('Stripe-Signature'); $event = Webhook::constructEvent( $request->getContent(), $signature, $webhookSecret ); StripeProcessJob::dispatch($event); return response('Webhook received. Cool cool cool cool cool.', 200); } catch (SignatureVerificationException) { auditLogWebhookFailure('stripe', 'invalid_signature'); return response('Invalid signature.', 400); } catch (Throwable) { auditLogWebhookFailure('stripe', 'invalid_payload'); return response('Invalid webhook.', 400); } } }