Watch
1
0
Fork
You've already forked Seyyed_arc
0
forked from hesabix/arc
Seyyed_arc/hesabixAPI/templates/public/pay_receipt.html
2026-11-02 16:02:05 +03:30

119 lines
6.7 KiB
HTML

<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="theme-color" content="#0f766e">
<meta name="robots" content="noindex,nofollow">
<title>رسید پرداخت — {{ display_title }}</title>
{% include "public/_persian_fonts.html" %}
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
min-height: 100vh;
font-family: 'YekanBakhFaNum', Tahoma, "Segoe UI", sans-serif;
background: linear-gradient(180deg, #ecfdf5 0%, #e2e8f0 100%);
color: #0f172a;
display: flex; justify-content: center;
padding: 20px 14px 28px;
}
.wrap { width: 100%; max-width: 480px; }
.brand { text-align: center; color: #115e59; font-weight: 700; margin-bottom: 14px; font-size: 14px; }
.card { background: #fff; border-radius: 22px; box-shadow: 0 20px 50px rgba(15,118,110,.14); overflow: hidden; }
.hero {
text-align: center; padding: 26px 20px 18px;
background: linear-gradient(135deg, #0f766e 0%, #0e7490 100%); color: #fff;
}
.logo { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; background: #fff; margin: 0 auto 10px; display: block; }
.badge {
display: inline-block; margin-top: 8px; padding: 6px 14px; border-radius: 999px;
font-weight: 800; font-size: 13px;
}
.ok { background: #d1fae5; color: #065f46; }
.bad { background: #fee2e2; color: #991b1b; }
.wait { background: #fef3c7; color: #92400e; }
.body { padding: 18px; }
.meta { background: #f8fafc; border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #e2e8f0; font-size: 13px; }
.row:last-child { border-bottom: 0; }
.row span:first-child { color: #64748b; }
.row span:last-child { font-weight: 700; text-align: left; word-break: break-word; }
.hint { font-size: 13px; color: #475569; line-height: 1.7; margin: 8px 0 14px; }
.qr { text-align: center; margin: 8px 0 14px; }
.qr img { width: 148px; height: 148px; background: #fff; padding: 8px; border-radius: 12px; border: 1px solid #e2e8f0; }
.linkbox {
background: #f1f5f9; border-radius: 12px; padding: 10px 12px; font-size: 12px;
word-break: break-all; direction: ltr; text-align: left; margin-bottom: 10px;
}
.btn {
display: block; width: 100%; margin-top: 10px; border: 0; border-radius: 14px;
padding: 13px 16px; font-size: 15px; font-weight: 800; text-decoration: none; text-align: center; cursor: pointer;
}
.btn-main { background: linear-gradient(135deg, #0f766e 0%, #0e7490 100%); color: #fff; }
.btn-ghost { background: #f1f5f9; color: #334155; }
.footer { text-align: center; margin-top: 16px; color: #64748b; font-size: 12px; }
</style>
</head>
<body>
<div class="wrap">
<div class="brand">{{ app_name }}</div>
<div class="card">
<div class="hero">
{% if show_logo and logo_url %}
<img class="logo" src="{{ logo_url }}" alt="{{ display_title }}">
{% endif %}
<div style="font-size:18px;font-weight:800;">رسید پرداخت</div>
<div style="opacity:.9;margin-top:4px;font-size:14px;">{{ display_title }}</div>
{% if success %}
<div class="badge ok">پرداخت موفق</div>
{% elif failed %}
<div class="badge bad">پرداخت ناموفق</div>
{% else %}
<div class="badge wait">{{ status_label }}</div>
{% endif %}
</div>
<div class="body">
<div class="meta">
<div class="row"><span>وضعیت</span><span>{{ status_label }}</span></div>
<div class="row"><span>مبلغ</span><span>{{ amount_formatted }} {% if currency_title %}{{ currency_title }}{% endif %}</span></div>
{% if paid_at %}<div class="row"><span>تاریخ</span><span>{{ paid_at }}</span></div>{% endif %}
{% if external_ref %}<div class="row"><span>شماره پیگیری بانک</span><span>{{ external_ref }}</span></div>{% endif %}
<div class="row"><span>شماره تراکنش</span><span>{{ transaction_id }}</span></div>
{% if payer_name %}<div class="row"><span>پرداخت‌کننده</span><span>{{ payer_name }}</span></div>{% endif %}
{% if payer_mobile %}<div class="row"><span>موبایل پرداخت‌کننده</span><span>{{ payer_mobile }}</span></div>{% endif %}
{% if payer_note %}<div class="row"><span>توضیح</span><span>{{ payer_note }}</span></div>{% endif %}
{% for row in business_rows %}
<div class="row"><span>{{ row.label }}</span><span>{{ row.value }}</span></div>
{% endfor %}
</div>
<p class="hint">این لینک را برای فروشنده بفرستید تا بتواند نتیجه واریز را ببیند. رسید را می‌توانید به‌صورت PDF هم دریافت کنید.</p>
{% if qr_data_uri %}
<div class="qr">
<img src="{{ qr_data_uri }}" alt="QR رسید">
</div>
{% endif %}
<div class="linkbox" id="receipt-url">{{ receipt_url }}</div>
<button class="btn btn-ghost" type="button" id="copy-btn">کپی لینک پیگیری</button>
<a class="btn btn-main" href="{{ pdf_url }}">دریافت PDF رسید</a>
<a class="btn btn-ghost" href="/u/{{ username }}">بازگشت به صفحه پرداخت</a>
</div>
</div>
<p class="footer">{{ app_name }}</p>
</div>
<script>
(function () {
var btn = document.getElementById('copy-btn');
var url = document.getElementById('receipt-url');
if (!btn || !url) return;
btn.addEventListener('click', function () {
var text = url.textContent || '';
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(text).then(function () { btn.textContent = 'لینک کپی شد'; });
} else {
btn.textContent = text;
}
});
})();
</script>
</body>
</html>