Ejemplo n.º 1
0
        public ActionResult BillsPayForm()
        {
            bool sss = checkSession();

            var model = new BillsPayViewModel();

            return(View(model));
        }
Ejemplo n.º 2
0
        public JsonResult SubmitBillsPay(BillsPayViewModel model)
        {
            if (ModelState.IsValid)
            {
                string[] values = User.Identity.Name.Split('|');

                ML.OFW.Contracts.Models.billsPayModel.saveTransactionBillsPay smodel = new OFW.Contracts.Models.billsPayModel.saveTransactionBillsPay();

                smodel.accountFName   = model.CompFname;
                smodel.accountLName   = model.CompLname;
                smodel.accountMName   = model.CompMname;
                smodel.accountNo      = model.CompAccountNo;
                smodel.amountpaid     = Convert.ToDecimal(model.amountPaid);
                smodel.companyID      = model.CompID;
                smodel.currency       = model.currency;
                smodel.customerCharge = Convert.ToDecimal(model.charge);
                smodel.otherDetails   = model.otherDetails;
                smodel.payorCustID    = model.payerID;
                smodel.walletno       = values[1];
                smodel.walletOperator = values[0];

                ML.OFW.Services.OFW service = new OFW.Services.OFW();
                var respVal = service.saveTransactionBillsPay(smodel);

                if (respVal.respcode != 0)
                {
                    return(Json(new { status = true, errorcode = "1", msg = respVal.message, kptn = respVal.kptn }, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json(new { status = false, errorcode = "0", msg = respVal.message }, JsonRequestBehavior.AllowGet));
                }
            }
            else
            {
                return(Json(new { status = false, errorcode = "0", msg = "Form is invalid." }, JsonRequestBehavior.AllowGet));
            }
        }