@php $brand = \App\Support\FormatSettings::class; $amount = $order ? \App\Support\FormatSettings::formatIn(((int) $order->total_minor) / 100, $order->currency_code) : ''; $ref = $order ? ('WA-' . $order->id) : ''; $cfg = [ 'paid' => ['#12805c', '#e7f6ef', 'Payment successful', 'Thank you! Your payment has been received.'], 'pending' => ['#b26a00', '#fdf3e3', 'Payment processing', 'If you completed the payment, this will confirm shortly. You can safely close this page.'], 'cancelled'=> ['#6b7280', '#f2f3f5', 'Payment cancelled', 'No charge was made. You can try again from WhatsApp whenever you are ready.'], 'notfound' => ['#6b7280', '#f2f3f5', 'Order not found', 'We could not find this order. Please use the latest link sent to you on WhatsApp.'], ][$state] ?? ['#6b7280', '#f2f3f5', 'Checkout', '']; @endphp {{ $cfg[2] }}
@if ($state === 'paid') @elseif ($state === 'pending') @else @endif

{{ $cfg[2] }}

{{ $cfg[3] }}

@if ($order) @if ($amount)
{{ $amount }}
@endif
Order{{ $ref }}
@if ($order->customer_name)
Name{{ $order->customer_name }}
@endif
Status{{ ucfirst($order->status) }}
@endif
Return to your WhatsApp chat for your receipt.