From 6a5b559983c33bb23fc0aa2228a1598813d53849 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 6 Sep 2024 11:04:19 +1000 Subject: [PATCH] Fixes for OTP --- app/Http/Controllers/ClientPortal/PaymentController.php | 6 ------ app/Mail/Subscription/OtpCode.php | 4 ++-- resources/views/email/admin/generic.blade.php | 4 ++-- resources/views/email/client/generic.blade.php | 4 ++-- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/app/Http/Controllers/ClientPortal/PaymentController.php b/app/Http/Controllers/ClientPortal/PaymentController.php index 3ab4a714413b..949927af314d 100644 --- a/app/Http/Controllers/ClientPortal/PaymentController.php +++ b/app/Http/Controllers/ClientPortal/PaymentController.php @@ -108,12 +108,6 @@ class PaymentController extends Controller */ public function process(Request $request) { - // $request->validate([ - // 'contact_first_name' => ['required'], - // 'contact_last_name' => ['required'], - // 'contact_email' => ['required', 'email'], - // ]); - return (new InstantPayment($request))->run(); } diff --git a/app/Mail/Subscription/OtpCode.php b/app/Mail/Subscription/OtpCode.php index 1f624b3a3781..beecd91302b2 100644 --- a/app/Mail/Subscription/OtpCode.php +++ b/app/Mail/Subscription/OtpCode.php @@ -51,14 +51,14 @@ class OtpCode extends Mailable return $this->from(config('mail.from.address'), config('mail.from.name')) ->subject(ctrans('texts.otp_code_subject')) ->text('email.admin.generic_text') - ->view('email.admin.generic') + ->view('email.client.generic') ->with([ 'settings' => $this->company->settings, 'logo' => $this->company->present()->logo(), 'title' => ctrans('texts.otp_code_subject'), 'content' => ctrans('texts.otp_code_body', ['code' => $this->code]), 'whitelabel' => $this->company->account->isPaid(), - 'url' => '', + 'url' => false, 'button' => false, 'template' => $this->company->account->isPremium() ? 'email.template.admin_premium' : 'email.template.admin', ]); diff --git a/resources/views/email/admin/generic.blade.php b/resources/views/email/admin/generic.blade.php index 9177d9147da3..7c85385c7aa6 100644 --- a/resources/views/email/admin/generic.blade.php +++ b/resources/views/email/admin/generic.blade.php @@ -26,7 +26,7 @@

{{ $additional_info }}

@endisset - @isset($url) + @if($url) - @endisset + @endif @isset($signature)

{!! nl2br($signature) !!}

diff --git a/resources/views/email/client/generic.blade.php b/resources/views/email/client/generic.blade.php index 9f400d1049fb..7a36899ee98f 100644 --- a/resources/views/email/client/generic.blade.php +++ b/resources/views/email/client/generic.blade.php @@ -20,7 +20,7 @@

{{ $additional_info }}

@endisset - @isset($url) + @if($url)
- @endisset + @endif @isset($signature)

{!! nl2br($signature) !!}