<?php
require 'config.php';

$id = $_GET['id'];

$stmt = $pdo->prepare("SELECT status FROM mpesa_payments WHERE id=?");
$stmt->execute([$id]);
$row = $stmt->fetch();

if ($row && $row['status'] === 'paid') {
    echo "Payment confirmed ✅";
} else {
    echo "Payment pending ❌";
}
