/// <summary>
        /// Retrieves data from database and composes model of sixth page of OLE applications
        /// </summary>
        /// <param name="id">ID of OLE application</param>
        /// <returns>Loaded, prefilled OLE Application sixth page model</returns>
        public OLEPaymentPage GetPaymentModel(int id)
        {
            // TO DO calculate and save payable amount to DB

            OLEPaymentPage model = new OLEPaymentPage();
            model.FormProgress = this.GetFormProgressPrefill(FormType.OPIStudyResidencePermit);
            model.FormProgress.Pages[5].IsCurrent = true;
            model.ApplicationId = id;
            return model;
        }
Example #2
0
        public virtual EmptyResult OPIStep6Save(OLEPaymentPage model)
        {
            if (model == null || model.ApplicationId == 0)
            {
                throw new ArgumentException("applicationId is 0 or model is null");
            }

            var paymentsHelper = new VetumaPaymentHelper(this.PaymentLogic);

            paymentsHelper.SubmitPayment(model.ApplicationId, model.SelectedEmbassy);
            return new EmptyResult();
        }