Thanks — payment received ✅

Your payment was successful and your booking is now confirmed.

We’re genuinely grateful you’ve chosen to hire a car with us — we look forward to meeting you soon.

@php // 1) Prefer the exact Booking Reference passed from the pay page (?ref=...) $refFromQuery = request('ref'); // 2) Fallbacks if the query param isn't present $candidates = [ 'job.ref', 'job.reference', 'job.booking_reference', 'job.reservation_number', 'booking_reference', 'reservation_number', 'metadata.job_ref', 'metadata.job_reference', 'meta.job_ref', 'meta.job_reference', ]; $fallbackRef = null; foreach ($candidates as $key) { $val = data_get($payment ?? [], $key); if (is_string($val) && trim($val) !== '') { $fallbackRef = trim($val); break; } } if (! $fallbackRef) { $fallbackRef = $payment->reference ?? $payment->id ?? null; // absolute last resort } $referenceToShow = $refFromQuery ?: $fallbackRef; // Booking dates (payment -> job -> booking) $startDate = data_get($payment, 'start_date') ?? data_get($payment, 'job.start_date') ?? data_get($payment, 'booking.start_date'); $endDate = data_get($payment, 'end_date') ?? data_get($payment, 'job.end_date') ?? data_get($payment, 'booking.end_date'); $start = $startDate ? \Carbon\Carbon::parse($startDate)->timezone('Pacific/Auckland')->format('j M Y, g:i A T') : null; $end = $endDate ? \Carbon\Carbon::parse($endDate)->timezone('Pacific/Auckland')->format('j M Y, g:i A T') : null; // Amount + currency symbol $amount = isset($payment->amount_cents) ? number_format($payment->amount_cents/100, 2) : null; $currency = $payment->currency ?? 'NZD'; $symbols = ['NZD'=>'$','AUD'=>'$','USD'=>'$','EUR'=>'€','GBP'=>'£','JPY'=>'¥']; $symbol = $symbols[$currency] ?? ''; @endphp
Booking Reference{{ $referenceToShow ?? '—' }}
@if($amount)
Amount{{ $symbol }}{{ $amount }} {{ $currency }}
@endif @if($start || $end)
Booking dates @if($start) {{ $start }} @endif @if($start && $end)  →  @endif @if($end) {{ $end }} @endif
@endif

A receipt has been emailed to you (if applicable).