@php /** * One‑off Payment Page (similar to existing pay page) * File: resources/views/pay/oneoff.blade.php * * Expects from controller: * - $payment: App\Models\Payment (id, amount_cents, currency, description, status, reference) * - $amountCents: int (final charge amount in cents) // allows overrides/fees * - $currency: string (e.g., 'NZD') * - $customerEmail: ?string * - $clientSecret: ?string // for Stripe PaymentIntent (inline card via Elements) * - $checkoutUrl: ?string // for Stripe Checkout Session * - $stripePk: string // Stripe publishable key * - $attachments: Illuminate\Support\Collection * - $brand: array{name:string,logo?:string,support_email?:string,privacy_url?:string,terms_url?:string} * - $allowAttachmentUpload: bool * - $showBankDetails: bool * - $bankDetails: array{account_name?:string,account_number?:string,reference?:string,instructions?:string} */ @endphp @extends('layouts.public') @section('title', 'Secure Payment') @section('head') @endsection @section('content')
@if (!empty($brand['logo'])) @endif
Secure payment
{{ $brand['name'] ?? config('app.name') }}
PCI compliant

Pay now

Reference: {{ $payment->reference ?? ('PMT-'.$payment->id) }}
{{ strtoupper($currency) }} {{ number_format($amountCents/100, 2) }}
@if ($payment->description)
· {{ $payment->description }}
@endif
@php $hasElements = filled($clientSecret); $hasCheckout = filled($checkoutUrl); @endphp @if ($hasElements && $hasCheckout)
@endif @if ($hasElements)
@csrf
@endif @if ($hasCheckout) @endif @if ($showBankDetails ?? false)
Prefer bank transfer?
Account name: {{ $bankDetails['account_name'] ?? '' }}
Account number: {{ $bankDetails['account_number'] ?? '' }}
Reference: {{ $bankDetails['reference'] ?? ($payment->reference ?? $payment->id) }}
@if (!empty($bankDetails['instructions']))

{{ $bankDetails['instructions'] }}

@endif
@endif
@if ($hasElements) @else @endif @endsection