再次修复准备部署
This commit is contained in:
parent
ddeeacc676
commit
8b18aec895
@ -168,8 +168,8 @@ if ($action === 'recharge') {
|
||||
}
|
||||
|
||||
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()]);
|
||||
$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', ?, ?, ?, ?, ?, ?, ?, ?)");
|
||||
$stmt->execute([$user_id, round($amount, 8), $symbol, $method, $tx_hash, $fiat_amount, $fiat_currency, '0', getRealIP()]);
|
||||
|
||||
echo json_encode(['success' => true, 'id' => $db->lastInsertId()]);
|
||||
} catch (Exception $e) {
|
||||
@ -220,12 +220,12 @@ if ($action === 'withdraw') {
|
||||
->execute([$amount, $user_id, $symbol]);
|
||||
|
||||
// Record request
|
||||
$stmt = $db->prepare("INSERT INTO finance_requests (user_id, type, amount, symbol, payment_details, fiat_amount, fiat_currency, status, ip_address) VALUES (?, 'withdrawal', ?, ?, ?, ?, ?, '0', ?)");
|
||||
$stmt->execute([$user_id, $amount, $symbol, $address, $fiat_amount, $fiat_currency, getRealIP()]);
|
||||
$stmt = $db->prepare("INSERT INTO finance_requests (user_id, type, amount, symbol, payment_details, fiat_amount, fiat_currency, `status`, ip_address) VALUES (?, 'withdrawal', ?, ?, ?, ?, ?, ?, ?)");
|
||||
$stmt->execute([$user_id, $amount, $symbol, $address, $fiat_amount, $fiat_currency, '0', getRealIP()]);
|
||||
|
||||
// Add to transactions as pending
|
||||
$db->prepare("INSERT INTO transactions (user_id, type, amount, symbol, status, ip_address) VALUES (?, 'withdrawal', ?, ?, '0', ?)")
|
||||
->execute([$user_id, $amount, $symbol, getRealIP()]);
|
||||
$db->prepare("INSERT INTO transactions (user_id, type, amount, symbol, `status`, ip_address) VALUES (?, 'withdrawal', ?, ?, ?, ?)")
|
||||
->execute([$user_id, $amount, $symbol, '0', getRealIP()]);
|
||||
|
||||
$db->commit();
|
||||
echo json_encode(['success' => true]);
|
||||
|
||||
@ -600,9 +600,9 @@ function renderRechargeUI(data) {
|
||||
const side = document.querySelector('.info-side');
|
||||
if (!side) return;
|
||||
const status = data.status;
|
||||
if (status === 'finished') { finishTransferUI(); return; }
|
||||
if (status === 'finished' || status === '3') { finishTransferUI(); return; }
|
||||
|
||||
if (status === 'pending') {
|
||||
if (status === 'pending' || status === '0') {
|
||||
side.innerHTML = `
|
||||
<div class="text-center text-lg-start position-relative" style="z-index: 2;">
|
||||
<div class="mb-4 text-center">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user