public PaymentViewModel createAgrement(PaymentViewModel paymentModel) { if (paymentModel.isAgreement) { if (paymentModel.creditoreft == "0") {// havale eft paymentModel.paymentStatus = PaymentResultsStatusEnum.eftprocessdone; paymentModel.basketGroupId = _countersService.getNewCounter(CounterTypeEnum.agreementCounter); if (makeGroupIdBasketndAgreement(paymentModel)) { paymentModel.eftdoneMessage = _defaultValuesService.getDefaultValue("efttamamlandi"); paymentModel.bankAccounts = new BankAccountsListViewModel(); paymentModel.bankAccounts.bankAccountsList = _mapper.Map <IList <BankAccountsViewModel> >(_mainContext.bankAccounts.Where(w => w.status == GeneralStatusEnum.Active).ToList()); paymentModel.paymentStatus = PaymentResultsStatusEnum.eftprocessdone; } else { paymentModel = getPaymentInformation(); ToastrService.AddToUserQueue(new Toastr("İşlem sırasında bir hata oluştu. Lütfen tekrar deneyiniz", type: Model.Enums.ToastrType.Error)); } } else { payOnlineCreditCard(paymentModel); } } else { ToastrService.AddToUserQueue(new Toastr("Lütfen satış sözleşmesini onaylayınız.", type: Model.Enums.ToastrType.Error)); } return(paymentModel); }