{{-- Breadcrumbs & Navigation Header --}}

Review Payment: {{ $txn->invoice_no }}

{{-- "View All Payments" Button (Step 4 of Flow) --}}
{{-- Flash Messages --}} @if (session()->has('success')) @endif @if (session()->has('error')) @endif @if (session()->has('info')) @endif @php $isPaidOrApproved = in_array(strtolower($txn->payment_status), ['approved', 'paid', 'success']); $hasAttachment = $txn->hasMedia('payment_attachments') || !empty($txn->attachment); @endphp
{{-- Left Column: Proof of Payment & Receipt Preview --}}
Proof of Payment Attachment
@if ($txn->hasMedia('payment_attachments') || !empty($txn->attachment)) Attachment Available @else No Attachment @endif
@if ($txn->hasMedia('payment_attachments')) @php $mediaList = $txn->getMedia('payment_attachments'); @endphp @foreach ($mediaList as $media) @php $mediaUrl = route('season-transactions.attachment', [ 'transaction' => $txn->id, 'media' => $media->id, ]); $isImage = str_starts_with($media->mime_type, 'image/') || in_array(strtolower($media->extension), [ 'jpg', 'jpeg', 'png', 'webp', 'gif', ]); @endphp @if ($isImage)
Payment Receipt
@else
{{ $media->file_name }}

{{ $media->extension }} Document ({{ $media->human_readable_size }})

@endif @endforeach @elseif (!empty($txn->attachment)) {{-- Legacy fallback --}} @php $fileUrl = $txn->attachment_url; $isImage = $txn->isAttachmentImage(); $ext = strtolower(pathinfo($txn->attachment, PATHINFO_EXTENSION)); @endphp @if ($isImage)
Payment Receipt
@else
{{ basename($txn->attachment) }}

{{ $ext }} Document

@endif @else

No proof of payment file was attached by the customer.

Please cross-check using bank reference no {{ $txn->reference_no ?: '-' }} before approval.
@endif
{{-- Metadata Box --}}
External Txn ID: {{ $txn->external_transaction_id }}
Submitted Time: {{ $txn->submitted_at ? $txn->submitted_at->format('d/m/Y H:i:s') : '-' }}
Bank Reference No: {{ $txn->reference_no ?: 'None provided' }}
{{-- Right Column: Payment Details & Approval Form --}}
Payment & Season Pass Details
@php $status = strtolower($txn->payment_status); $isOnline = in_array(strtolower($txn->payment_method), [ 'online', 'online_gateway', 'gateway', 'eghl', 'fiuu', ]); if ($isOnline && in_array($status, ['pending', 'unpaid'])) { $badge = 'bg-secondary-subtle text-secondary border border-secondary'; $statusLabel = 'Incomplete (Online)'; } else { $badge = match ($status) { 'approved', 'success', 'paid' => 'bg-success text-white', 'pending_approval', 'pending' => 'bg-warning text-dark', 'failed', 'rejected' => 'bg-danger text-white', default => 'bg-secondary text-white', }; $statusLabel = ucwords(str_replace('_', ' ', $status)); } @endphp Status: {{ $statusLabel }}
{{-- Summary Info List --}}
  • Parking Site {{ $txn->site->site_name ?? 'Site #' . $txn->site_id }}
  • Customer Name {{ $txn->customer_name }}
  • Season Pass ID {{ $txn->seasonPass?->external_season_id ?? '-' }}
  • Vehicles Registered
    @php $pass = $txn->seasonPass; $bays = $pass && $pass->bays ? $pass->bays->sortBy('bay_number') : collect(); @endphp @if ($bays->isNotEmpty()) @foreach ($bays as $bay)
    Bay #{{ $bay->bay_number }} ({{ $bay->bay_code }}) : @php $plates = $bay->plates; @endphp @if (!empty($plates)) @foreach ($plates as $p) {{ $p }} @endforeach @else - @endif
    @endforeach @elseif ($pass && !empty($pass->all_plates)) @foreach ($pass->all_plates as $p) {{ $p }} @endforeach @elseif ($pass && $pass->vehicle_no_1) {{ $pass->vehicle_no_1 }} @else - @endif
  • Coverage Period (Billing Month) @if ($txn->period_start && $txn->period_end) {{ $txn->period_start->format('d/m/Y') }} – {{ $txn->period_end->format('d/m/Y') }} @if ($txn->period_start->format('Y-m') === $txn->period_end->format('Y-m')) {{ $txn->period_start->format('F Y') }} @else {{ $txn->period_start->format('M Y') }} – {{ $txn->period_end->format('M Y') }} @endif @elseif ($txn->billing_month) {{ \Carbon\Carbon::parse($txn->billing_month)->format('F Y') }} @else - @endif
  • Payment / Submitted Date {{ $txn->payment_date ? $txn->payment_date->format('d/m/Y H:i') : ($txn->submitted_at ? $txn->submitted_at->format('d/m/Y H:i') : '-') }}
  • Payment Method {{ ucwords(str_replace('_', ' ', $txn->payment_method)) }}
  • Total Amount RM {{ number_format($txn->amount, 2) }}
  • @if ($txn->approved_by)
  • Processed By {{ $txn->approved_by }} ({{ $txn->approved_at?->format('d/m/Y H:i') }})
  • @endif @if ($txn->remarks)
  • Approval Remarks
    {{ $txn->remarks }}
  • @endif {{-- @if (!empty($txn->gateway_response))
  • Gateway Response (eGHL JSON) Callback Payload
    {{ json_encode($txn->gateway_response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}
  • @endif --}}
@if ($txn->payment_status === 'pending_approval') {{-- Approval Form --}}
Set Payment Coverage Period & Remarks
The period covered by this payment (e.g. up to end of August/September). Barrier validity will remain preserved.
@php $passEndDate = $txn->seasonPass?->end_date; $isBacklogApproval = $passEndDate && $txn->period_end && \Carbon\Carbon::parse($txn->period_end)->isBefore($passEndDate); @endphp @if ($isBacklogApproval)
Corporate Courtesy Access Notice: This payment covers an unbilled / backlog period. The pass currently has barrier access granted until {{ $passEndDate->format('d/m/Y') }}. Upon approval, the financial coverage will be recorded for this period and barrier access will NOT be rolled back.
@endif
Approving will mark transaction {{ $txn->invoice_no }} as Approved and record the coverage period for the customer.
{{-- Actions --}}
@else {{-- Already Processed or Incomplete Online State --}} @if ($isOnline && in_array($status, ['pending', 'unpaid'])) {{-- Online Payment Awaiting Callback / Verification card - Temporarily commented out
Online Payment Awaiting Callback / Verification

This transaction was initiated via eGHL Online Gateway. If the customer completed payment on the gateway but the browser dropped connection or was closed before redirecting back, you can query eGHL directly to reconcile and update the status.

Payment ID / Order No: {{ $txn->invoice_no }}
Amount: RM {{ number_format($txn->amount, 2) }}
Current System Status: Pending
--}} @else @if ($isPaidOrApproved)
Payment Successfully Approved & Paid

This transaction was recorded as {{ ucwords($txn->payment_status) }} on {{ $txn->approved_at?->format('d/m/Y H:i') ?? $txn->updated_at->format('d/m/Y H:i') }}.

@else
Transaction Already Processed

This transaction was recorded as {{ ucwords($txn->payment_status) }} on {{ $txn->approved_at?->format('d/m/Y H:i') ?? $txn->updated_at->format('d/m/Y H:i') }}.

@endif @endif @endif
@push('local-js') @endpush