From 0c1039f6516cfbf905d5ada274b5ff3f61120749 Mon Sep 17 00:00:00 2001 From: Nurmuhammet Allanov Date: Sun, 28 Jan 2024 21:28:16 +0500 Subject: [PATCH] wip --- .../Controllers/OnlinePaymentController.php | 2 +- .../cards/online-payment/status.blade.php | 17 ++++++++++++----- routes/web.php | 2 -- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/OnlinePaymentController.php b/app/Http/Controllers/OnlinePaymentController.php index 8f4642f..3582ccb 100644 --- a/app/Http/Controllers/OnlinePaymentController.php +++ b/app/Http/Controllers/OnlinePaymentController.php @@ -64,7 +64,7 @@ class OnlinePaymentController extends Controller } return view(OnlinePaymentRepo::statusView(), [ - 'status' => $payment_status, + 'success' => $payment_status, 'title' => $payment_status ? __('Payment is successful') : __('Payment has failed'), 'pnr' => $paymentHistory->orderNumber, 'branch_name' => $resource->branch->name, diff --git a/resources/views/orders/cards/online-payment/status.blade.php b/resources/views/orders/cards/online-payment/status.blade.php index 816b314..4b8c476 100644 --- a/resources/views/orders/cards/online-payment/status.blade.php +++ b/resources/views/orders/cards/online-payment/status.blade.php @@ -5,7 +5,7 @@ P @@ -14,10 +14,17 @@
- - - -

+ @if($success) + + + + @else + + + + @endif + +

{{ $title }}

PNR: {{ $pnr }} diff --git a/routes/web.php b/routes/web.php index a0430d7..cd685ce 100644 --- a/routes/web.php +++ b/routes/web.php @@ -33,8 +33,6 @@ Route::middleware(['auth', 'un_verified'])->group(function () { Route::post('sms-verification', [RegisterController::class, 'verifySmsCode']); }); -Route::view('test', 'orders.cards.online-payment.status'); - Route::get('online-payment-store', [OnlinePaymentController::class, 'store'])->name('online-payment-store'); Route::redirect('/', config('nova.path'));