Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billforward-alex/fea62902192348c16c09a3fceaaeba4d to your computer and use it in GitHub Desktop.
Save billforward-alex/fea62902192348c16c09a3fceaaeba4d to your computer and use it in GitHub Desktop.
Receipt, Payment, InvoicePayment, Refund conventions
InvoicePayments are mutable. When you perform a refund: we update the InvoicePayment in-place.
If you refund a Payment, I think it goes something like this:
- definitely persist a Refund
- definitely persist a Receipt (unless it breaks before we begin our chat with the payment gateway)
- persist an "credit" Payment — but only if Refund succeeds
- mutate the InvoicePayment — but only if Refund succeeds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment