Jun 28 - Implement payment functions (Stripe)
This commit is contained in:
@@ -338,6 +338,8 @@
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% include 'billing/_billing_banner.html' %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{% if billing_warning == 'past_due' %}
|
||||
<div class="alert alert-warning alert-dismissible fade show d-flex align-items-center gap-2 mb-3" role="alert">
|
||||
<i class="bi bi-exclamation-triangle-fill flex-shrink-0 fs-5"></i>
|
||||
<div>
|
||||
<strong>Payment past due.</strong>
|
||||
Your most recent payment could not be processed. Please update your billing information
|
||||
to avoid service interruption.
|
||||
<a href="{{ url_for('billing.portal') }}" class="alert-link ms-1">Update Payment Method ›</a>
|
||||
</div>
|
||||
<button type="button" class="btn-close ms-auto" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,22 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Subscription Activated — JQC{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row justify-content-center mt-5">
|
||||
<div class="col-md-6 text-center">
|
||||
<div class="card border-0 shadow-sm p-5">
|
||||
<div class="mb-4">
|
||||
<i class="bi bi-check-circle-fill text-success" style="font-size: 3rem;"></i>
|
||||
</div>
|
||||
<h2 class="h4 mb-2">Subscription Activated!</h2>
|
||||
<p class="text-muted mb-4">
|
||||
Your JQC subscription is now active. You have full access to all features
|
||||
included in your plan.
|
||||
</p>
|
||||
<a href="{{ url_for('tenant_settings.plan') }}" class="btn btn-primary">
|
||||
<i class="bi bi-patch-check me-1"></i> View Plan & Usage
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,36 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Subscription Suspended — JQC</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css">
|
||||
<style>
|
||||
body { background: #f6f7f9; display: flex; min-height: 100vh; align-items: center; justify-content: center; }
|
||||
.card { max-width: 480px; border-radius: 12px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container py-5">
|
||||
<div class="card border-0 shadow-sm mx-auto text-center p-5">
|
||||
<div class="mb-4">
|
||||
<i class="bi bi-pause-circle text-warning" style="font-size: 3rem;"></i>
|
||||
</div>
|
||||
<h1 class="h4 mb-2">Subscription Suspended</h1>
|
||||
<p class="text-muted mb-4">
|
||||
Your JQC subscription has been cancelled or has lapsed. Please update your
|
||||
billing information to restore access to your workspace.
|
||||
</p>
|
||||
<div class="d-grid gap-2">
|
||||
<a href="{{ url_for('billing.portal') }}" class="btn btn-primary">
|
||||
<i class="bi bi-credit-card me-1"></i> Manage Billing
|
||||
</a>
|
||||
<a href="mailto:support@jqc.app" class="btn btn-outline-secondary btn-sm">
|
||||
<i class="bi bi-envelope me-1"></i> Contact Support
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -44,10 +44,42 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mt-3">
|
||||
{% if billing_enabled %}
|
||||
{# MT-8: live subscription status badge #}
|
||||
{% if subscription_status == 'trial' %}
|
||||
<span class="badge bg-info text-dark mb-2 d-block" style="font-size:.8rem;">
|
||||
<i class="bi bi-hourglass-split me-1"></i>
|
||||
Free trial{% if trial_ends_at %} — expires {{ trial_ends_at.strftime('%b %d, %Y') }}{% endif %}
|
||||
</span>
|
||||
{% elif subscription_status == 'active' %}
|
||||
<span class="badge bg-success mb-2 d-block" style="font-size:.8rem;">
|
||||
<i class="bi bi-check-circle me-1"></i> Active subscription
|
||||
</span>
|
||||
{% elif subscription_status == 'past_due' %}
|
||||
<span class="badge bg-warning text-dark mb-2 d-block" style="font-size:.8rem;">
|
||||
<i class="bi bi-exclamation-triangle me-1"></i> Payment past due
|
||||
</span>
|
||||
{% elif subscription_status == 'cancelled' %}
|
||||
<span class="badge bg-danger mb-2 d-block" style="font-size:.8rem;">
|
||||
<i class="bi bi-x-circle me-1"></i> Subscription cancelled
|
||||
</span>
|
||||
{% endif %}
|
||||
{# Action button #}
|
||||
{% if subscription_status in ('active', 'past_due') or has_stripe_customer %}
|
||||
<a href="{{ url_for('billing.portal') }}" class="btn btn-sm btn-outline-primary">
|
||||
<i class="bi bi-credit-card me-1"></i> Manage Billing
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ url_for('billing.subscribe') }}" class="btn btn-sm btn-primary">
|
||||
<i class="bi bi-lightning-charge me-1"></i> Subscribe Now
|
||||
</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a href="mailto:support@jqc.app?subject=Plan upgrade request"
|
||||
class="btn btn-sm btn-outline-primary">
|
||||
<i class="bi bi-arrow-up-circle me-1"></i> Request Plan Upgrade
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user