From ddeeacc676666ace2b02798f4d0d03a13956f358 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sat, 21 Feb 2026 15:11:50 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9C=80=E6=96=B0=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/chat.php | 2 ++ api/finance.php | 15 ++++++++++----- api/recharge_status.php | 2 ++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/api/chat.php b/api/chat.php index 3475fa2..8cc4d61 100644 --- a/api/chat.php +++ b/api/chat.php @@ -1,6 +1,8 @@ prepare("INSERT INTO finance_requests (user_id, type, amount, symbol, payment_method, tx_hash, fiat_amount, fiat_currency, status, ip_address) VALUES (?, 'recharge', ?, ?, ?, ?, ?, ?, 'pending', ?)"); - $stmt->execute([$user_id, $amount, $symbol, $method, $tx_hash, $fiat_amount, $fiat_currency, getRealIP()]); - - echo json_encode(['success' => true, 'id' => $db->lastInsertId()]); + try { + $stmt = $db->prepare("INSERT INTO finance_requests (user_id, type, amount, symbol, payment_method, tx_hash, fiat_amount, fiat_currency, status, ip_address) VALUES (?, 'recharge', ?, ?, ?, ?, ?, ?, 'pending', ?)"); + $stmt->execute([$user_id, $amount, $symbol, $method, $tx_hash, $fiat_amount, $fiat_currency, getRealIP()]); + + echo json_encode(['success' => true, 'id' => $db->lastInsertId()]); + } catch (Exception $e) { + echo json_encode(['success' => false, 'error' => $e->getMessage()]); + } exit; } diff --git a/api/recharge_status.php b/api/recharge_status.php index e6c10ec..f1071ce 100644 --- a/api/recharge_status.php +++ b/api/recharge_status.php @@ -1,6 +1,8 @@