Fix: Include Overpaid status in payment notifications

- Added PaymentStatus.Overpaid to notification trigger conditions
- Overpaid payments now update order status to PaymentReceived
- Overpaid payments now send admin push notifications
- Overpaid payments now send TeleBot customer notifications
- Resolves issue where successful overpayments were silent

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
SysAdmin 2025-10-06 16:07:14 +01:00
parent 81f781be48
commit a519284fd1

View File

@ -139,7 +139,7 @@ public class CryptoPaymentService : ICryptoPaymentService
payment.PaidAmount = amount; payment.PaidAmount = amount;
payment.TransactionHash = transactionHash; payment.TransactionHash = transactionHash;
if (status == PaymentStatus.Paid || (status == PaymentStatus.Completed && confirmations >= 3)) if (status == PaymentStatus.Paid || status == PaymentStatus.Overpaid || (status == PaymentStatus.Completed && confirmations >= 3))
{ {
payment.PaidAt = DateTime.UtcNow; payment.PaidAt = DateTime.UtcNow;
@ -156,8 +156,8 @@ public class CryptoPaymentService : ICryptoPaymentService
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
// Send notification for payment confirmation // Send notification for payment confirmation (including overpaid since payment was successful)
if (status == PaymentStatus.Paid || status == PaymentStatus.Completed) if (status == PaymentStatus.Paid || status == PaymentStatus.Overpaid || status == PaymentStatus.Completed)
{ {
await SendPaymentConfirmedNotification(payment.OrderId, amount); await SendPaymentConfirmedNotification(payment.OrderId, amount);
} }