@php($effective = $link->effectiveStatus()) @php($isPaid = $effective === \App\Enums\PaymentLinkStatus::PAID) {{-- The page is a private payment request, not something to index. --}} {{ $isPaid ? 'Payment Received' : 'Payment Request' }} — {{ $link->tenant?->name ?? config('app.name', 'BCP') }} @vite(['resources/css/app.css', 'resources/js/app.js'])
{{-- Who is asking. First, because a payment page that does not say plainly who wants the money is one people abandon. --}}
{{ mb_strtoupper(mb_substr($link->tenant?->name ?? 'B', 0, 1)) }}

Payment request from

{{ $link->tenant?->name }}

@if($outcome)
{{ $outcome }}
@endif @error('pay')
{{ $message }}
@enderror {{-- The amount leads. It is the one thing every payer checks before anything else, so it gets the largest type on the page and nothing competes with it. --}}

Amount

{{ number_format($link->amount, 2) }} {{ $link->currency }}

{{-- What it is for, laid out as a receipt rather than prose: a payer scans these, they do not read them. --}}
For
{{ $link->title }}
@if($link->reference)
Reference
{{ $link->reference }}
@endif @if($link->expires_at && ! $isPaid)
{{ $link->isExpired() ? 'Expired' : 'Pay by' }}
{{ $link->expires_at->format('M d, Y') }}
@endif @if($isPaid && $link->paid_at)
Paid on
{{ $link->paid_at->format('M d, Y') }}
@endif
{{-- Shown only when it says something the title did not. These descriptions are generated alongside the title and usually begin by repeating it, which left the payer reading the same sentence twice on a card meant to be scanned. --}} @if($link->description && ! str_starts_with(trim($link->description), trim((string) $link->title)))

{{ $link->description }}

@endif @if($isPaid)

This payment has been received

Nothing further is needed. You can close this page.

@if(! empty($returnUrl)) Back to {{ $returnName }} @endif @elseif($effective === \App\Enums\PaymentLinkStatus::EXPIRED)

This payment request has expired

Please ask {{ $link->tenant?->name }} for a new payment link.

@elseif($effective === \App\Enums\PaymentLinkStatus::CANCELLED)

This request has been withdrawn

Contact {{ $link->tenant?->name }} if you were expecting to pay it.

@elseif($canPay)
@csrf {{-- ShurjoPay refuses a payer without a phone, an address and a city. Only what nobody behind this link has on record is asked for, and the answer is kept so it is asked once. Without this the payer was sent on, refused, and told the gateway "is not responding". --}} @if (($payerFields ?? []) !== [])

ShurjoPay needs these before it can take your payment. They are kept with this account, so you are asked only once.

@foreach ($payerFields as $field => $spec)
{{-- Full-size type: a phone zooms the whole page in on a smaller field, and most payers are on one. --}} @error($field)

{{ $message }}

@enderror
@endforeach @endif {{-- The button names the act and the amount. The lock icon, the processor's name and the line explaining where the next page leads were all saying the same thing the footer already says, above the one control on the page a payer has to be sure about. --}}
@else

Online payment is unavailable

Please try again shortly.

@endif
{{-- Trust marks. Small, factual, and the last thing on the page. --}}
Secured payment · processed by ShurjoPay