{{-- M-PESA on the invoice page: the prompt on the customer's phone, or paying the paybill/till by hand. Nothing here decides that a payment succeeded: the page only shows what the server learned from Safaricom. --}} @php use Modules\Gateways\Mpesa\Services\Money; $stk = $config->bool('stk_enabled'); $manual = $config->bool('manual_enabled'); $till = $config->isTill(); $kesLabel = Money::format($dueKes); $uid = 'mpesa-'.$invoice->id; $jsStrings = [ 'sending' => __('mpesa::mpesa.customer.sending'), 'error' => __('mpesa::mpesa.customer.network_error'), 'checking' => __('mpesa::mpesa.customer.checking'), 'still' => __('mpesa::mpesa.customer.still_waiting'), 'pay' => __('mpesa::mpesa.customer.send_prompt'), 'continue' => __('mpesa::mpesa.customer.continue'), 'bad_phone' => __('mpesa::mpesa.customer.bad_phone'), 'bad_receipt' => __('mpesa::mpesa.customer.bad_receipt'), ]; @endphp
@unless($config->isProduction()) {{ __('mpesa::mpesa.customer.test_mode') }} @endunless @if(! $rate)

{{ __('mpesa::mpesa.customer.no_rate') }}

@else
{{ $config->get('display_name', 'M-PESA') }} — {{ __('mpesa::mpesa.customer.amount_due') }}
{{ $kesLabel }}
@if($sourceCurrency !== 'KES')
{{ __('mpesa::mpesa.customer.converted', ['amount' => $sourceCurrency.' '.number_format($dueSource / 100, 2)]) }}
@endif @if($config->get('description'))

{{ $config->get('description') }}

@endif @if($stk && $manual)
@endif @if($stk)

{{ __('mpesa::mpesa.customer.phone_hint') }}

@endif @if($manual) @endif @endif @if($attempts->isNotEmpty()) @foreach($attempts as $a) @endforeach
{{ __('mpesa::mpesa.customer.history_date') }}{{ __('mpesa::mpesa.customer.history_type') }}{{ __('mpesa::mpesa.customer.review_amount') }}{{ __('mpesa::mpesa.customer.history_status') }}{{ __('mpesa::mpesa.customer.history_receipt') }}
{{ $a->created_at->format(date_fmt().' H:i') }} {{ $a->type === 'stk' ? __('mpesa::mpesa.customer.tab_stk') : __('mpesa::mpesa.customer.history_code') }} {{ $a->type === 'stk' ? Money::format(Money::minor($a->amount)) : ($a->transaction ? Money::format(Money::minor($a->transaction->amount)) : '—') }} {{ __('mpesa::mpesa.request_status.'.$a->status) }} {{ $a->transaction?->receipt ?? ($a->claimed_receipt ?: '—') }}
@endif