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

try {
    $stmt = $pdo->prepare("UPDATE settings SET setting_value = ? WHERE setting_key = 'uddoktapay_base_url'");
    $stmt->execute(['https://104.21.51.185']);
    echo "UddoktaPay base URL updated to IP address: https://104.21.51.185\n";
    echo "Note: This is a temporary workaround for DNS resolution issues.\n";
    echo "For production use, you should resolve the DNS issue or contact your hosting provider.\n";
} catch (Exception $e) {
    echo "Error updating UddoktaPay base URL: " . $e->getMessage() . "\n";
}
?>