diff --git a/services/payment/src/EShopOnAbp.PaymentService.Domain/EShopOnAbp.PaymentService.Domain.csproj b/services/payment/src/EShopOnAbp.PaymentService.Domain/EShopOnAbp.PaymentService.Domain.csproj index a1af97d7..c87f3bb4 100644 --- a/services/payment/src/EShopOnAbp.PaymentService.Domain/EShopOnAbp.PaymentService.Domain.csproj +++ b/services/payment/src/EShopOnAbp.PaymentService.Domain/EShopOnAbp.PaymentService.Domain.csproj @@ -14,6 +14,7 @@ + diff --git a/services/payment/src/EShopOnAbp.PaymentService.Domain/EventHandlers/OrderCancelledEventHandler.cs b/services/payment/src/EShopOnAbp.PaymentService.Domain/EventHandlers/OrderCancelledEventHandler.cs index 9f1d781f..a4e3837c 100644 --- a/services/payment/src/EShopOnAbp.PaymentService.Domain/EventHandlers/OrderCancelledEventHandler.cs +++ b/services/payment/src/EShopOnAbp.PaymentService.Domain/EventHandlers/OrderCancelledEventHandler.cs @@ -1,9 +1,10 @@ using EShopOnAbp.OrderingService.Orders; using EShopOnAbp.PaymentService.PaymentRequests; +using Serilog; using System.Threading.Tasks; using Volo.Abp.DependencyInjection; using Volo.Abp.EventBus.Distributed; -using Volo.Abp.Uow; + namespace EShopOnAbp.PaymentService.EventHandlers { @@ -16,11 +17,10 @@ namespace EShopOnAbp.PaymentService.EventHandlers _paymentRepository = paymenRepository; } - [UnitOfWork] public async Task HandleEventAsync(OrderCancelledEto eventData) { var payment = await _paymentRepository.GetAsync(eventData.Buyer.BuyerId.GetValueOrDefault()); - await _paymentRepository.DeleteAsync(payment); + Log.Information($"Cancelled the order: {payment.OrderId} payment:{payment.Id}"); } } }