From a519284fd1a86717f2483ba99798bb64e677bb27 Mon Sep 17 00:00:00 2001 From: SysAdmin Date: Mon, 6 Oct 2025 16:07:14 +0100 Subject: [PATCH] Fix: Include Overpaid status in payment notifications MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- LittleShop/Services/CryptoPaymentService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LittleShop/Services/CryptoPaymentService.cs b/LittleShop/Services/CryptoPaymentService.cs index b94062d..842536f 100644 --- a/LittleShop/Services/CryptoPaymentService.cs +++ b/LittleShop/Services/CryptoPaymentService.cs @@ -139,7 +139,7 @@ public class CryptoPaymentService : ICryptoPaymentService payment.PaidAmount = amount; 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; @@ -156,8 +156,8 @@ public class CryptoPaymentService : ICryptoPaymentService await _context.SaveChangesAsync(); - // Send notification for payment confirmation - if (status == PaymentStatus.Paid || status == PaymentStatus.Completed) + // Send notification for payment confirmation (including overpaid since payment was successful) + if (status == PaymentStatus.Paid || status == PaymentStatus.Overpaid || status == PaymentStatus.Completed) { await SendPaymentConfirmedNotification(payment.OrderId, amount); }