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 {}
|
||||
|
||||
@@ -503,9 +503,6 @@
|
||||
No credit card
|
||||
</li>
|
||||
</ul>
|
||||
<a href="/dashboard" class="mt-8 block text-center w-full py-3 bg-brand hover:bg-blue-500 text-white text-sm font-medium rounded-lg transition-colors">
|
||||
Get Started
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Pro -->
|
||||
@@ -531,9 +528,6 @@
|
||||
Priority support
|
||||
</li>
|
||||
</ul>
|
||||
<a href="/dashboard/checkout" class="mt-8 block text-center w-full py-3 bg-blue-600 hover:bg-blue-500 text-white text-sm font-medium rounded-lg transition-colors">
|
||||
Upgrade to Pro
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Lifetime -->
|
||||
@@ -562,11 +556,15 @@
|
||||
Limited availability
|
||||
</li>
|
||||
</ul>
|
||||
<a href="/dashboard/checkout" class="mt-8 block text-center w-full py-3 bg-yellow-600 hover:bg-yellow-500 text-white text-sm font-medium rounded-lg transition-colors">
|
||||
Get Lifetime
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-12">
|
||||
<a href="/dashboard" class="inline-flex items-center gap-2 px-8 py-3.5 bg-brand hover:bg-blue-500 text-white font-medium rounded-lg transition-colors text-sm">
|
||||
Get Started
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M13 7l5 5m0 0l-5 5m5-5H6"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user