<?php
// Test verify_otp endpoint

$json = json_encode([
    'action' => 'verify_signup_otp',
    'email' => 'test@example.com',
    'otp' => '311538'
]);

$ch = curl_init('http://localhost/rest_table/backend/verify_otp.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error = curl_error($ch);

curl_close($ch);

echo "HTTP Code: " . $httpCode . "\n";
echo "Response: " . $response . "\n";
if ($error) {
    echo "CURL Error: " . $error . "\n";
}
?>
