diff --git a/src/Services/Payment/Payment.API/IntegrationCommands/CommandHandlers/PayOrderCommandMsgHandler.cs b/src/Services/Payment/Payment.API/IntegrationCommands/CommandHandlers/PayOrderCommandMsgHandler.cs index c0023909c..178b36474 100644 --- a/src/Services/Payment/Payment.API/IntegrationCommands/CommandHandlers/PayOrderCommandMsgHandler.cs +++ b/src/Services/Payment/Payment.API/IntegrationCommands/CommandHandlers/PayOrderCommandMsgHandler.cs @@ -12,7 +12,10 @@ private readonly IPaymentIntegrationEventService _paymentIntegrationEventService; public PayOrderCommandMsgHandler(IPaymentIntegrationEventService paymentIntegrationEventService) - => _paymentIntegrationEventService = paymentIntegrationEventService; + { + _paymentIntegrationEventService = paymentIntegrationEventService; + } + public async Task Handle(PayOrderCommandMsg @event) { diff --git a/src/Services/Payment/Payment.API/Payment.API.csproj b/src/Services/Payment/Payment.API/Payment.API.csproj index 7f741fa53..de3636585 100644 --- a/src/Services/Payment/Payment.API/Payment.API.csproj +++ b/src/Services/Payment/Payment.API/Payment.API.csproj @@ -29,6 +29,9 @@ + + + diff --git a/src/Services/Payment/Payment.API/Startup.cs b/src/Services/Payment/Payment.API/Startup.cs index b8b3b9b66..eaef3f704 100644 --- a/src/Services/Payment/Payment.API/Startup.cs +++ b/src/Services/Payment/Payment.API/Startup.cs @@ -12,6 +12,7 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ; using RabbitMQ.Client; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; using Payment.API.IntegrationEvents; +using Payment.API.IntegrationCommands.CommandHandlers; namespace Payment.API { @@ -49,7 +50,7 @@ namespace Payment.API }); services.AddSingleton(); services.AddSingleton(); - services.AddTransient>(); + services.AddTransient, PayOrderCommandMsgHandler>(); services.AddSwaggerGen();