@extends('layouts.app') @section('title', '₹'.number_format($order->amount, 2)) @section('back', auth()->user()->isAdmin() && $order->user_id !== auth()->id() ? route('admin.orders') : route('orders.index')) @section('actions') Open checkout @endsection @php $details = [ 'Order ID' => [$order->order_no, true], 'Your reference' => [$order->client_order_id, true], 'Payment account' => [$order->paymentAccount->label.' · '.($order->paymentAccount->upi_id ?? $order->paymentAccount->providerLabel()), false], 'Verification' => [$order->paymentAccount->providerLabel(), false], 'UTR' => [$order->utr, true], 'Customer-submitted UTR' => [$order->customer_utr ? $order->customer_utr.($order->utr_attempts > 1 ? " (attempt {$order->utr_attempts})" : '') : null, true], 'Provider txn ID' => [$order->provider_txn_id, true], 'Customer name' => [$order->customer_name, false], 'Customer mobile' => [$order->customer_mobile, false], 'Customer email' => [$order->customer_email, false], 'Note' => [$order->note, false], ]; $timeline = [['Order created', $order->created_at, 'plus', 'bg-slate-100 text-slate-600']]; if ($order->utr_submitted_at) { $timeline[] = ['Customer submitted UTR '.$order->customer_utr, $order->utr_submitted_at, 'receipt', 'bg-sky-100 text-sky-700']; } if ($order->review_note && $order->status !== 'paid') { $timeline[] = ['UTR rejected: '.$order->review_note, null, 'x', 'bg-red-100 text-red-700']; } if ($order->status === 'review') { $timeline[] = ['Waiting for your review', null, 'shield', 'bg-sky-100 text-sky-700']; } elseif ($order->status === 'paid') { $timeline[] = ['Payment received'.match ($order->verified_by) { 'manual' => ' (marked manually)', 'utr_review' => ' (UTR matched)', default => ' (auto verified)' }, $order->paid_at, 'check', 'bg-emerald-100 text-emerald-700']; } elseif ($order->status === 'expired') { $timeline[] = ['Link expired without payment', $order->expires_at, 'clock', 'bg-slate-100 text-slate-500']; } else { $timeline[] = ['Waiting for payment · expires '.$order->expires_at->diffForHumans(), null, 'clock', 'bg-amber-100 text-amber-700']; } @endphp @section('subtitle') {{ $order->order_no }} @endsection @section('content')
Payment details
@foreach ($details as $label => [$value, $mono])
{{ $label }}
{{ $value ?: '—' }}
@endforeach
Webhook deliveries
@if ($order->user->webhook_url){{ $order->user->webhook_url }}@endif
@if ($order->webhookLogs->isEmpty()) @unless ($order->user->webhook_url)Set webhook URL@endunless @else @foreach ($order->webhookLogs->sortByDesc('id') as $log) @endforeach
EventAttemptResponseTime
{{ $log->event }} #{{ $log->attempt }} {{ $log->response_code ?? 'No response' }}
{{ Str::limit($log->response_body, 60) }}
{{ $log->created_at->format('d M, h:i:s A') }}
@endif
Timeline
    @foreach ($timeline as [$label, $time, $icon, $tone])
  1. @unless ($loop->last)@endunless
    {{ $label }}
    @if ($time)
    {{ $time->format('d M Y, h:i:s A') }}
    @endif
  2. @endforeach
@if ($order->status === 'review')
Verify customer's payment
Customer says they paid
₹{{ number_format($order->amount, 2) }}
with UTR
{{ $order->customer_utr }}
to {{ $order->paymentAccount->upi_id }} · {{ $order->utr_submitted_at?->diffForHumans() }}
@csrf

Open your bank or UPI app, find a ₹{{ number_format($order->amount, 2) }} credit and type its UTR. It must match exactly.

@error('bank_utr')

{{ $message }}

@enderror
@csrf
Payment not found?

@if ($order->utr_attempts < \App\Models\Order::MAX_UTR_ATTEMPTS) The customer will be asked to check and resubmit ({{ \App\Models\Order::MAX_UTR_ATTEMPTS - $order->utr_attempts }} {{ Str::plural('attempt', \App\Models\Order::MAX_UTR_ATTEMPTS - $order->utr_attempts) }} left). @else This was the customer's last attempt; rejecting will expire the order. @endif

@elseif ($order->status !== 'paid')
Actions
@csrf
@csrf
Mark as paid manually

Only after you see ₹{{ number_format($order->amount, 2) }} credited in your bank or UPI app.

@endif
@endsection