<?php
/**
 * test_json.php - Test JSON response
 * Akses: test_json.php?action=confirm&id=1
 */

header('Content-Type: application/json');
header('Cache-Control: no-cache, must-revalidate');

// Debug
error_log('Test JSON called: ' . print_r($_GET, true));

// Response
$response = [
    'success' => true,
    'message' => 'Test JSON berhasil',
    'data' => [
        'action' => $_GET['action'] ?? 'none',
        'id' => $_GET['id'] ?? 'none',
        'timestamp' => date('Y-m-d H:i:s')
    ]
];

echo json_encode($response);
exit;
?>