{{ config('app.name', 'Dream Drives') }}

Payment receipt

@php // Amount + currency (robust) $amountCents = isset($amountCents) ? (int) $amountCents : (int) ($payment->amount_cents ?? $payment->amount ?? 0); $code = strtoupper($currency ?? $payment->currency ?? $job->currency ?? 'NZD'); $symbols = ['NZD'=>'NZ$', 'USD'=>'$', 'AUD'=>'A$', 'EUR'=>'€', 'GBP'=>'£', 'CAD'=>'C$']; $sym = $symbols[$code] ?? $code; $formatted = number_format($amountCents / 100, 2); // Date formatter $fmtDate = function($v) { try { if ($v instanceof \Carbon\Carbon || $v instanceof \Illuminate\Support\Carbon) { $c = $v; } else { $c = \Carbon\Carbon::parse($v); } return $c->format('D d M Y, h:ia'); } catch (\Throwable $e) { return $v ?: null; } }; $startText = isset($startAt) ? $fmtDate($startAt) : null; $endText = isset($endAt) ? $fmtDate($endAt) : null; @endphp>
Amount:
{{ $sym }} {{ $formatted }} {{ $code }}
@if(!empty($bookingRef))
Booking reference:
{{ $bookingRef }}
@endif @if($startText || $endText)
Hire dates:
@if($startText && $endText) {{ $startText }}  –  {{ $endText }} @elseif($startText) {{ $startText }} @elseif($endText) {{ $endText }} @endif
@endif @if(!empty($payment?->reference))
Reference:
{{ $payment->reference }}
@endif @if(!empty($payment?->stripe_charge ?? $payment?->stripe_charge_id))
Charge:
{{ $payment->stripe_charge ?? $payment->stripe_charge_id }}
@endif @if(!empty($job?->customer_name))
Customer:
{{ $job->customer_name }}
@endif

Thank you for your payment.