diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/Transactions/OrderRefundedEventHandler.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/Transactions/OrderRefundedEventHandler.cs index c6821cbe..d08c577c 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/Transactions/OrderRefundedEventHandler.cs +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/Transactions/OrderRefundedEventHandler.cs @@ -29,6 +29,12 @@ namespace EasyAbp.EShop.Stores.Transactions { var order = eventData.Order; var refund = eventData.Refund; + + // Record the transaction only if the order is completed. + if (!order.CompletionTime.HasValue) + { + return; + } using var changeTenant = _currentTenant.Change(order.TenantId);