@if ($paymentStatus === 'failed') @if (!empty($invoice->last_finalization_error)) @endif @endif @if (!empty($invoice->hosted_invoice_url)) @endif @if ($paymentStatus === 'success') @endif

{{ $paymentStatus === 'success' ? 'Payment Successful' : 'Payment Failed' }}

@if ($paymentStatus === 'success') Your subscription payment has been successfully processed. @else We were unable to process your subscription payment. Please update your payment method to avoid interruption to your subscription. @endif

Invoice Details

Invoice Number {{ $invoice->number ?? 'N/A' }}
Customer {{ $invoice->customer_name ?? 'N/A' }}
Email {{ $invoice->customer_email ?? 'N/A' }}
Payment Status @if ($paymentStatus === 'success') Paid @else Failed @endif
Currency {{ strtoupper($invoice->currency ?? 'n/a') }}

Invoice Items

@if (!empty($invoice->lines) && !empty($invoice->lines->data)) @foreach ($invoice->lines->data as $line) @php $currency = strtoupper($line->currency ?? $invoice->currency ?? 'n/a'); $quantity = $line->quantity ?? 1; $amount = ($line->amount ?? 0) / 100; $subtotal = ($line->subtotal ?? $line->amount ?? 0) / 100; $tax = 0; if (!empty($line->taxes)) { foreach ($line->taxes as $lineTax) { $tax += ($lineTax->amount ?? 0) / 100; } } @endphp @endforeach
Description Qty Unit Price GST / Tax Total
{{ $line->description ?? 'Subscription' }} @if (!empty($line->period))
Billing Period: {{ \Carbon\Carbon::createFromTimestamp($line->period->start)->format('d M Y') }} - {{ \Carbon\Carbon::createFromTimestamp($line->period->end)->format('d M Y') }}
@endif
{{ $quantity }} {{ $currency }} {{ number_format($subtotal, 2) }} {{ $currency }} {{ number_format($tax, 2) }} {{ $currency }} {{ number_format($amount, 2) }}
@else

No invoice items found.

@endif

Payment Summary

Subtotal (excl. GST) {{ strtoupper($invoice->currency ?? 'n/a') }} {{ number_format(($invoice->subtotal_excluding_tax ?? $invoice->subtotal ?? 0) / 100, 2) }}
GST / Tax {{ strtoupper($invoice->currency ?? 'n/a') }} {{ number_format((($invoice->total ?? 0) - ($invoice->total_excluding_tax ?? $invoice->total ?? 0)) / 100, 2) }}
Total (incl. GST) {{ strtoupper($invoice->currency ?? 'n/a') }} {{ number_format(($invoice->total ?? 0) / 100, 2) }}
Payment Error

{{ $invoice->last_finalization_error->message ?? 'The payment could not be processed.' }}

Please update your payment method to avoid interruption to your subscription.

View Invoice

Thank you for your payment.

Regards,
{{ config('app.name') }}