diff --git a/app/Abstracts/Http/PaymentController.php b/app/Abstracts/Http/PaymentController.php
index b2f72614c..73249847f 100644
--- a/app/Abstracts/Http/PaymentController.php
+++ b/app/Abstracts/Http/PaymentController.php
@@ -43,12 +43,28 @@ abstract class PaymentController extends BaseController
public function show(Invoice $invoice, PaymentRequest $request)
{
- return $this->getInvoiceShow($invoice, 'show');
+ $this->setContactFirstLastName($invoice);
+
+ $confirm_url = $this->getConfirmUrl($invoice);
+
+ $html = view('partials.portal.payment_method.' . $this->type, [
+ 'setting' => $this->setting,
+ 'invoice' => $invoice,
+ 'confirm_url' => $confirm_url,
+ ])->render();
+
+ return response()->json([
+ 'code' => $this->setting['code'],
+ 'name' => $this->setting['name'],
+ 'description' => trans($this->alias . '::general.description'),
+ 'redirect' => false,
+ 'html' => $html,
+ ]);
}
public function signed(Invoice $invoice, PaymentRequest $request)
{
- return $this->getInvoiceShow($invoice, 'signed');
+ return $this->show($invoice, $request);
}
public function cancel(Invoice $invoice, $force_redirect = false)
@@ -99,27 +115,6 @@ abstract class PaymentController extends BaseController
]);
}
- public function getInvoiceShow(Invoice $invoice, $view = 'show')
- {
- $this->setContactFirstLastName($invoice);
-
- $confirm_url = $this->getConfirmUrl($invoice);
-
- $html = view('partials.portal.payment_method.' . $this->type . '.' . $view, [
- 'setting' => $this->setting,
- 'invoice' => $invoice,
- 'confirm_url' => $confirm_url,
- ])->render();
-
- return response()->json([
- 'code' => $this->setting['code'],
- 'name' => $this->setting['name'],
- 'description' => trans($this->alias . '::general.description'),
- 'redirect' => false,
- 'html' => $html,
- ]);
- }
-
public function getInvoiceUrl($invoice)
{
return $this->user
diff --git a/resources/views/partials/portal/payment_method/hosted/show.blade.php b/resources/views/partials/portal/payment_method/hosted.blade.php
similarity index 100%
rename from resources/views/partials/portal/payment_method/hosted/show.blade.php
rename to resources/views/partials/portal/payment_method/hosted.blade.php
diff --git a/resources/views/partials/portal/payment_method/hosted/signed.blade.php b/resources/views/partials/portal/payment_method/hosted/signed.blade.php
deleted file mode 100644
index 73b1079a3..000000000
--- a/resources/views/partials/portal/payment_method/hosted/signed.blade.php
+++ /dev/null
@@ -1,15 +0,0 @@
-