Authorization

This commit is contained in:
Benjamin Beganović 2021-09-24 23:38:33 +02:00
parent 00a5c9882c
commit 20fa79d51a
3 changed files with 31 additions and 2 deletions

View File

@ -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) { }

View File

@ -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;

View File

@ -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