<?php
require_once 'config.php';
$keys = ['payment_phone_number', 'payment_name'];
$data = [];
foreach ($keys as $key) {
    $stmt = $conn->prepare("SELECT config_value FROM payment_config WHERE config_key = ?");
    $stmt->bind_param("s", $key);
    $stmt->execute();
    $res = $stmt->get_result();
    $row = $res->fetch_assoc();
    $data[$key] = $row['config_value'] ?? 'NOT SET';
    $stmt->close();
}
echo json_encode($data);
?>
