@php // ----- Inputs expected from controller ----- // $mode: 'none' | 'charge' | 'hold' | 'charge+hold' // $job: ['id' => int, 'ref' => ?string, 'start_at' => ?string, 'end_at' => ?string] (optional) // $amount_due_cents: int // $hold_cents: int // $clientSecret: ?string (present for hold-only) // $brand: string // $currency: string like 'nzd' // $reference: ?string $mode = $mode ?? 'none'; $amountDueCents = (int)($amount_due_cents ?? 0); $holdCents = (int)($hold_cents ?? 0); $clientSecretFromServer = $clientSecret ?? null; // used for hold-only $currency = strtolower($currency ?? 'nzd'); $brand = $brand ?? config('app.name'); $publishableKey = $stripePk ?? config('services.stripe.key') ?? env('STRIPE_KEY'); $job = $job ?? null; @endphp

@if(!empty($reference))

Reference: {{ $reference }}

@endif
@if($holdCents > 0)
Refundable security hold: NZ${{ number_format($holdCents/100, 2) }} (manual capture)
@endif @if($amountDueCents > 0)
Amount due now: NZ${{ number_format($amountDueCents/100, 2) }}
@endif @if($amountDueCents <= 0 && $holdCents <= 0)
No charges or holds required.
@endif