Handle payment intent expired webhook

Aperta
#141 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
payments

Direzione di ricerca

The issue does not name files, tests, or expected behavior. Start by locating the payment-intent webhook handling in the repository and compare how other webhook events are handled. Clarify the expected response to an expired payment intent before changing code; done means the expired event is handled as agreed and covered by a test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

When a payment intent expires, Rhyza will send a dedicated webhook. Today the wallet only handles intent created and completed, so an expired intent's transaction stays pending forever. Any funds that arrived before expiry are never credited either.

Under Rafiki, testnet treated incoming payment expiry like completion: it credited whatever had been received. The Rhyza handler should do the same.

Scope

  • Accept and validate the new payment intent expired webhook type.
  • If funds arrived before expiry, credit the receiver and complete the transaction with the amount received. Do the same follow-up as on completion: sender details and the "money received" notification.
  • If no funds arrived, mark the transaction expired without moving money.
  • Make the handler safe when the same webhook arrives twice, or arrives for an intent that's already completed.

Dependency

  • Blocked on Rhyza's payment intent expired webhook, which is still in progress. Once its event name and payload are final (they must include the amount received)

Acceptance criteria

  • An intent that expires partly paid credits the user exactly the amount received and shows as completed with that value.
  • An intent that expires unpaid shows as expired, and no ledger or GateHub transfer happens.
  • Receiving the webhook twice, or after completion, doesn't double-credit.
Lingua principale
TypeScript
Stelle
51
Fork
6
Merge medio
23h 41m
PR unite (30g)
11

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di interledger/interledger-pay

Tutte le issue di interledger/interledger-pay

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.