refactor: simplify payment gateway, single evaluatePayment function, clean landing page pricing
This commit is contained in:
@@ -404,6 +404,14 @@
|
||||
const serverReceived = parseFloat(data.amount_received || '0');
|
||||
if (serverReceived > localReceived) localReceived = serverReceived;
|
||||
|
||||
// Update expiry countdown if server extended it
|
||||
if (data.expires_at) {
|
||||
const newExpiry = new Date(data.expires_at).getTime();
|
||||
clearInterval(countdownInterval);
|
||||
updateCountdown(newExpiry);
|
||||
countdownInterval = setInterval(() => updateCountdown(newExpiry), 1000);
|
||||
}
|
||||
|
||||
updateAmountDisplay({ ...data, amount_received: localReceived.toFixed(8) });
|
||||
applyStatus(data.status, data);
|
||||
} catch {}
|
||||
|
||||
Reference in New Issue
Block a user