Skip to content

Commit

Permalink
Added more info to payments page
Browse files Browse the repository at this point in the history
  • Loading branch information
Raccoon254 committed Jun 16, 2024
1 parent d7691cb commit f4df2aa
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 6 deletions.
8 changes: 7 additions & 1 deletion app/Livewire/OrderPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,20 @@ public function getPaymentDetails($method): array
'logo' => asset('images/paypal.png'),
'instructions' => 'Please send your payment to our PayPal address:
[email protected]',
'link' => 'https://www.paypal.com/paypalme/raccoon254',
'address' => '[email protected]',
],
'cash_app' => [
'logo' => asset('images/cash-app-logo.png'),
'instructions' => 'Please send your payment to our Cash App username: $stevovosti64',
'instructions' => 'Please send your payment to our Cash App username: stevovosti64',
'link' => 'https://cash.app/stevo',
'address' => 'stevo',
],
'zelle' => [
'logo' => asset('images/zelle.png'),
'instructions' => 'Please send your payment to our Zelle phone number: +254 790 743 009',
'link' => 'https://www.zellepay.com/',
'address' => '+254 790 743 009',
],
];

Expand Down
28 changes: 23 additions & 5 deletions resources/views/orders/payment.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,36 @@ class="absolute top-0 right-0 bg-blue-500 text-white p-2 rounded-bl-lg rounded-t
<form wire:submit.prevent="pay">
<div class="mb-4">
<select wire:model.live="payment_method" class="w-full p-2 border border-gray-300 rounded-lg">
<option value="">Select Payment Method</option>
<option disabled value="">Select Payment Method</option>
@foreach($payment_methods as $method)
<option value="{{ $method }}">{{ ucfirst($method) }}</option>
@endforeach
</select>
@error('payment_method') <span class="text-red-500">{{ $message }}</span> @enderror
</div>
@if ($payment_method)
<div class="mb-4">
<img src="{{ $payment_details['logo'] }}" alt="{{ $payment_method }} Logo"
class="w-32 h-auto mb-2">
<p class="text-sm text-gray-700">{{ $payment_details['instructions'] }}</p>
<div class="mb-4 p-4 bg-green-500 rounded-lg shadow-sm">
<div class="flex items-center mb-2">
<img src="{{ $payment_details['logo'] }}" alt="{{ $payment_method }} Logo" class="w-32 h-auto mr-4">
<div>
<h4 class="text-lg font-semibold text-gray-800">{{ ucfirst($payment_method) }}</h4>
</div>
</div>
<div class="border-t flex gap-4 border-gray-200 mt-4 pt-4">
<!-- Amount to pay -->
<div class="text-sm w-1/4 bg-white p-2 rounded-md text-gray-700 mb-1">
<div class="font-normal text-xs">Amount to pay:</div>
<span class="text-green-600 text-lg font-bold">{{ $order->total_price }}</span>
<span class="text-gray-500 font-semibold text-xs">
USD
</span>
</div>
<!-- Instructions -->
<div class="text-sm text-gray-700">
<p class="font-semibold">Instructions:</p>
{{ $payment_details['instructions'] }}
</div>
</div>
</div>
@endif
@if($isPaid)
Expand Down
16 changes: 16 additions & 0 deletions resources/views/orders/verify-order-payment.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,22 @@ class="btn btn-circle btn-md btn-ghost ring ring-gray-600 ring-opacity-20">
@else
<p>No attachments for this order</p>
@endif

<div class="pb-6 mb-3 border-b border-gray-200">
<!-- Links back to the all orders and dashboard -->
<div class="flex gap-4 mt-4">
<a href="{{ route('orders.index') }}"
class="btn btn-md btn-ghost ring ring-gray-600 ring-opacity-20">
<i class="fas fa-arrow-left"></i>
<span>Back to Orders</span>
</a>
<a href="{{ route('dashboard') }}"
class="btn btn-md btn-ghost ring ring-gray-600 ring-opacity-20">
<i class="fas fa-home"></i>
<span>Dashboard</span>
</a>
</div>
</div>
<h3 class="text-xl font-semibold mb-4">Powered by</h3>
<div class="flex space-x-3 opacity-50 mb-8">
@foreach($payment_methods as $method)
Expand Down

0 comments on commit f4df2aa

Please sign in to comment.