public Task Handle(IOrderCreated message, IMessageHandlerContext context) { Console.WriteLine($"Order '{message.OrderId}' for reservation '{message.ReservationId}' created. Verifying if shipment can started...", Color.Green); Data.ReservationId = message.ReservationId; Data.OrderId = message.OrderId; Data.OrderCreated = true; return(StartShipmentProcessIfEverythingIsOk(context)); }
public Task Handle(IOrderCreated message, IMessageHandlerContext context) { Console.WriteLine($"Order '{message.OrderId}' for reservation '{message.ReservationId}' created, going to confirm card payment.", Color.Green); Data.OrderId = message.OrderId; return(context.Send(new ChargeCard() { AuthorizationId = Data.PaymentAuthorizationId, ReservationId = Data.ReservationId })); }