public void Init() { this.logic = new Mock<IVetumaPaymentLogic>(); this.logic.Setup(o => o.MakePayment(It.IsAny<VetumaPaymentModel>())) .Callback<VetumaPaymentModel>(o => this.model = o); this.helper = new VetumaPaymentHelper(this.logic.Object); }
public virtual ActionResult OPIStep7(int id) { if (id == 0) { return this.LoadOrCreateAndPrefillNewApplication(); } // UI check uncomment to skip payment process // OLEApplicationSubmit model = this.businessLogic.GetOLEApplicationSubmit(id); // return this.View(MVC.OLE.Views.Views.OPI_Step7, model); var paymentHelper = new VetumaPaymentHelper(this.PaymentLogic); if (paymentHelper.ProcessResult(id)) { OLEApplicationSubmit model = this.businessLogic.GetOLEApplicationSubmit(id); return this.View(MVC.OLE.Views.Views.OPI_Step7, model); } return this.RedirectToAction(MVC.Dashboard.ActionNames.Index); }
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(); }