Account holder{{ $selectedBank->account_holder_name ?: '—' }}
Account No.{{ $selectedBank->account_number ?: '—' }}
Currency{{ $selectedBank->currency ?: '—' }}
@extends('layouts.app') @section('title', 'Purchase') @section('content') @php $badges = $delivery['badges'] ?? null; $suiteNumber = $payment->suite_number ?: $primary->suite_number; $money = $payment->selectedMoney(); $currencyMark = $money['mark']; $purchaseCount = max($lines->count(), 1); $statusLabel = optional($payment->tracking)->status ?: ($payment->status ?: 'Pending From Customer'); $statusClass = $statusLabel === 'Customer Paid' ? 'is-done' : 'is-pending'; $warehouseMarked = $pathway === 'c' && $payment->trackingHistory->contains(function ($row) { return $row->status === 'Customer Paid' && $row->wuser_id; }); if ($pathway === 'c' && $statusLabel === 'Customer Paid' && !$warehouseMarked) { $statusLabel = 'Transaction Successful'; $statusClass = 'is-done'; } $payStatus = strtolower((string) $payment->payment_status); $cardPaid = in_array($payStatus, ['success', 'completed'], true); $cardFailed = $pathway === 'a' && !$cardPaid && in_array($payStatus, ['failed', 'cancelled', 'canceled'], true); if ($cardFailed) { $statusLabel = 'Failed'; $statusClass = 'is-fail'; } elseif ($pathway === 'a' && $cardPaid) { $statusLabel = 'Customer Paid'; $statusClass = 'is-done'; } $pathwayNames = ['a' => 'Card Gateway', 'b' => 'Maldives Post Link', 'c' => 'Cash / Bank Transfer']; $methodLabel = isset($pathwayNames[$pathway]) ? 'Payment method - Pathway '.strtoupper($pathway).': '.$pathwayNames[$pathway] : 'Payment method'; $receiptDate = optional($payment->bank_transaction_date)->format('Y-m-d'); $storeIcons = $lines->map(function ($line) { $path = trim((string) $line->store_icon); if ($path === '') { $path = \App\Support\AssistedStoreIcon::match($line->url)['path']; } return [ 'store' => trim((string) $line->store) ?: 'Store', 'icon' => asset($path), ]; })->unique('store')->values(); $payCurrency = in_array(strtoupper((string) $payment->currency), ['USD', 'INR'], true) ? strtoupper((string) $payment->currency) : 'INR'; @endphp
{{ $badges['name'] }} - {{ $badges['phone'] ?? '—' }} ({{ $badges['label'] ?? '—' }})
@endif @if(!empty($delivery['address'])){{ $delivery['address'] }}
@endif{{ $purchaseCount }} {{ $purchaseCount === 1 ? 'purchase' : 'purchases' }}
@if($pathway === 'a')Status{{ $cardPaid ? 'Paid' : ($cardFailed ? 'Failed' : 'Pending') }}
Amount{{ $money['total'] !== null ? $currencyMark.number_format($money['total'], 2) : '—' }}
Paid at{{ optional($payment->paid_at)->format('d M Y, h:i A') ?: '—' }}
Order ID{{ $payment->provider_order_id ?: '—' }}
Payment ID{{ $payment->provider_payment_id ?: '—' }}
Provider{{ $payment->payment_method ?: '—' }}
@if(!$cardPaid) @endifItem subtotal{{ $money['subtotal'] !== null ? $currencyMark.number_format($money['subtotal'], 2) : '—' }}
Service charge{{ $money['fee'] !== null ? $currencyMark.number_format($money['fee'], 2) : '—' }}
Total payable{{ $money['total'] !== null ? $currencyMark.number_format($money['total'], 2) : '—' }}
Account holder{{ $selectedBank->account_holder_name ?: '—' }}
Account No.{{ $selectedBank->account_number ?: '—' }}
Currency{{ $selectedBank->currency ?: '—' }}
Bank account is not available.
@endifDate{{ $receiptDate ?: '—' }}
Transaction ID{{ $payment->bank_transactionID ?: '—' }}
@if($payment->screenshot_path) View screenshot{{ implode(', ', $shipmentFlow['numbers']) }}
@endif