fix: proper DeliveryStatus mapping + cancel delivery on failed payment
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m22s
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m22s
- Added MapDeliveryStatus() to correctly map Domain→Proto enum values - Domain Pending(1) was incorrectly cast to Proto PROCESSING(1) instead of PROCESSING - Set DeliveryStatus=Cancelled when payment fails (CompleteOrderPaymentCommandHandler) - Set DeliveryStatus=Cancelled when order expires (ExpirePendingOrdersService)
This commit is contained in:
+1
@@ -105,6 +105,7 @@ public class CompleteOrderPaymentCommandHandler : IRequestHandler<CompleteOrderP
|
||||
|
||||
transaction.PaymentStatus = PaymentStatus.Reject;
|
||||
order.PaymentStatus = PaymentStatus.Reject;
|
||||
order.DeliveryStatus = DeliveryStatus.Cancelled;
|
||||
|
||||
await _context.SaveChangesAsync(cancellationToken);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user