So it turns out that the failed_jobs were adding to another sites table on Forge as I had the queue workers both set up with the same name.
Visit https://laracasts.com/discuss/channels/forge/problems-with-queues-on-forge for more info.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I wonder if anyone has experienced this before?
I'm using Laravel Cashier with Stripe, hosted on Digital Ocean with Forge and have a webhook set up for invoice.payment.failed which sends then an email to the user. The email is put onto a queue to send with the payload.
I have the failed_jobs table set up and works with other forms that send mail on the site if I force the job to fail but if the failed payment email job fails it doesn't add it to the failed_jobs table.
I've been forcing it to fail by putting a random variable in the view and can see the error in the logs but not in the failed_jobs table. Why does the failed job work for other forms but not this webhook?
Some of my code if helpful.
public function handleInvoicePaymentFailed($payload)
{
$user = $this->getUserByStripeId($payload['data']['object']['customer']);
if ($user) {
$this->mailer->failedPayment($user, $payload);
}
return new Response('Invoice Payment Failed Webhook Handled', 200);
}
public function failedPayment(User $user, $payload)
{
$view = "emails.artist.failedPayment";
$subject = "Failed to take membership payment";
$data = [
'user' => $user,
'payload' => $payload,
];
return $this->sendTo($user, $subject, $view, $data);
}
public function sendTo($user, $subject, $view, $data = [], $replyTo = null)
{
Mail::queue($view, $data, function ($message) use($user, $subject, $replyTo)
{
$message->to($user->email, $user->first_name)
->subject($subject);
if (!is_null($replyTo)) {
$message->replyTo($replyTo->email, $replyTo->first_name . ' ' . $replyTo->last_name);
}
});
}
Any ideas appreciated.
Thanks
Ralph
Please or to participate in this conversation.