From 5e4d70d69b8816378f5ee2d8685303485c6572dd Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 23 Jun 2021 07:54:06 +1000 Subject: [PATCH 1/4] Default shown tasks = invoiced --- app/DataMapper/CompanySettings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index 1d0e3b0ca559..c63386a26e4f 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -28,7 +28,7 @@ class CompanySettings extends BaseSettings public $lock_invoices = 'off'; //off,when_sent,when_paid //@implemented public $enable_client_portal_tasks = false; //@ben to implement - public $show_all_tasks_client_portal = 'all'; // all, uninvoiced, invoiced + public $show_all_tasks_client_portal = 'invoiced'; // all, uninvoiced, invoiced public $enable_client_portal_password = false; //@implemented public $enable_client_portal = true; //@implemented public $enable_client_portal_dashboard = false; // @TODO There currently is no dashboard so this is pending From 24a5548619f809b72071d3a18b8134d5439ac207 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 23 Jun 2021 08:14:23 +1000 Subject: [PATCH 2/4] Verify ACH amounts as integers --- .../VerifyPaymentMethodRequest.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 app/Http/Requests/ClientPortal/PaymentMethod/VerifyPaymentMethodRequest.php diff --git a/app/Http/Requests/ClientPortal/PaymentMethod/VerifyPaymentMethodRequest.php b/app/Http/Requests/ClientPortal/PaymentMethod/VerifyPaymentMethodRequest.php new file mode 100644 index 000000000000..12120c59552d --- /dev/null +++ b/app/Http/Requests/ClientPortal/PaymentMethod/VerifyPaymentMethodRequest.php @@ -0,0 +1,31 @@ + 'integer' + ]; + } +} From 49e1a13b53040bf5148457fd16a1afd7628dbf35 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 23 Jun 2021 08:15:03 +1000 Subject: [PATCH 3/4] Verify ACH amounts as integers --- app/PaymentDrivers/Stripe/ACH.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/PaymentDrivers/Stripe/ACH.php b/app/PaymentDrivers/Stripe/ACH.php index fa02cd32e0a9..3068ed710e83 100644 --- a/app/PaymentDrivers/Stripe/ACH.php +++ b/app/PaymentDrivers/Stripe/ACH.php @@ -13,6 +13,7 @@ namespace App\PaymentDrivers\Stripe; use App\Exceptions\PaymentFailed; +use App\Http\Requests\ClientPortal\PaymentMethod\VerifyPaymentMethodRequest; use App\Http\Requests\Request; use App\Jobs\Mail\NinjaMailerJob; use App\Jobs\Mail\NinjaMailerObject; @@ -87,7 +88,7 @@ class ACH return render('gateways.stripe.ach.verify', $data); } - public function processVerification(Request $request, ClientGatewayToken $token) + public function processVerification(VerifyPaymentMethodRequest $request, ClientGatewayToken $token) { $this->stripe->init(); From fee346e723db3b55163ce3ceca66101136817cdd Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 23 Jun 2021 08:17:22 +1000 Subject: [PATCH 4/4] Fixes for mailers --- app/Jobs/Mail/NinjaMailerJob.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index 6c9d0a374a4a..7ff82de2d6ab 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -101,7 +101,8 @@ class NinjaMailerJob implements ShouldQueue //send email try { nlog("trying to send to {$this->nmo->to_user->email} ". now()->toDateTimeString()); - + nlog("Using mailer => ". $this->mailer); + Mail::mailer($this->mailer) ->to($this->nmo->to_user->email) ->send($this->nmo->mailable); @@ -146,11 +147,7 @@ class NinjaMailerJob implements ShouldQueue { /* Singletons need to be rebooted each time just in case our Locale is changing*/ App::forgetInstance('translator'); - // App::forgetInstance('mail.manager'); //singletons must be destroyed! - // App::forgetInstance('mailer'); - // App::forgetInstance('laravelgmail'); $t = app('translator'); - /* Inject custom translations if any exist */ $t->replace(Ninja::transformTranslations($this->nmo->settings)); switch ($this->nmo->settings->email_sending_method) { @@ -165,7 +162,6 @@ class NinjaMailerJob implements ShouldQueue break; } - (new MailServiceProvider(app()))->register(); } private function setGmailMailer()