Update crypto checkout for out-of-stock refund scenarios and left-align QR code
- Add specific messaging for out-of-stock-refunded status (full refund, no fee) - Add specific messaging for out-of-stock-no-refund status - Add out-of-stock item to refund policy lists - Left-align QR code instead of centering it
This commit is contained in:
parent
444f9d2d5f
commit
6fa9eed4c9
1 changed files with 14 additions and 3 deletions
|
|
@ -11,9 +11,8 @@
|
|||
{% else %}
|
||||
{% set amount_fmt = '%.8f' % amount_crypto %}
|
||||
{% endif %}
|
||||
<div style="text-align: center; margin: 16px 0;">
|
||||
<div id="payment-qr" style="margin-bottom: 8px; display: inline-block;"></div>
|
||||
<br>
|
||||
<div style="margin: 16px 0;">
|
||||
<div id="payment-qr" style="margin-bottom: 8px;"></div>
|
||||
<small style="color: #666;">Scan with wallet app</small>
|
||||
</div>
|
||||
|
||||
|
|
@ -372,24 +371,36 @@
|
|||
<div style="background: #d1fae5; border: 1px solid #10b981; border-radius: 4px; padding: 15px; margin: 20px 0;">
|
||||
<p><strong>✓ Refund address configured</strong></p>
|
||||
<p style="font-family: monospace; background: #f0f0f0; padding: 8px; border-radius: 3px; word-break: break-all;">{{ refund_address }}</p>
|
||||
{% if status == 'out-of-stock-refunded' %}
|
||||
<p><strong>📦 Out of Stock - Full Refund Issued</strong></p>
|
||||
<p>This item became unavailable after your payment. You received a <strong>full refund</strong> with no restocking fee since this was not your fault.</p>
|
||||
{% else %}
|
||||
<p>If you make a payment error, you'll receive an automatic refund minus a 9% restocking fee that covers network costs and prevents abuse.</p>
|
||||
<ul style="margin: 10px 0;">
|
||||
<li><strong>Overpayment:</strong> Fulfilled & excess refunded minus fee</li>
|
||||
<li><strong>Underpayment:</strong> Refunded minus fee</li>
|
||||
<li><strong>Late payment:</strong> Refunded minus fee if sent after the minute expiry</li>
|
||||
<li><strong>Out of stock:</strong> <strong>Full refund</strong> (no fee - not your fault)</li>
|
||||
<li><strong>Wrong address:</strong> Cannot be recovered</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div style="background: #fef3c7; border: 1px solid #f59e0b; border-radius: 4px; padding: 15px; margin: 20px 0;">
|
||||
<p><strong>⚠️ No refund address configured</strong></p>
|
||||
{% if status == 'out-of-stock-no-refund' %}
|
||||
<p><strong>📦 Out of Stock - No Refund Possible</strong></p>
|
||||
<p>This item became unavailable after your payment, but without a refund address configured, the funds were transferred to the shop's cold storage.</p>
|
||||
{% else %}
|
||||
<p>Without a refund address, all payment errors result in lost funds:</p>
|
||||
<ul style="margin: 10px 0;">
|
||||
<li>Underpayments are kept</li>
|
||||
<li>Overpayments are kept</li>
|
||||
<li>Late payments after <strong>{{ ((expires_at - now) // 60000) if expires_at and (expires_at - now) > 0 else 'expiry' }} minutes</strong> are kept</li>
|
||||
<li><strong>Out of stock:</strong> Funds transferred to shop (no refund possible)</li>
|
||||
<li>Wrong address payments cannot be recovered</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
<p style="margin-top: 10px;">Consider configuring a refund address for future purchases.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue