prepare(" SELECT p.*, c.brand, c.model, c.year, c.price, c.city, u.name as seller_name, u.phone as seller_phone FROM purchases p JOIN cars c ON p.car_id = c.id JOIN users u ON c.user_id = u.id WHERE p.id = ? AND p.status = 'approved' AND (p.user_id = ? OR ?) "); $isAdmin = isset($_SESSION['role']) && $_SESSION['role'] === 'admin'; $stmt->execute([$purchase_id, $_SESSION['user_id'], $isAdmin]); $data = $stmt->fetch(); if (!$data) { echo "

Receipt not found or not approved.

Back to Dashboard
"; require_once __DIR__ . '/includes/footer.php'; exit; } ?>
PAID & VERIFIED

AfgCars

Premium Vehicle Marketplace

OFFICIAL RECEIPT

Receipt #: RC-

Date:

Buyer Details

Bank ID:

Seller Details

Verification: Verified Merchant

, Afghanistan

Description Amount
Model - Transaction Verified via Bank ID:
$
Total Paid $

This is a computer-generated receipt. No signature is required.

AfgCars Verification System - Securing the Afghan Automotive Market

PAID
Back to Dashboard