diff --git a/app/PaymentDrivers/Mollie/Bancontact.php b/app/PaymentDrivers/Mollie/Bancontact.php index 50488495b99e..38dc27ce39b5 100644 --- a/app/PaymentDrivers/Mollie/Bancontact.php +++ b/app/PaymentDrivers/Mollie/Bancontact.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 Bancontact implements MethodInterface { @@ -28,9 +30,27 @@ class Bancontact implements MethodInterface $this->mollie->init(); } - public function authorizeView(array $data) { } + /** + * Show the authorization page for Bancontact. + * + * @param array $data + * @return View + */ + public function authorizeView(array $data): View + { + return render('gateways.mollie.bancontact.authorize', $data); + } - public function authorizeResponse(Request $request) { } + /** + * Handle the authorization for Bancontact. + * + * @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/lang/en/texts.php b/resources/lang/en/texts.php index 04f3816d3927..bb078c1f043b 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -4313,6 +4313,7 @@ $LANG = array( 'unable_to_verify_payment_method' => 'Unable to verify payment method.', 'generic_gateway_error' => 'Gateway configuration error. Please check your credentials.', 'my_documents' => 'My documents', + 'payment_method_cannot_be_preauthorized' => 'This payment method cannot be preauthorized.', ); return $LANG; diff --git a/resources/views/portal/ninja2020/gateways/mollie/bancontact/authorize.blade.php b/resources/views/portal/ninja2020/gateways/mollie/bancontact/authorize.blade.php new file mode 100644 index 000000000000..7d739d29532d --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/mollie/bancontact/authorize.blade.php @@ -0,0 +1,8 @@ +@extends('portal.ninja2020.layout.payments', ['gateway_title' => 'Bancontact', 'card_title' => +'Bancontact']) + +@section('gateway_content') + @component('portal.ninja2020.components.general.card-element-single') + {{ __('texts.payment_method_cannot_be_preauthorized') }} + @endcomponent +@endsection \ No newline at end of file