コード例 #1
0
 public MembershipPaymentsController(Database.FitnessCenterDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
     _authenticationService    = new AuthenticationService(_context);
     _membershipPaymentService = new MembershipPaymentService(_context, _mapper);
 }
コード例 #2
0
        public static bool ProcessPayments(PaymentType paymentType)
        {
            switch (paymentType)
            {
            case PaymentType.PhysicalProduct:
            case PaymentType.Book:
                PhysicalProductPaymentService physicalProductPaymentService = new PhysicalProductPaymentService();
                return(physicalProductPaymentService.ProcessPayment(paymentType));

            case PaymentType.Membership:
            case PaymentType.MembershipUpgrade:
                MembershipPaymentService membershipPaymentService = new MembershipPaymentService();
                return(membershipPaymentService.ProcessPayment(paymentType));

            case PaymentType.Video:
                VideoPaymentService videoPaymentService = new VideoPaymentService();
                return(videoPaymentService.ProcessPayment(paymentType));

            default:
                return(false);
            }
        }