Fetch Product Details from URL
Paste a product URL (Amazon, Flipkart, etc.). We'll fetch the title, price, and description for your assisted purchase request.
Upload Product Image or Screenshot
Upload a product image, screenshot, or photo. Our AI will extract product name, price, brand, and details from the image. You can upload screenshots from your phone, computer, or any product photo.
Assisted Purchase
Create New Purchase Request
Pending Purchases
A delivery suite is required before you continue.
@php
$pendingRequests = collect();
if (!empty($requests) && is_iterable($requests)) {
foreach ($requests as $item) {
$queueMeta = is_array($item->meta) ? $item->meta : [];
$queuePathway = $queueMeta['checkout_pathway'] ?? '';
if (isset($item->status) && strtolower(trim($item->status)) === 'pending' && $queuePathway === '') {
$pendingRequests->push($item);
}
}
}
@endphp
@forelse($pendingRequests as $r)
@php
$itemMeta = is_array($r->meta) ? $r->meta : (json_decode($r->meta ?? '{}', true) ?: []);
$priceText = trim((string) ($r->price_range ?? ''));
$priceAmount = (float) preg_replace('/[^0-9.]/', '', str_replace(',', '', $priceText));
$overheadPercent = $r->overhead_percentage !== null ? (float) $r->overhead_percentage : null;
$finalAmount = $r->final_amount !== null ? (float) $r->final_amount : null;
$feeAmount = 0.0;
if ($r->overhead_amount !== null && (float) $r->overhead_amount > 0) {
$feeAmount = round((float) $r->overhead_amount, 2);
} elseif ($priceAmount > 0 && $overheadPercent !== null) {
$feeAmount = round($priceAmount * $overheadPercent / 100, 2);
} elseif ($priceAmount > 0 && $finalAmount !== null && $finalAmount > $priceAmount) {
$feeAmount = round($finalAmount - $priceAmount, 2);
}
if ($priceAmount <= 0 && $finalAmount !== null && $finalAmount > $feeAmount) {
$priceAmount = round($finalAmount - $feeAmount, 2);
}
$lineAmount = $priceAmount > 0 ? $priceAmount : (float) ($finalAmount ?? 0);
$usdToInr = !empty($currencyRates['USD_INR']) ? (float) $currencyRates['USD_INR'] : 0;
$finalUsd = ($finalAmount && $usdToInr > 0) ? $finalAmount / $usdToInr : null;
$size = $itemMeta['selected_size'] ?? '';
@endphp
@empty
@if($r->store)
{{ $r->store }}
@endif
@if($r->created_at)
@endif
{{ $r->title }}
@if($priceText !== '')
{{ $priceText }}
@endif
@if($overheadPercent !== null)
Overhead {{ rtrim(rtrim(number_format($overheadPercent, 2), '0'), '.') }}%
@endif
@if($finalAmount !== null)
Final ₹{{ number_format($finalAmount, 2) }}
@if($finalUsd !== null)
${{ number_format($finalUsd, 2) }}
@endif
@endif
No pending purchases found.
@endforelse
@once
@include('wuser.partials.delivery-badge-styles')
@endonce
Purchase History
@forelse(($historyPayments ?? collect()) as $payment)
@php
$lines = $payment->items->map(function ($row) {
return $row->assistedPurchaseRequest;
})->filter()->values();
$primaryRequest = $lines->firstWhere('id', $payment->assisted_purchase_request_id) ?: $lines->first();
$pathway = strtolower((string) ($payment->pathway ?: ''));
$payStatus = strtolower((string) $payment->payment_status);
$isPaid = in_array($payStatus, ['success', 'completed'], true);
$isFailed = !$isPaid && $pathway === 'a' && in_array($payStatus, ['failed', 'cancelled', 'canceled'], true);
$bankRecorded = $pathway === 'c' && $payment->bank_transactionID;
$trackingStatus = optional($payment->tracking)->status ?: $payment->status;
if ($isFailed) {
$statusLabel = 'Failed';
$statusClass = 'is-fail';
} elseif ($isPaid || $bankRecorded) {
$statusLabel = $bankRecorded && !$isPaid ? 'Recorded' : 'Completed';
$statusClass = 'is-done';
} else {
$statusLabel = 'Pending';
$statusClass = 'is-pending';
}
if ($trackingStatus && !$isFailed) {
$statusLabel = $trackingStatus;
$statusClass = $trackingStatus === 'Customer Paid' ? 'is-done' : 'is-pending';
}
if ($pathway === 'c' && $statusLabel === 'Customer Paid') {
$statusLabel = 'Transaction Successful';
}
$pathwayNames = ['a' => 'Card Gateway', 'b' => 'Maldives Post Link', 'c' => 'Cash / Bank Transfer'];
$shortNames = ['a' => 'Card Gateway', 'b' => 'Maldives Post', 'c' => 'Cash / Bank'];
$methodLabel = isset($pathwayNames[$pathway]) ? 'Payment method - Pathway '.strtoupper($pathway).': '.$pathwayNames[$pathway] : '';
$suiteNumber = $payment->suite_number ?: optional($primaryRequest)->suite_number;
$suiteAddress = $payment->virtualAddress;
if (!$suiteAddress && $suiteNumber && isset($deliverySuites)) {
$suiteAddress = $deliverySuites->firstWhere('suite_number', $suiteNumber);
}
$suiteBadges = $suiteAddress ? $suiteAddress->deliveryBadges() : null;
$needsCardPayment = $pathway === 'a' && !$isPaid;
$purchaseCount = max($lines->count(), 1);
$usdToInr = !empty($currencyRates['USD_INR']) ? (float) $currencyRates['USD_INR'] : 0;
$currencyCode = strtoupper((string) ($payment->currency ?: 'INR'));
$currencyMark = ['INR' => '₹', 'USD' => '$', 'MVR' => 'Rf'][$currencyCode] ?? $currencyCode;
$payableAmount = $payment->amount !== null ? (float) $payment->amount : null;
$payableUsd = ($payableAmount !== null && $currencyCode === 'INR' && $usdToInr > 0) ? $payableAmount / $usdToInr : null;
$stores = $lines->pluck('store')->map(function ($store) {
return trim((string) $store);
})->filter()->unique()->values();
if ($stores->isEmpty() && $primaryRequest && trim((string) $primaryRequest->store) !== '') {
$stores = collect([trim((string) $primaryRequest->store)]);
}
@endphp
@empty
@if($suiteNumber || $suiteBadges)
Suite {{ $suiteNumber ?: 'N/A' }}
@if($suiteBadges)
@include('wuser.partials.delivery-badges', ['badges' => $suiteBadges, 'popId' => 'ap-dl-pay-'.$payment->id, 'suiteLine' => $suiteNumber])
@endif
@endif
@foreach($stores as $storeName)
{{ $storeName }}
@endforeach
@if($statusLabel)
{{ $statusLabel }}
@endif
@if($payment->created_at)
@endif
{{ $purchaseCount }} {{ $purchaseCount === 1 ? 'purchase' : 'purchases' }}
@if(isset($shortNames[$pathway]))
{{ $shortNames[$pathway] }}
@endif
@if($payment->currency)
{{ $currencyMark }}
@endif
@if($suiteNumber)
{{ $suiteNumber }}
@endif
-
@forelse($lines as $line)
- {{ $loop->iteration }} {{ $line->title }} @if($line->url) Link @endif @empty
- 1{{ optional($primaryRequest)->title ?: 'Purchase' }} @endforelse
{{ $methodLabel }}
@endif
@include('partials.assisted-purchase-money', ['payment' => $payment])
@if($pathway === 'a')
@if($needsCardPayment)
@endif
@elseif($pathway === 'b')
@elseif($pathway === 'c')
{{ $bankRecorded ? 'View' : 'Record Transaction' }}
@else
@endif
No purchases found.
@endforelse