@extends('layouts.admin')
@section('title', 'Payments — Admin')
@section('heading', 'Payments')
@section('content')
Refunds are issued from the Paystack dashboard; the refund webhook updates status here.
@if ($tab === 'payments')
| Date | Reference | User | Plan | Status | Amount |
@foreach ($payments as $p)
| {{ $p->created_at->format('j M Y H:i') }} | {{ $p->reference }} | {{ $p->user?->name ?? 'Deleted user' }} | {{ $p->plan?->displayName() }} | {{ $p->status->label() }} | {{ $p->formattedAmount() }} |
@endforeach
{{ $payments->links() }}
@elseif ($tab === 'subscriptions')
| User | Plan | Status | Period ends | Provider code |
@foreach ($subscriptions as $s)
| {{ $s->user->name }} | {{ $s->plan->displayName() }} | {{ $s->status->label() }} | {{ $s->current_period_end?->format('j M Y') }} | {{ $s->provider_subscription_code ?? '—' }} |
@endforeach
{{ $subscriptions->links() }}
@else
| Received | Event | Reference | Status | Error |
@foreach ($events as $e)
| {{ $e->created_at->format('j M Y H:i:s') }} | {{ $e->event }} | {{ $e->reference ?? '—' }} | {{ $e->status }} | {{ \Illuminate\Support\Str::limit($e->error, 80) }} |
@endforeach
{{ $events->links() }}
@endif
@endsection