@extends('emails.layout') @section('body') @if($recipient === 'client') {{-- Email to the CLIENT who just paid --}}
✅ Payment Confirmed!

Your payment of ₦{{ number_format($invoice->total, 2) }} has been received successfully.

Thank you for your payment!

This is your payment receipt for invoice {{ $invoice->invoice_number }} from {{ $invoice->user->business_name }}.

@else {{-- Email to the BUSINESS OWNER --}}
💰 Payment Received!

{{ $invoice->client->display_name }} has paid ₦{{ number_format($invoice->total, 2) }} for invoice {{ $invoice->invoice_number }}.

You've been paid 🎉

Great news! A payment has been confirmed on your OlaInvoice account. Login to view the full payment details.

@endif {{-- Payment details box --}}
{{ $invoice->invoice_number }}
₦{{ number_format($invoice->total, 2) }}
{{ $invoice->paid_at?->format('d/m/Y H:i') ?? now()->format('d/m/Y H:i') }}
Paystack
@if($recipient === 'client')
{{ $invoice->user->business_name }}
@else
{{ $invoice->client->display_name }}
@endif
@if($recipient === 'owner')
View Invoice →
@else

Please keep this email as your payment receipt. If you have any questions, contact {{ $invoice->user->business_name }} @if($invoice->user->email) at {{ $invoice->user->email }} @endif.

@endif @endsection