예제 #1
0
        private static PatientLoginInfo CreatePatientLoginInfo()
        {
            var patientLoginInfo = new PatientLoginInfo
            {
                ID        = 1,
                LastName  = "Smith",
                FirstName = "John",
                Email     = "*****@*****.**"
            };

            return(patientLoginInfo);
        }
예제 #2
0
        public JsonResult SavePayment(PaymentCreationParameters payment)
        {
            var user             = AppService.Current.User.CurrentUser;
            var patientLoginInfo = new PatientLoginInfo
            {
                ID        = user.ID,
                LastName  = user.LastName,
                FirstName = user.FirstName,
                Email     = user.Email
            };
            var result = _paymentManager.SavePayment(patientLoginInfo, payment, null);

            return(this.CamelCaseJson(result));
        }
예제 #3
0
        public ActionResult SavePayment(ExtendedPaymentCreationParameters payment)
        {
            var patientLogin = PaymentService.GetPatientLogin(payment.PatientLoginId);

            if (patientLogin == null)
            {
                throw new Exception("Payment without an existing patient login cannot be processed.");
            }
            var patientLoginInfo = new PatientLoginInfo
            {
                ID        = patientLogin.ID,
                LastName  = patientLogin.LastName,
                FirstName = patientLogin.FirstName,
                Email     = patientLogin.Email
            };
            var result = PaymentManager.SavePayment(patientLoginInfo, payment, AppService.Current.User.ID.Value);

            return(this.CamelCaseJson(result));
        }