MishkaPay.Ash.Payment.Refund (Mishka Pay v0.0.1)

Copy Markdown View Source

The :refund action of the :payment kind (MishkaPay.Ash.Resource): refunds the stored payment through its provider before the transaction starts (as often as the tenant allows, see MishkaPay.Refund), reads the payment again and writes it, keeps the MishkaPay.Refund in the record's :refund metadata, and fires mishka_pay:payment:changed. When the payment cannot be read again, the row counts the refund itself (never past the payment's amount), and the announcement waits for the next sync.