public RouteModel CompleteRegistration(OnlineRegController ctl) { HistoryAdd("CompleteRegistration"); var ret = CheckSpecialJavascript(); if (ret != null) { return(ret); } ret = CheckAskDonation(ctl); if (ret != null) { return(ret); } if (List.Count == 0) { return(RouteModel.ErrorMessage("Can't find any registrants")); } RemoveLastRegistrantIfEmpty(); UpdateDatum(); ret = CheckNoFeesDue(); if (ret != null) { return(ret); } var terms = Util.PickFirst(Terms, ""); if (terms.HasValue()) { ctl.ViewBag.Terms = terms; } ret = CheckTermsNoFee(ctl); if (ret != null) { return(ret); } ret = CheckAlreadyRegistered(); if (ret != null) { return(ret); } var pf = PaymentForm.CreatePaymentForm(this); #if DEBUG2 pf.CheckTesting(); #endif Log("PaymentForm"); ctl.ModelState.Clear(); return(RouteModel.ViewPayment("Payment/Process", pf)); }
private void CreateTransactionIfNeeded() { if (Transaction != null || ManagingSubscriptions() || ChoosingSlots()) { return; } HistoryAdd("ConfirmTransaction"); UpdateDatum(completed: true); var pf = PaymentForm.CreatePaymentForm(this); _transaction = pf.CreateTransaction(DbUtil.Db); TranId = _transaction.Id; }