diff --git a/app/PaymentDrivers/Razorpay/Hosted.php b/app/PaymentDrivers/Razorpay/Hosted.php index 28f9be178172..147085e7bb45 100644 --- a/app/PaymentDrivers/Razorpay/Hosted.php +++ b/app/PaymentDrivers/Razorpay/Hosted.php @@ -13,10 +13,12 @@ namespace App\PaymentDrivers\Razorpay; -use App\Http\Requests\Request; use App\Http\Requests\ClientPortal\Payments\PaymentResponseRequest; +use App\Http\Requests\Request; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\RazorpayPaymentDriver; +use Illuminate\Http\RedirectResponse; +use Illuminate\View\View; class Hosted implements MethodInterface { @@ -29,11 +31,33 @@ class Hosted implements MethodInterface $this->razorpay->init(); } - public function authorizeView(array $data) { } + /** + * Show the authorization page for Razorpay. + * + * @param array $data + * @return View + */ + public function authorizeView(array $data): View + { + return render('gateways.razorpay.hosted.authorize', $data); + } - public function authorizeResponse(Request $request) { } + /** + * Handle the authorization page for Razorpay. + * + * @param Request $request + * @return RedirectResponse + */ + public function authorizeResponse(Request $request): RedirectResponse + { + return redirect()->route('client.payment_methods.index'); + } - public function paymentView(array $data) { } + public function paymentView(array $data) + { + } - public function paymentResponse(PaymentResponseRequest $request) { } + public function paymentResponse(PaymentResponseRequest $request) + { + } } diff --git a/resources/views/portal/ninja2020/gateways/razorpay/hosted/authorize.blade.php b/resources/views/portal/ninja2020/gateways/razorpay/hosted/authorize.blade.php new file mode 100644 index 000000000000..4f78e4bb4fd4 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/razorpay/hosted/authorize.blade.php @@ -0,0 +1,8 @@ +@extends('portal.ninja2020.layout.payments', ['gateway_title' => ctrans('texts.aio_checkout'), 'card_title' => +ctrans('texts.aio_checkout')]) + +@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