From 8f2215ff6ce8ea92c4363110ad17d6fd1c5ab744 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 25 Mar 2018 14:24:17 +0300 Subject: [PATCH] Use queues for payment emails --- app/Listeners/NotificationListener.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Listeners/NotificationListener.php b/app/Listeners/NotificationListener.php index 7640c3a3203d..a906436519ec 100644 --- a/app/Listeners/NotificationListener.php +++ b/app/Listeners/NotificationListener.php @@ -10,6 +10,7 @@ use App\Events\QuoteInvitationWasApproved; use App\Events\PaymentWasCreated; use App\Services\PushService; use App\Jobs\SendNotificationEmail; +use App\Jobs\SendPaymentEmail; use App\Notifications\PaymentCreated; /** @@ -125,7 +126,7 @@ class NotificationListener return; } - $this->contactMailer->sendPaymentConfirmation($event->payment); + dispatch(new SendPaymentEmail($event->payment)); $this->sendNotifications($event->payment->invoice, 'paid', $event->payment); $this->pushService->sendNotification($event->payment->invoice, 'paid');