Why
PaymentService.RefundPaymentAsync only compares the current request with the original amount and has a TODO instead of saving RefundTransaction. Multiple partial refunds can therefore exceed the original payment, and refund history is unavailable.
Scope
- Implement and register IRefundRepository.
- Persist pending, successful, and failed refund attempts with provider references.
- Calculate refundable balance from successful/pending refunds.
- Enforce the limit transactionally to prevent concurrent over-refunds.
- Model asynchronous provider refund status updates.
Acceptance criteria
Why
PaymentService.RefundPaymentAsynconly compares the current request with the original amount and has a TODO instead of savingRefundTransaction. Multiple partial refunds can therefore exceed the original payment, and refund history is unavailable.Scope
Acceptance criteria