From 6d92e045a3c70e717be06b2a2e79ceadb33f019f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Tue, 19 Jan 2021 12:52:57 +0300 Subject: [PATCH] Fixed portal payment method path --- app/Abstracts/Http/PaymentController.php | 12 ++++++------ app/Http/Controllers/Portal/Invoices.php | 4 ++-- resources/views/portal/invoices/show.blade.php | 2 +- resources/views/portal/invoices/signed.blade.php | 13 ++++++++++--- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/app/Abstracts/Http/PaymentController.php b/app/Abstracts/Http/PaymentController.php index 20296d60e..7f26bf472 100644 --- a/app/Abstracts/Http/PaymentController.php +++ b/app/Abstracts/Http/PaymentController.php @@ -41,15 +41,15 @@ abstract class PaymentController extends BaseController }); } - public function show(Document $document, PaymentRequest $request) + public function show(Document $invoice, PaymentRequest $request) { - $this->setContactFirstLastName($document); + $this->setContactFirstLastName($invoice); - $confirm_url = $this->getConfirmUrl($document); + $confirm_url = $this->getConfirmUrl($invoice); $html = view('partials.portal.payment_method.' . $this->type, [ 'setting' => $this->setting, - 'invoice' => $document, + 'invoice' => $invoice, 'confirm_url' => $confirm_url, ])->render(); @@ -62,9 +62,9 @@ abstract class PaymentController extends BaseController ]); } - public function signed(Document $document, PaymentRequest $request) + public function signed(Document $invoice, PaymentRequest $request) { - return $this->show($document, $request); + return $this->show($invoice, $request); } public function cancel(Document $invoice, $force_redirect = false) diff --git a/app/Http/Controllers/Portal/Invoices.php b/app/Http/Controllers/Portal/Invoices.php index b3468aeff..3104cf9fb 100644 --- a/app/Http/Controllers/Portal/Invoices.php +++ b/app/Http/Controllers/Portal/Invoices.php @@ -111,10 +111,10 @@ class Invoices extends Controller redirect()->route('login'); } - $payment_methods = Modules::getPaymentMethods(); - $payment_actions = []; + $payment_methods = Modules::getPaymentMethods(); + foreach ($payment_methods as $payment_method_key => $payment_method_value) { $codes = explode('.', $payment_method_key); diff --git a/resources/views/portal/invoices/show.blade.php b/resources/views/portal/invoices/show.blade.php index 9b91663ca..5bf83f11c 100644 --- a/resources/views/portal/invoices/show.blade.php +++ b/resources/views/portal/invoices/show.blade.php @@ -60,7 +60,7 @@
@php $is_active = true; @endphp - + @foreach ($payment_methods as $key => $name) @stack('invoice_{{ $key }}_content_start')
diff --git a/resources/views/portal/invoices/signed.blade.php b/resources/views/portal/invoices/signed.blade.php index a20c018b6..22c5222fd 100644 --- a/resources/views/portal/invoices/signed.blade.php +++ b/resources/views/portal/invoices/signed.blade.php @@ -66,9 +66,16 @@
@php $is_active = true; @endphp -
- -
+ + @foreach ($payment_methods as $key => $name) + @stack('invoice_{{ $key }}_content_start') +
+ +
+ @stack('invoice_{{ $key }}_content_end') + + @php $is_active = false; @endphp + @endforeach