<?php
require 'config.php';

$checkoutId = $_GET['checkout_id'];

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

echo json_encode($stmt->fetch(PDO::FETCH_ASSOC));
