// getway/sketpay/webhook.php

<?php
require_once __DIR__ . '/config.php';

$payload = file_get_contents('php://input');
$data = json_decode($payload, true);

if ($data) {
    http_response_code(200);
    echo json_encode(["status" => "success", "message" => "Webhook received"]);
} else {
    http_response_code(400);
    echo json_encode(["status" => "error", "message" => "Invalid payload"]);
}
?>
