Created
October 24, 2016 17:24
-
-
Save billforward-alex/fea62902192348c16c09a3fceaaeba4d to your computer and use it in GitHub Desktop.
Receipt, Payment, InvoicePayment, Refund conventions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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