Files
vpn-control-panel/app/templates/payments.html
smolkik-code 7c7c88621d Initial commit: VPN Control Panel
- FastAPI REST API with JWT auth
- aiogram 3 Telegram bot with admin middleware
- APScheduler daily tasks (expiry, reminders, revoke, sync)
- SQLAlchemy 2 async ORM with Alembic migrations
- Jinja2 admin panel (Dashboard, Users, Payments, Servers, Tariffs)
- VPN provider abstraction with MockProvider
- Stats service with revenue/subscription analytics
- Docker Compose (PostgreSQL + Redis + app)
- Healthcheck endpoint
2026-07-05 17:50:11 +07:00

47 lines
1.6 KiB
HTML

{% extends "base.html" %}
{% block title %}Payments — VPN Control Panel{% endblock %}
{% block content %}
<h2>Payments</h2>
<div class="count">{{ payments|length }} total</div>
<table>
<thead>
<tr>
<th>ID</th>
<th>User</th>
<th>Tariff</th>
<th>Amount</th>
<th>Status</th>
<th>Provider</th>
<th>Created</th>
<th>Paid At</th>
</tr>
</thead>
<tbody>
{% for p in payments %}
<tr>
<td>{{ p.id }}</td>
<td>#{{ p.user_id }}</td>
<td>{{ tariffs_map.get(p.tariff_id, "—") }}</td>
<td>{{ "%.2f"|format(p.amount) }} {{ p.currency }}</td>
<td>
{% if p.status.value == "confirmed" %}
<span class="badge badge-green">Confirmed</span>
{% elif p.status.value == "pending" %}
<span class="badge badge-yellow">Pending</span>
{% elif p.status.value == "failed" %}
<span class="badge badge-red">Failed</span>
{% elif p.status.value == "refunded" %}
<span class="badge badge-blue">Refunded</span>
{% else %}
<span class="badge">{{ p.status.value }}</span>
{% endif %}
</td>
<td>{{ p.provider }}</td>
<td>{{ p.created_at.strftime("%Y-%m-%d %H:%M") }}</td>
<td>{{ p.paid_at.strftime("%Y-%m-%d %H:%M") if p.paid_at else "—" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}