@extends('layouts.app') @section('title', $transaction->reference) @section('content')

{{ $transaction->reference }}

{{ $transaction->customer->display_name }} · {{ $transaction->status }}

Receipt @if ($transaction->status === 'success')
@csrf @method('DELETE')
@endif
@include('components.kpi', ['label' => 'Amount received', 'value' => money($transaction->amount, $transaction->currency), 'variant' => 'good', 'href' => '#']) @include('components.kpi', ['label' => 'Allocated', 'value' => money($transaction->amount_allocated, $transaction->currency), 'variant' => 'info', 'href' => '#allocations']) @include('components.kpi', ['label' => 'Unallocated', 'value' => money($transaction->unallocated_amount, $transaction->currency), 'variant' => $transaction->unallocated_amount > 0 ? 'warn' : 'good', 'href' => '#']) @include('components.kpi', ['label' => 'Gateway fee', 'value' => money($transaction->fee_amount, $transaction->currency), 'delta' => $transaction->net_amount.' net', 'href' => '#'])

Transaction detail

Reference
{{ $transaction->reference }}
Paid at
{{ $transaction->paid_at?->format('d M Y H:i') ?: 'Not confirmed' }}
Method
{{ title_case_words($transaction->method) }}
Payer reference
{{ $transaction->payer_reference ?: '—' }}
Gateway
{{ $transaction->gateway?->name ?: 'Manual entry' }}
Gateway reference
{{ $transaction->gateway_reference ?: '—' }}
Status
{{ $transaction->status }}
Net of fees
{{ money($transaction->net_amount, $transaction->currency) }}
Recorded by
{{ $transaction->collector?->name ?? 'Gateway webhook' }}
Refunded
{{ $transaction->refunds->count() > 0 ? money($transaction->refunds->sum('amount'), $transaction->currency) : 'None' }}
@if ($transaction->notes)
Notes

{{ $transaction->notes }}

@endif

Invoice allocations

{{ $transaction->allocations->count() }} invoice(s)
@forelse ($transaction->allocations as $allocation) @empty @endforelse
InvoiceAmount appliedInvoice status
{{ $allocation->invoice->invoice_number }} {{ money($allocation->amount_allocated, $transaction->currency) }} {{ $allocation->invoice->status }}
@include('components.empty-state', ['icon' => '💳', 'title' => 'Not allocated', 'message' => 'This payment is held as account credit.'])
@if ($transaction->raw_response)

Raw gateway payload

{{ is_string($transaction->raw_response) ? $transaction->raw_response : json_encode($transaction->raw_response, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES) }}
@endif @endsection