public void Handle(PaymentBeginEvent eventData) { PaymentRepository.AddOrReplacePaymentData(new PaymentData() { PaymentGuid = eventData.PaymentGuid, PaymentStatus = PaymentStatus.Began }); }
public void Handle(PaymentSucceededEvent eventData) { PaymentRepository.AddOrReplacePaymentData(new PaymentData() { PaymentGuid = eventData.PaymentGuid, PaymentStatus = PaymentStatus.Succeeded }); }
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); }