BTCPay: add paid/receipt flow and redirect support

This commit is contained in:
xmrcheckout
2026-01-08 16:43:11 +00:00
parent b53f6dca21
commit 6eb8d381c9
11 changed files with 475 additions and 12 deletions
+12
View File
@@ -37,12 +37,24 @@ def ensure_invoice_qr_png(
detail="QR storage is not configured",
)
os.makedirs(storage_dir, exist_ok=True)
try:
os.chmod(storage_dir, 0o755)
except Exception:
pass
filename = f"{invoice.id}.png"
path = os.path.join(storage_dir, filename)
if os.path.exists(path):
try:
os.chmod(path, 0o644)
except Exception:
pass
return path
png_bytes = build_invoice_qr_png_bytes(invoice=invoice, settings=settings)
_atomic_write(path, png_bytes)
try:
os.chmod(path, 0o644)
except Exception:
pass
return path