Gift withdrawal: admin refund (Stripe) and invoice storno (Billingo)
CI / test (push) Successful in 3m25s
CI / build (push) Skipped
CI / deploy (push) Skipped

- The buyer may withdraw from a gift purchase within 14 days while the
  code is not redeemed (ÁSZF 3., 5., 6.; terms version 2026-11-23); the
  consent on Stripe's page and the confirmation e-mail say so
- Admin → Ajándékok: the gifts with payment, invoice and storno; the
  refund button locks the gift and refuses a redeemed one, withdraws the
  code, refunds the PaymentIntent on Stripe (one refund per gift via the
  Idempotency-Key, retry when Stripe refuses) and queues the storno
- Worker: cancels the issued invoice in Billingo (POST /documents/{id}/
  cancel, e-mailed to the buyer), keeps the storno invoice's id and
  number; a lost answer is not asked again but left for an admin
- A withdrawn code cannot be redeemed, sent or downloaded; "My gifts"
  shows it as refunded

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-23 21:22:46 +00:00
co-authored by Claude Opus 5.5
parent c90232f40c
commit 0d62888831
18 changed files with 1014 additions and 46 deletions
@@ -235,8 +235,8 @@ export function GiftForm({
{termsConsent && (
<>
{" "}
Az ajándékkód a fizetés után azonnal elkészül, ezért a fizetésnél kéred a teljesítés megkezdését, és ezzel
lemondasz a 14 napos elállási jogról. <Link href="/aszf">ÁSZF</Link>
A vásárlástól számított 14 napon belül, amíg a kódot nem váltották be, elállhatsz, és visszatérítjük az
árát. A kód beváltásával az elállási jog megszűnik. <Link href="/aszf">ÁSZF</Link>
</>
)}
</p>
+4 -1
View File
@@ -66,7 +66,10 @@ export default async function GiftPage({ searchParams }: Props) {
<li>E-mailben elküldjük neki, vagy letöltöd a PDF-et, és te adod át.</li>
<li>Belép vagy regisztrál, beváltja a kódot, és a csomag az övé.</li>
</ol>
<p className="hint">A kód nem jár le, és egyszer váltható be. A számlát te kapod.</p>
<p className="hint">
A kód nem jár le, és egyszer váltható be. A számlát te kapod. Ha meggondolod magad, 14 napon belül,
beváltás előtt visszakérheted az árát: írj az info@sorsfonalak.hu címre.
</p>
</section>
</aside>
</div>