From 1d0c09ab6ff8060b826bf605789fd5a9bbf0c0c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 4 Oct 2021 15:48:13 +0200 Subject: [PATCH] Authorization --- app/PaymentDrivers/Mollie/IDEAL.php | 24 +++++++++++++++++-- .../gateways/mollie/ideal/authorize.blade.php | 8 +++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 resources/views/portal/ninja2020/gateways/mollie/ideal/authorize.blade.php diff --git a/app/PaymentDrivers/Mollie/IDEAL.php b/app/PaymentDrivers/Mollie/IDEAL.php index 95d629dc83fb..1b0251278e45 100644 --- a/app/PaymentDrivers/Mollie/IDEAL.php +++ b/app/PaymentDrivers/Mollie/IDEAL.php @@ -16,6 +16,8 @@ use App\Http\Requests\Request; use App\Http\Requests\ClientPortal\Payments\PaymentResponseRequest; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\MolliePaymentDriver; +use Illuminate\Http\RedirectResponse; +use Illuminate\View\View; class IDEAL implements MethodInterface { @@ -28,9 +30,27 @@ class IDEAL implements MethodInterface $this->mollie->init(); } - public function authorizeView(array $data) { } + /** + * Show the authorization page for iDEAL. + * + * @param array $data + * @return View + */ + public function authorizeView(array $data): View + { + return render('gateways.mollie.ideal.authorize', $data); + } - public function authorizeResponse(Request $request) { } + /** + * Handle the authorization for iDEAL. + * + * @param Request $request + * @return RedirectResponse + */ + public function authorizeResponse(Request $request): RedirectResponse + { + return redirect()->route('client.payment_methods.index'); + } public function paymentView(array $data) { } diff --git a/resources/views/portal/ninja2020/gateways/mollie/ideal/authorize.blade.php b/resources/views/portal/ninja2020/gateways/mollie/ideal/authorize.blade.php new file mode 100644 index 000000000000..1603a11799b6 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/mollie/ideal/authorize.blade.php @@ -0,0 +1,8 @@ +@extends('portal.ninja2020.layout.payments', ['gateway_title' => 'iDEAL', 'card_title' => +'iDEAL']) + +@section('gateway_content') + @component('portal.ninja2020.components.general.card-element-single') + {{ __('texts.payment_method_cannot_be_preauthorized') }} + @endcomponent +@endsection