Currently, the ProcessStripeWebhookJob job dispatches the determined webhook job using:
dispatch(new $jobClass($this->webhookCall));
When stripe-webhooks.connection is set to a synchronous or custom queue connection, this is ignored, causing the job to fail or not run as expected.
Steps to reproduce:
Set stripe-webhooks.connection to a synchronous or custom connection in config/stripe-webhooks.php.
Trigger a Stripe webhook.
Observe that the job does not use the configured connection or queue.
Expected behavior:
The dispatched job should respect the stripe-webhooks.connection and stripe-webhooks.queue configuration, for example:
dispatch(new $jobClass($this->webhookCall))
->onConnection(config('stripe-webhooks.connection'))
->onQueue(config('stripe-webhooks.queue'));
Suggested solution:
Update ProcessStripeWebhookJob::handle() to dispatch jobs on the configured connection and queue.