Ejemplo n.º 1
0
        public static void SetStartedStatus(PaymentAttempt paymentAttempt, CreditCardPaymentAttempt creditCardPayment, string reason)
        {
            creditCardPayment.IsStarted = true;

            var paymentStarted = new PaymentAttemptStatusStarted
            {
                Reason         = reason,
                Time           = DateTime.Now,
                PaymentAttempt = paymentAttempt
            };
        }
Ejemplo n.º 2
0
        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
            };
        }
Ejemplo n.º 3
0
        public async Task <string> CreatePaymentAttemptAsync(string userId, int semesterId, decimal price)
        {
            var attempt = new PaymentAttempt
            {
                StudentId  = userId,
                SemesterId = semesterId,
                Price      = price,
            };

            await this.paymentAttemptRepository.AddAsync(attempt);

            await this.paymentAttemptRepository.SaveChangesAsync();

            return(attempt.Id);
        }
        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
            };
        }
        public static void SetStartedStatus(PaymentAttempt paymentAttempt, CreditCardPaymentAttempt creditCardPayment, string reason)
        {
            creditCardPayment.IsStarted = true;

            var paymentStarted = new PaymentAttemptStatusStarted
            {
                Reason = reason,
                Time = DateTime.Now,
                PaymentAttempt = paymentAttempt
            };
        }