Skip to content

Commit abc61d5

Browse files
committed
Handle payment failure
1 parent 13d9188 commit abc61d5

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

public/css/app.css

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,10 @@ select {
684684
margin-top: 2rem;
685685
margin-bottom: 2rem;
686686
}
687+
.my-24 {
688+
margin-top: 6rem;
689+
margin-bottom: 6rem;
690+
}
687691
.ml-3 {
688692
margin-left: 0.75rem;
689693
}
@@ -735,6 +739,9 @@ select {
735739
.mt-5 {
736740
margin-top: 1.25rem;
737741
}
742+
.mt-24 {
743+
margin-top: 6rem;
744+
}
738745
.block {
739746
display: block;
740747
}
@@ -1078,6 +1085,10 @@ select {
10781085
padding-top: 0.75rem;
10791086
padding-bottom: 0.75rem;
10801087
}
1088+
.px-12 {
1089+
padding-left: 3rem;
1090+
padding-right: 3rem;
1091+
}
10811092
.py-2\.5 {
10821093
padding-top: 0.625rem;
10831094
padding-bottom: 0.625rem;
@@ -1090,10 +1101,6 @@ select {
10901101
padding-top: 1.5rem;
10911102
padding-bottom: 1.5rem;
10921103
}
1093-
.px-12 {
1094-
padding-left: 3rem;
1095-
padding-right: 3rem;
1096-
}
10971104
.pt-2 {
10981105
padding-top: 0.5rem;
10991106
}
@@ -1255,6 +1262,10 @@ select {
12551262
--tw-text-opacity: 1;
12561263
color: rgb(37 99 235 / var(--tw-text-opacity));
12571264
}
1265+
.text-green-500 {
1266+
--tw-text-opacity: 1;
1267+
color: rgb(34 197 94 / var(--tw-text-opacity));
1268+
}
12581269
.underline {
12591270
text-decoration-line: underline;
12601271
}

resources/views/transaction-done.blade.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,16 @@
1414
}
1515
</style>
1616
<body class="w-full">
17-
<div class="font-bold text-lg w-full text-center my-8">
18-
تمت عملية الدفع بنجاح
17+
<div class="font-bold text-lg w-full text-center my-24">
18+
@if(isset($response['respStatus']) && $response['respStatus'] == 'A')
19+
<p class="text-green-500">
20+
تمت عملية الدفع بنجاح
21+
</p>
22+
@else
23+
<p class="text-red-500">
24+
حدث خطأ أثناء عملية الدفع
25+
</p>
26+
@endif
1927
</div>
2028

2129
</body>

routes/web.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
Route::get('/transactions', [TransactionController::class, 'index'])->middleware(['auth'])->name('transactions');
2323
Route::post('/transactions/create', [TransactionController::class, 'create'])->middleware(['auth'])->name('new-transaction');
2424
Route::post('/transactions/{transactionRef}/refund', [TransactionController::class, 'refund'])->middleware(['auth'])->name('refund-transaction');
25+
2526
Route::get('/transaction/finalized', function (Request $request) {
26-
return view('transaction-done');
27+
return view('transaction-done')->with('response', $request->all());
2728
});
2829
Route::get('/transactions/options', function (Request $request) {
2930
return view('transaction-options');

0 commit comments

Comments
 (0)