@php $fmt = fn ($v) => '$'.number_format((float) $v, 2); $chip = [ 'succeeded' => 'bg-green-500/15 text-green-400', 'pending' => 'bg-amber-500/15 text-amber-400', 'processing' => 'bg-blue-500/15 text-blue-400', 'failed' => 'bg-red-500/15 text-red-400', 'refunded' => 'bg-indigo-500/15 text-indigo-300', 'partially_refunded' => 'bg-indigo-500/15 text-indigo-300', 'cancelled' => 'bg-slate-500/15 text-slate-400', ]; @endphp
@forelse ($payments as $p) @empty @endforelse
Customer Gateway Amount Status Transaction Date Actions
{{ $p->user?->name ?? '—' }}
{{ $p->user?->email }}
{{ ucfirst(str_replace('_', ' ', $p->gateway)) }} {{ $fmt($p->amount) }} @if ((float) $p->amount_refunded > 0)
− {{ $fmt($p->amount_refunded) }}
@endif
{{ str_replace('_', ' ', $p->status) }} {{ $p->transaction_id ?? $p->reference ?? '—' }} {{ $p->created_at->format('M j, Y') }} @if ($p->status === 'pending') @elseif (in_array($p->status, ['succeeded', 'partially_refunded']) && (float) $p->amount_refunded < (float) $p->amount) @else — @endif
No payments found.
{{ $payments->links('pagination.dark') }}
{{-- Record manual payment modal --}} @if ($showRecord)

Record a Payment

@error('userEmail')

{{ $message }}

@enderror
@error('amount')

{{ $message }}

@enderror
@endif {{-- Refund modal --}} @if ($refundTarget)

Refund Payment

{{ $refundTarget->user?->name }} · paid {{ $fmt($refundTarget->amount) }} via {{ ucfirst(str_replace('_', ' ', $refundTarget->gateway)) }}

@error('refundAmount')

{{ $message }}

@enderror

Gateways without a live driver record the refund; the customer is refunded out-of-band.

@endif