From 260b2cdf2c474e6b96ffd665ebe4886150daef38 Mon Sep 17 00:00:00 2001 From: Cesar De la Torre Date: Mon, 10 Jul 2017 14:17:16 -0700 Subject: [PATCH] Added a comment about the simulated payment --- ...atusChangedToStockConfirmedIntegrationEventHandler.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Services/Payment/Payment.API/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs b/src/Services/Payment/Payment.API/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs index dfdba0068..bf2e4c1ca 100644 --- a/src/Services/Payment/Payment.API/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs +++ b/src/Services/Payment/Payment.API/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs @@ -22,7 +22,14 @@ public async Task Handle(OrderStatusChangedToStockConfirmedIntegrationEvent @event) { IntegrationEvent orderPaymentIntegrationEvent; - if(_settings.PaymentSucceded) + + //Business feature comment: + // When OrderStatusChangedToStockConfirmed Integration Event is handled. + // Here we're simulating that we'd be performing the payment against any payment gateway + // Instead of a real payment we just take the env. var to simulate the payment + // The payment can be successful or it can fail + + if (_settings.PaymentSucceded) { orderPaymentIntegrationEvent = new OrderPaymentSuccededIntegrationEvent(@event.OrderId); }