Files
GoblinPay/templates/pay.html
T
2ro 94d0c0edba checkout: first-class grin1 / Slatepack payment method
The hosted /pay page now shows the wallet's grin1 Slatepack address (with
a QR and the exact amount) as a payment method alongside the Goblin/Nostr
option. A payer sends the amount from any Grin wallet via the Slatepack or
file method, pastes the S1 into the existing paste box, receives an S2,
and finalizes to complete the payment. Reuses the existing offline
receive_tx flow bound to the invoice token; the Nostr gift-wrap path, the
invoice matcher, and the proof/confirm logic are unchanged. No Tor
listener. The grin1 address is the wallet's stable index-0 address.
2026-07-02 19:22:35 -04:00

59 lines
2.6 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% if is_open %}<meta http-equiv="refresh" content="10">{% endif %}
<title>Pay with Goblin (GRIN)</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<main class="checkout">
<a class="brand" href="/"><img class="brandmark" src="/static/goblinpay-wordmark.svg" alt="GoblinPay"></a>
<h1>Pay with Goblin</h1>
<p class="amount">{{ info.amount_display }}</p>
{% if is_paid %}
<p class="status paid">Paid &#10003;</p>
<p class="hint">This invoice has been settled. You can close this page.</p>
{% else if is_expired %}
<p class="status expired">This invoice has expired.</p>
{% else %}
<p class="status open">Waiting for payment&#8230;</p>
<section class="pay-method">
<h2>Pay with Goblin Wallet</h2>
<div class="qr">{{ info.qr_svg|safe }}</div>
<p class="hint">Scan with your Goblin Wallet, or copy the address below.</p>
<label for="nprofile">Payment address (nprofile)</label>
<textarea id="nprofile" class="copybox" rows="3" readonly>{{ info.nprofile }}</textarea>
</section>
{% if let Some(grin1) = info.slatepack_address %}
<section class="pay-method">
<h2>Pay by Slatepack (grin1)</h2>
<p class="hint">Pay from any Grin wallet, no Nostr needed. Send <strong>{{ info.amount_display }}</strong> to the address below.</p>
{% if let Some(grin1_qr) = info.slatepack_qr_svg %}<div class="qr">{{ grin1_qr|safe }}</div>{% endif %}
<label for="grin1">Slatepack address (grin1)</label>
<textarea id="grin1" class="copybox" rows="3" readonly>{{ grin1 }}</textarea>
<ol>
<li>In your Grin wallet, send {{ info.amount_display }} to this address using the Slatepack / file method, then paste the Slatepack it produces below.</li>
<li>The pasted <strong>S1</strong> Slatepack is received here and a <strong>response</strong> Slatepack is returned.</li>
<li>Paste that response back into your wallet to finalize and broadcast it, which completes the payment.</li>
</ol>
<form method="post" action="/pay/{{ info.token }}/slatepack">
<label for="s1">Your Slatepack (S1)</label>
<textarea id="s1" name="slatepack" rows="6" required
placeholder="BEGINSLATEPACK. &#8230; ENDSLATEPACK."></textarea>
<button type="submit">Submit slatepack</button>
</form>
</section>
{% endif %}
{% endif %}
{% if let Some(memo) = info.memo %}<p class="memo">{{ memo }}</p>{% endif %}
<p class="footer">Powered by GoblinPay &middot; receive-only Grin over Nostr</p>
</main>
</body>
</html>