fix: discount store DeliveryStatus stays Pending after payment (matches regular store)
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m34s
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:
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user