update: payment link

This commit is contained in:
nate 2026-03-19 12:55:20 +04:00
parent 9cf70ab8dd
commit a7f56c69d3
2 changed files with 3 additions and 1 deletions

View File

@ -122,6 +122,7 @@ export const routes = new Elysia()
expires_at: payment.expires_at,
txs: [],
qr_url: await fetchQrBase64(uri),
pay_uri: uri,
coin_label: coinInfo.label,
coin_ticker: coinInfo.ticker,
};
@ -171,6 +172,7 @@ export const routes = new Elysia()
paid_at: payment.paid_at,
txs: txs.map((t: any) => ({ txid: t.txid, amount: t.amount, confirmed: t.confirmed, detected_at: t.detected_at })),
qr_url: await fetchQrBase64(uri),
pay_uri: uri,
coin_label: coinInfo?.label,
coin_ticker: coinInfo?.ticker,
};

View File

@ -108,7 +108,7 @@
<% } else if (inv.status !== 'paid') { %>
<!-- QR -->
<div>
<img src="<%= inv.qr_url %>" alt="QR Code" class="w-48 h-48 mx-auto rounded-lg bg-white p-2" id="pay-qr">
<a href="<%= inv.pay_uri %>"><img src="<%= inv.qr_url %>" alt="QR Code" class="w-48 h-48 mx-auto rounded-lg bg-white p-2" id="pay-qr"></a>
</div>
<% } %>