prepare("UPDATE platform_profile SET thawani_secret_key = :secret, thawani_publishable_key = :publishable, thawani_mode = :mode WHERE id = 1"); $stmt->execute([ 'secret' => $secret, 'publishable' => $publishable, 'mode' => $mode ]); header('Location: ' . app_url('admin.php', ['page' => 'thawani', 'saved' => 1])); exit; } $stmt = $pdo->query("SELECT thawani_secret_key, thawani_publishable_key, thawani_mode FROM platform_profile WHERE id = 1"); $prof = $stmt->fetch(PDO::FETCH_ASSOC) ?: []; $mode = $prof['thawani_mode'] ?? 'test'; ?>