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