Add email notifications for economically unviable refunds #88

Merged
russellballestrini merged 3 commits from feature/economically-unviable-refund-emails into master 2025-10-03 16:54:18 -04:00

3 commits

Author SHA1 Message Date
7ff744e0df Remove all 'contact support' references from refund emails
Removed support contact messages from:
- No refund address scenario emails
- Both text and HTML email templates

This is consistent with the policy that no support is offered for refunds.
2025-10-03 16:46:09 -04:00
125d8726bb Remove support contact message from economically unviable refund emails
The message 'Please contact support if you have questions' has been
removed since no support is offered for refunds.
2025-10-03 16:44:46 -04:00
59963a62cd Add email notifications for economically unviable refunds
Enhanced the refund email system to properly notify users when their
cryptocurrency refunds cannot be processed due to being economically
unviable (too small to cover network transaction fees).

Changes:
- Updated send_refund_email() to differentiate between "no refund address"
  and "economically unviable" scenarios with appropriate messaging
- Added email notifications in crypto watcher for all NOT_REFUNDED status
  transitions due to economic viability:
  * Duplicate payment processing (line ~1770)
  * Expired payment processing (line ~2145)
  * Underpayment processing (line ~2905)
  * Passive monitoring refund retries (line ~3280)
- Added proper error handling for email sending to prevent disruption
- All economically unviable refund tests pass with no regressions

Users now receive clear explanations when refunds are too small to send
rather than being left without notification.
2025-10-03 16:40:41 -04:00