fix: discount store DeliveryStatus stays Pending after payment (matches regular store)
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m34s

- CompleteOrderPaymentCommandHandler: DeliveryStatus.InTransit → DeliveryStatus.Pending
- PlaceOrderCommandHandler (full discount-balance path): same fix
- Now both stores behave the same: admin must manually update delivery status
- Consistent with regular store flow where order stays Pending after payment
This commit is contained in:
masoodafar-web
2026-02-16 00:45:55 +03:30
parent e77611012b
commit 163a0a2f1a
2 changed files with 2 additions and 2 deletions
@@ -56,7 +56,7 @@ public class CompleteOrderPaymentCommandHandler : IRequestHandler<CompleteOrderP
// Update order
order.PaymentStatus = PaymentStatus.Success;
order.PaymentDate = DateTime.Now;
order.DeliveryStatus = DeliveryStatus.InTransit;
order.DeliveryStatus = DeliveryStatus.Pending;
// Deduct discount balance from user wallet
var userWallet = await _context.UserWallets
@@ -265,7 +265,7 @@ public class PlaceOrderCommandHandler : IRequestHandler<PlaceOrderCommand, Place
transaction.PaymentDate = DateTime.Now;
order.PaymentStatus = PaymentStatus.Success;
order.PaymentDate = DateTime.Now;
order.DeliveryStatus = DeliveryStatus.InTransit;
order.DeliveryStatus = DeliveryStatus.Pending;
var walletForDeduct = await _context.UserWallets
.FirstOrDefaultAsync(w => w.UserId == request.UserId, cancellationToken);