From 4fba838ee884779784527cc09c7fa1317947c2e2 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 16 Apr 2021 17:16:32 +1000 Subject: [PATCH 1/2] Minor fixes for initializing the mail malier --- app/Providers/MailServiceProvider.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/app/Providers/MailServiceProvider.php b/app/Providers/MailServiceProvider.php index b3ec87da41..3a3f16eac7 100644 --- a/app/Providers/MailServiceProvider.php +++ b/app/Providers/MailServiceProvider.php @@ -18,28 +18,30 @@ class MailServiceProvider extends MailProvider public function boot() { - $this->app['mail.manager']->extend('postmark', function () { - return new PostmarkTransport( - $this->guzzle(config('postmark.guzzle', [])), - config('postmark.secret', config('services.postmark.secret')) - ); - }); + } protected function registerIlluminateMailer() { - // $this->app->singleton('mail.manager', function($app) { - // return new GmailTransportManager($app); - // }); - - $this->app->bind('mail.manager', function($app) { + $this->app->singleton('mail.manager', function($app) { return new GmailTransportManager($app); }); + + // $this->app->bind('mail.manager', function($app) { + // return new GmailTransportManager($app); + // }); $this->app->bind('mailer', function ($app) { return $app->make('mail.manager')->mailer(); }); + $this->app['mail.manager']->extend('postmark', function () { + return new PostmarkTransport( + $this->guzzle(config('postmark.guzzle', [])), + config('postmark.secret') + ); + }); + } protected function guzzle(array $config): HttpClient From 7f1da78b923519b76b1a75505776fca65eb4093a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 17 Apr 2021 07:42:39 +1000 Subject: [PATCH 2/2] small fixes for bulk actions for payments --- app/Http/Controllers/PaymentController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/PaymentController.php b/app/Http/Controllers/PaymentController.php index c1463151d9..56bb7a9391 100644 --- a/app/Http/Controllers/PaymentController.php +++ b/app/Http/Controllers/PaymentController.php @@ -614,7 +614,7 @@ class PaymentController extends BaseController break; case 'email': //dispatch email to queue - $this->payment->service()->sendEmail(); + $payment->service()->sendEmail(); if (! $bulk) { return $this->itemResponse($payment);