public static void SetFailedStatus(PaymentAttempt paymentAttempt, CreditCardPaymentAttempt creditCardPayment, string reason) { creditCardPayment.IsFinished = true; creditCardPayment.IsSuccessful = false; var paymentStarted = new PaymentAttemptStatusFailed { Reason = reason, Time = DateTime.Now, PaymentAttempt = paymentAttempt }; }