@extends('layouts.base') @section('title', 'Pay ₹'.number_format($order->amount, 2).' to '.$order->user->displayName()) @php $merchant = $order->user->displayName(); $amount = number_format($order->amount, 2); $totalSeconds = max(1, $order->created_at->diffInSeconds($order->expires_at)); $apps = [ ['GPay', 'tez://upi/pay', 'text-[#1a73e8]'], ['PhonePe', 'phonepe://pay', 'text-[#5f259f]'], ['Paytm', 'paytmmp://pay', 'text-[#00baf2]'], ['BHIM', 'upi://pay', 'text-[#f47920]'], ]; @endphp @push('head') @endpush @section('body')
{{-- Summary --}}
Paying to
{{ $merchant }}
Amount
₹{{ $amount }}
@if ($order->note)
{{ $order->note }}
@endif
Order ID
{{ $order->order_no }}
@if ($order->customer_name)
Customer
{{ $order->customer_name }}
@endif @if ($order->paymentAccount->upi_id)
UPI ID
{{ $order->paymentAccount->upi_id }}
@endif
@if ($order->isPending())
--:--
Complete payment in time
This QR code expires automatically.
@endif
{{-- Action area --}}
@if ($order->status === 'paid')

Payment successful

₹{{ $amount }} paid to {{ $merchant }}

@if ($order->utr)
UTR
{{ $order->utr }}
@endif
Paid at
{{ $order->paid_at?->format('d M Y, h:i A') }}

You can safely close this page.

@elseif ($order->status === 'review')

Verifying your payment

{{ $merchant }} is confirming your UTR with their bank. This page updates automatically once it's approved.

Your UTR
{{ $order->customer_utr }}
Submitted
{{ $order->utr_submitted_at?->format('d M, h:i A') }}

Don't pay again. You can close this page; the merchant will be notified once it's confirmed.

@elseif ($order->status === 'expired')

Payment link expired

@if ($order->acceptsCustomerUtr())

If you already paid, don't pay again — submit your UTR below so {{ $merchant }} can confirm it.

@include('pay._utr-form', ['class' => 'mt-8 w-full max-w-sm']) @else

Please ask {{ $merchant }} for a new payment link.

If money was debited from your account, don't pay again. Share your UTR with the merchant to confirm the payment.
@endif
@elseif ($order->paymentAccount->isHosted()) @php $pgName = $order->paymentAccount->provider === 'phonepe_pg' ? 'PhonePe' : 'Paytm'; @endphp

Pay securely with {{ $pgName }}

You'll complete the payment on {{ $pgName }}'s secure checkout using UPI, card or netbanking, then come back here automatically.

@error('checkout')
{{ $message }}
@enderror
@csrf
@foreach ($apps as [$name, $scheme, $color]) {{ $name }} @endforeach Cards Netbanking
@if ($order->provider_checkout)

Already paid? Stay on this page — we're checking with {{ $pgName }} automatically.

@endif
Waiting for payment…
@else

Scan & pay with any UPI app

Open your UPI app, scan the QR and approve the payment.

UPI QR code for ₹{{ $amount }}
@foreach ($apps as [$name, $scheme, $color]) {{ $name }} @endforeach
{{-- On phones, open the UPI app directly --}}
OR PAY ON THIS PHONE
Pay ₹{{ $amount }} with UPI app
@foreach (array_slice($apps, 0, 3) as [$name, $scheme, $color]) {{ $name }} @endforeach
Or pay to UPI ID
{{ $order->paymentAccount->upi_id }}
@if ($order->acceptsCustomerUtr()) @include('pay._utr-form', ['class' => 'mt-4']) @endif
{{ $order->acceptsCustomerUtr() ? 'After paying, submit your UTR above' : 'Waiting for payment…' }}

Please don't close or refresh this page after paying.

@endif
@endsection @if (in_array($order->status, ['pending', 'review'])) @push('scripts') @endpush @endif