Browse Source

Added a comment about the simulated payment

pull/241/head
Cesar De la Torre 7 years ago
parent
commit
260b2cdf2c
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      src/Services/Payment/Payment.API/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs

+ 8
- 1
src/Services/Payment/Payment.API/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs View File

@ -22,7 +22,14 @@
public async Task Handle(OrderStatusChangedToStockConfirmedIntegrationEvent @event) public async Task Handle(OrderStatusChangedToStockConfirmedIntegrationEvent @event)
{ {
IntegrationEvent orderPaymentIntegrationEvent; 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); orderPaymentIntegrationEvent = new OrderPaymentSuccededIntegrationEvent(@event.OrderId);
} }


Loading…
Cancel
Save