public void Handle(QuantityAdditionFailedEvent eventData) { var failedEventData = new FailedEventData(); failedEventData.EventType = eventData.GetType().ToString(); failedEventData.Message = "Adding quantity failed for product " + eventData.ProductId; FailedEventsRepository.AddFailedEvent(failedEventData); }
public void Handle(PaymentFailedEvent eventData) { string message = eventData.FailureCode + ": " + eventData.FailureMessage; var failedEventData = new FailedEventData(); failedEventData.EventType = eventData.GetType().ToString(); failedEventData.Message = message; FailedEventsRepository.AddFailedEvent(failedEventData); var paymentData = new PaymentData() { PaymentGuid = eventData.PaymentGuid, Message = message, PaymentStatus = PaymentStatus.Failed }; PaymentRepository.AddOrReplacePaymentData(paymentData); }
public FailedEventData GetFirstFailedEventData() { return(FailedEventsRepository.GetFirstFailedEvent()); }