Exemplo n.º 1
0
        public ActionResult ComputeParkingFee(string licensePlate, string parkingId)
        {
            licensePlate = licensePlate.ToPlateNo();
            if (!string.IsNullOrWhiteSpace(licensePlate) && licensePlate.Length > 2)
            {
                string firstPlate = HttpUtility.UrlEncode(licensePlate.Substring(0, 2), Encoding.GetEncoding("UTF-8"));
                Response.Cookies.Add(new HttpCookie("SmartSystem_WeiXinUser_DefaultPlate", firstPlate));
            }
            try
            {
                OnlineOrder model = new OnlineOrder();
                model.OrderTime = DateTime.Now;

                TempParkingFeeResult result = RechargeService.WXTempParkingFee(licensePlate, parkingId, LoginAccountID, model.OrderTime);
                if (result.Result == APPResult.NoNeedPay || result.Result == APPResult.RepeatPay)
                {
                    int type = result.Result == APPResult.NoNeedPay ? 0 : 1;
                    return(RedirectToAction("NotNeedPayment", "ParkingPayment", new { licensePlate = licensePlate, type = type, surplusMinutes = result.OutTime, entranceTime = result.EntranceDate }));
                }
                RechargeService.CheckCalculatingTempCost(result.Result);
                if (result.OrderSource == PayOrderSource.Platform)
                {
                    bool testResult = CarService.WXTestClientProxyConnectionByPKID(result.ParkingID);
                    if (!testResult)
                    {
                        throw new MyException("车场网络异常,暂无法缴停车费!");
                    }
                    int interfaceOrderState = InterfaceOrderServices.OrderWhetherEffective(result.Pkorder.OrderNo);
                    if (interfaceOrderState != 1)
                    {
                        string msg = interfaceOrderState == 2 ? "重复支付" : "订单已失效";
                        return(PageAlert("Index", "H5ParkingPayment", new { RemindUserContent = msg }));
                    }
                }
                model.ParkCardNo     = result.CardNo;
                model.PKID           = result.ParkingID;
                model.PKName         = result.ParkName;
                model.InOutID        = result.Pkorder.TagID;
                model.PlateNo        = result.PlateNumber;
                model.EntranceTime   = result.EntranceDate;
                model.ExitTime       = model.OrderTime.AddMinutes(result.OutTime);
                model.Amount         = result.Pkorder.Amount;
                model.PayDetailID    = result.Pkorder.OrderNo;
                model.DiscountAmount = result.Pkorder.DiscountAmount;
                model.OrderSource    = result.OrderSource;
                model.ExternalPKID   = result.ExternalPKID;
                ViewBag.Result       = result.Result;
                ViewBag.PayAmount    = result.Pkorder.PayAmount;
                return(View(model));
            }
            catch (MyException ex)
            {
                return(PageAlert("Index", "H5ParkingPayment", new { RemindUserContent = ex.Message }));
            }
            catch (Exception ex)
            {
                ExceptionsServices.AddExceptionToDbAndTxt("H5ParkingPaymentError", "计算缴费金额失败", ex, LogFrom.WeiXin);
                return(PageAlert("Index", "H5ParkingPayment", new { RemindUserContent = "计算缴费金额失败" }));
            }
        }
Exemplo n.º 2
0
        public AirtimeResult TopUp(string phoneNumber, int amount)
        {
            var airtimeResult = new AirtimeResult()
            {
                ResultCode = 400
            };

            if (customer.Balance < amount)
            {
                Console.WriteLine("Running out of balance");
                airtimeResult.ResultCode = 400;
                airtimeResult.Message    = "Running out of balance";
                return(airtimeResult);
            }

            var rechargeService = new RechargeService();
            var isRecharged     = rechargeService.TopUp(phoneNumber, amount);

            if (isRecharged)
            {
                customer.Balance = customer.Balance - (amount * (100.0 + ConstantValues.Charge) / 100.0)
                                   + (amount * (customer.Discount) / 100.0);
                airtimeResult = new AirtimeResult()
                {
                    ResultCode = 200,
                    Amount     = amount,
                    Balance    = customer.Balance,
                    Charge     = ConstantValues.Charge,
                    Message    = "sceessfully recharge"
                };
                return(airtimeResult);
            }
            return(airtimeResult);//or throw exception
        }
Exemplo n.º 3
0
 /// <summary>
 /// 根据车牌号月卡续期
 /// </summary>
 /// <returns></returns>
 public ActionResult PlateNoRenewal(string plateNo)
 {
     try
     {
         List <ParkUserCarInfo> carInfos = RechargeService.GetMonthCarInfoByPlateNumber(plateNo);
         if (carInfos == null || carInfos.Count == 0)
         {
             return(PageAlert("Index", "CardRenewal", new { RemindUserContent = "找不到该车辆信息,请检查车牌输入是否正确" }));
         }
         if (carInfos.Count == 1)
         {
             if (!carInfos.First().IsAllowOnlIne)
             {
                 return(PageAlert("Index", "CardRenewal", new { RemindUserContent = "该车辆不支持线上缴费" }));
             }
             return(RedirectToAction("MonthCardRenewal", "CardRenewal", new { plateNo = plateNo, cardId = carInfos.First().CardID, source = 1 }));
         }
         return(View(carInfos));
     }
     catch (Exception ex)
     {
         ExceptionsServices.AddExceptionToDbAndTxt("WeiXinWeb", string.Format("获取车牌信息失败,车牌号:" + plateNo), ex, LogFrom.WeiXin);
         return(PageAlert("Index", "CardRenewal", new { RemindUserContent = "获取车牌信息失败" }));
     }
 }
Exemplo n.º 4
0
        public ActionResult Index()
        {
            var nameCookie = Request.Cookies["SmartSystem_MonthCardPayment_Month"];

            if (nameCookie != null)
            {
                nameCookie.Expires = DateTime.Now.AddDays(-1);
                Response.AppendCookie(nameCookie);
            }
            var nameCookieRecharge = Request.Cookies["SmartSystem_GiftCardRecharge_PayMoney"];

            if (nameCookieRecharge != null)
            {
                nameCookieRecharge.Expires = DateTime.Now.AddDays(-1);
                Response.AppendCookie(nameCookieRecharge);
            }
            int defaultShowItem = 0;
            int type            = 0;

            if (!string.IsNullOrWhiteSpace(Request["ShowItem"]) && int.TryParse(Request["ShowItem"].ToString(), out type))
            {
                defaultShowItem = type;
            }
            ViewBag.DefaultShowItem = defaultShowItem;
            List <ParkUserCarInfo> carInfos = RechargeService.GetMonthCarInfoByAccountID(WeiXinUser.AccountID);

            return(View(carInfos));
        }
Exemplo n.º 5
0
        public PayController()
        {
            servicePay      = new PayService(db);
            serviceOrder    = new OrderService(db);
            serviceRecharge = new RechargeService(db);
            serviceUser     = new UserService(db);
            serviceMoney    = new MoneyService(db);

            userTicket = new UserTicketDetailService(db);
        }
Exemplo n.º 6
0
        /// <summary>
        /// 月卡续期
        /// </summary>
        /// <returns></returns>
        public ActionResult MonthCardRenewal(string cardId, string plateNo = "", int source = 0)
        {
            try
            {
                string selectMonth   = string.Empty;
                string selectPayType = string.Empty;
                var    selectParam   = HttpContext.Request.Cookies["SmartSystem_MonthCardPayment_Month"];
                if (selectParam != null && !string.IsNullOrWhiteSpace(selectParam.Value))
                {
                    if (selectParam.Value.Contains(","))
                    {
                        string[] strs = selectParam.Value.Split(',');
                        selectMonth   = strs[0];
                        selectPayType = strs[1];
                    }
                }
                ViewBag.SelectMonth   = selectMonth;
                ViewBag.SelectPayType = selectPayType;
                ViewBag.SystemDate    = DateTime.Now.Date;

                List <ParkUserCarInfo> carInfos = new List <ParkUserCarInfo>();
                if (source == 1)
                {
                    carInfos = RechargeService.GetMonthCarInfoByPlateNumber(plateNo);
                }
                else
                {
                    if (UserAccount != null)
                    {
                        carInfos = RechargeService.GetMonthCarInfoByAccountID(UserAccount.AccountID);
                    }
                }
                ParkUserCarInfo card = carInfos.FirstOrDefault(p => p.CardID == cardId);
                if (card == null)
                {
                    throw new MyException("获月卡信息失败");
                }
                ViewBag.Source = source;

                bool canConnection = CarService.WXTestClientProxyConnectionByVID(card.VID);
                if (!canConnection)
                {
                    return(PageAlert("Index", "H5CardRenewal", new { RemindUserContent = "车场网络异常,暂无法续期,请稍后再试!" }));
                }
                ViewBag.CardRenewalMonthDic = GetCardRenewalMonth(card.OnlineUnit);
                return(View(card));
            }
            catch (Exception ex)
            {
                ExceptionsServices.AddExceptionToDbAndTxt("H5CardRenewalError", string.Format("获取续费信息失败,编号:" + cardId), ex, LogFrom.WeiXin);
                return(PageAlert("Index", "H5CardRenewal", new { RemindUserContent = "获取卡信息失败" }));
            }
        }
Exemplo n.º 7
0
        //private string GetCompanyId(string pid, string bid) {
        //    try
        //    {
        //        if (!string.IsNullOrWhiteSpace(pid))
        //        {
        //            BaseCompany company = CompanyServices.QueryByParkingId(pid);
        //            if (company != null)
        //            {
        //                return company.CPID;
        //            }
        //        }
        //        if (!string.IsNullOrWhiteSpace(bid))
        //        {
        //            BaseCompany company = CompanyServices.QueryByBoxID(bid);
        //            if (company != null)
        //            {
        //                return company.CPID;
        //            }
        //        }
        //    }
        //    catch (Exception ex) {
        //        ExceptionsServices.AddExceptionToDbAndTxt("QRCodeParkPayment", "GetCompanyId方法处理异常", ex, LogFrom.WeiXin);

        //    }
        //    return string.Empty;
        //}
        /// <summary>
        /// 计算停车费
        /// </summary>
        /// <param name="pid">车场编号</param>
        /// <param name="licensePlate">车牌号</param>
        /// <param name="bid">岗亭编号</param>
        /// <param name="gid">通道编号</param>
        /// <returns></returns>
        public ActionResult ComputeParkingFee(string pid, string licensePlate, string bid, string gid)
        {
            licensePlate = licensePlate.ToPlateNo();
            TxtLogServices.WriteTxtLogEx("QRCodeParkPayment", "进入ComputeParkingFee,pid:{0}, licensePlate:{1}, bid:{2},gid:{3},opendId:{4}", pid, licensePlate, bid, gid, WeiXinOpenId);
            bool IsShowPlateNumber = true;

            try
            {
                OnlineOrder model = new OnlineOrder();
                model.OrderTime = DateTime.Now;

                TempParkingFeeResult result = null;
                bool bClient = false;
                if (!string.IsNullOrWhiteSpace(gid))
                {
                    //result = RechargeService.WXScanCodeTempParkingFeeByGateID(pid, gid, string.Empty, GetOrderSource());
                    result = ParkingFeeService.GetParkingFeeByGateID(pid, gid);
                    if (result == null)
                    {
                        TxtLogServices.WriteTxtLogEx("QRCodeParkPayment", "GetParkingFeeByGateID Result:null");
                    }
                    else
                    {
                        bClient = true;
                        TxtLogServices.WriteTxtLogEx("QRCodeParkPayment", "GetParkingFeeByGateID Result:{0}", (int)result.Result);
                    }
                    if (result == null)
                    {
                        result = RechargeService.WXScanCodeTempParkingFeeByParkGateID(pid, gid, string.Empty, GetOrderSource());
                    }
                    TxtLogServices.WriteTxtLogEx("QRCodeParkPayment", "Result:{0}", (int)result.Result);
                    if (result == null || result.Result == APPResult.NoNeedPay || result.Result == APPResult.RepeatPay)
                    {
                        int type = result.Result == APPResult.NoNeedPay ? 0 : 1;
                        return(RedirectToAction("NotNeedPayment", "QRCodeParkPayment", new { licensePlate = result.PlateNumber, type = type, surplusMinutes = result.OutTime, entranceTime = result.EntranceDate, backUrl = "/QRCode/Index" }));
                    }
                    if (result.Result == APPResult.NoLp)
                    {
                        return(RedirectToAction("Index", "ScanCodeInOut", new { pid = pid, io = gid, source = 1 }));
                    }
                }
                else if (!string.IsNullOrWhiteSpace(bid))
                {
                    result = ParkingFeeService.GetParkingFeeByBoxID(bid);

                    if (result == null)
                    {
                        TxtLogServices.WriteTxtLogEx("QRCodeParkPayment", "GetParkingFeeByBoxID Result:null");
                        result = RechargeService.WXScanCodeTempParkingFee(bid, string.Empty);
                    }
                    else
                    {
                        bClient = true;
                        TxtLogServices.WriteTxtLogEx("QRCodeParkPayment", "GetParkingFeeByBoxID Result:{0}", (int)result.Result);
                    }
                    if (result == null || result.Result == APPResult.NoNeedPay || result.Result == APPResult.RepeatPay)
                    {
                        int type = result.Result == APPResult.NoNeedPay ? 0 : 1;
                        return(RedirectToAction("NotNeedPayment", "QRCodeParkPayment", new { licensePlate = result.PlateNumber, type = type, surplusMinutes = result.OutTime, entranceTime = result.EntranceDate, backUrl = "/QRCode/Index" }));
                    }
                }
                else
                {
                    if (string.IsNullOrWhiteSpace(licensePlate))
                    {
                        return(RedirectToAction("Index", "ErrorPrompt", new { message = "获取车牌信息失败" }));
                    }
                    result = ParkingFeeService.GetParkingFeeByParkingID(pid, licensePlate);

                    if (result == null)
                    {
                        result = RechargeService.WXTempParkingFee(licensePlate, pid, string.Empty, model.OrderTime);
                    }
                    else
                    {
                        bClient = true;
                    }
                    if (result == null || result.Result == APPResult.NoNeedPay || result.Result == APPResult.RepeatPay)
                    {
                        int type = result.Result == APPResult.NoNeedPay ? 0 : 1;
                        return(RedirectToAction("NotNeedPayment", "QRCodeParkPayment", new { licensePlate = licensePlate, type = type, surplusMinutes = result.OutTime, entranceTime = result.EntranceDate }));
                    }
                }

                if (!bClient)
                {
                    RechargeService.CheckCalculatingTempCost(result.Result, result.ErrorDesc);
                    if (result.OrderSource == PayOrderSource.Platform)
                    {
                        bool testResult = CarService.WXTestClientProxyConnectionByPKID(result.ParkingID);
                        if (!testResult)
                        {
                            throw new MyException("车场网络异常,暂无法缴停车费!");
                        }
                        //int interfaceOrderState = InterfaceOrderServices.OrderWhetherEffective(result.Pkorder.OrderNo);
                        int interfaceOrderState = InterfaceOrderServices.OrderWhetherEffective(result.Pkorder.OrderNo, result.ParkingID, result.Pkorder.TagID);
                        TxtLogServices.WriteTxtLogEx("QRCodeParkPayment", "ComputeParkingFee,Tag:{0}, OrderNo:{1}, PKID:{2}\r\nResult:{3}", result.Pkorder.TagID, result.Pkorder.OrderNo, result.ParkingID, interfaceOrderState);

                        if (interfaceOrderState != 1)
                        {
                            string msg       = interfaceOrderState == 2 ? "重复支付" : "订单已失效";
                            string companyId = GetCompanyId(pid, bid, gid);
                            return(RedirectToAction("Index", "ErrorPrompt", new { message = msg, returnUrl = "/QRCode/Index?companyId=" + companyId + "" }));
                        }
                    }
                }
                model.OrderSource         = result.OrderSource;
                model.ExternalPKID        = result.ExternalPKID;
                model.ParkCardNo          = result.CardNo;
                model.PKID                = result.ParkingID;
                model.PKName              = result.ParkName;
                model.InOutID             = result.Pkorder.TagID;
                model.TagID               = result.Pkorder.TagID;
                model.PlateNo             = result.PlateNumber;
                model.EntranceTime        = result.EntranceDate;
                model.ExitTime            = model.OrderTime.AddMinutes(result.OutTime);
                model.Amount              = result.Pkorder.Amount;
                model.PayDetailID         = result.Pkorder.OrderNo;
                model.DiscountAmount      = result.Pkorder.DiscountAmount;
                ViewBag.Result            = result.Result;
                ViewBag.PayAmount         = result.Pkorder.PayAmount;
                ViewBag.IsShowPlateNumber = IsShowPlateNumber;

                if (result.ImageUrl.IsEmpty())
                {
                    ParkIORecord record  = ParkIORecordServices.QueryLastExitIORecordByPlateNumber(model.PlateNo);
                    string       htmlurl = "";
                    if (record != null && record.EntranceImage.IsEmpty() == false)
                    {
                        htmlurl = "http://www.yft166.net/Pic/" + record.EntranceImage.Replace('\\', '/');
                    }
                    else
                    {
                        result.ImageUrl = htmlurl;
                    }
                    result.ImageUrl = htmlurl;
                }
                //显示图片的
                ViewBag.url = result.ImageUrl;

                return(View(model));
            }
            catch (MyException ex)
            {
                string companyId = GetCompanyId(pid, bid, gid);
                string parkingId = GetParkingId(pid, bid, gid);
                return(RedirectToAction("Index", "ErrorPrompt", new { message = ex.Message, parkingId = parkingId, returnUrl = "/QRCode/Index?companyId=" + companyId + "" }));
            }
            catch (Exception ex)
            {
                string companyId = GetCompanyId(pid, bid, gid);
                ExceptionsServices.AddExceptionToDbAndTxt("WeiXinPageError", "扫描缴费计算缴费金额失败", ex, LogFrom.WeiXin);
                return(RedirectToAction("Index", "ErrorPrompt", new { message = "计算缴费金额失败", returnUrl = "/QRCode/Index?companyId=" + companyId + "" }));
            }
        }
Exemplo n.º 8
0
 public ActionResult Test()
 {
     RechargeService.SFMTempParkingFeeResult("2");
     //OnlineOrderServices.PaySuccess(11806020022000001, "4200000062201804255544381248", DateTime.Now);
     return(View());
 }
Exemplo n.º 9
0
        /// <summary>
        /// 同步支付结果
        /// </summary>
        /// <param name="orderId"></param>
        /// <param name="payTime"></param>
        private static bool SyncNoticePayResult(decimal orderId, DateTime payTime, OnlineOrder order, out string payDetailId)
        {
            payDetailId = string.Empty;
            int payWay = GetServicePayWay(order.PaymentChannel);

            switch (order.OrderType)
            {
            case OnlineOrderType.MonthCardRecharge:
            {
                MonthlyRenewalResult renewalsResult = RechargeService.WXMonthlyRenewals(order.CardId, order.PKID, order.MonthNum, order.Amount, order.AccountID, payWay, OrderSource.WeiXin, order.OrderID.ToString(), payTime);
                if (renewalsResult.Result != APPResult.Normal)
                {
                    throw new MyException(SyncResultDescription(renewalsResult.Result));
                }
                payDetailId = renewalsResult.Pkorder != null?renewalsResult.Pkorder.OnlineOrderNo.ToString() : string.Empty;

                return(true);
            }

            case OnlineOrderType.ParkFee:
            {
                if (order.OrderSource == PayOrderSource.BWY)
                {
                    BWYOrderPaymentResult result = BWYInterfaceProcess.PayNotice((int)(order.Amount * 100), order.ExternalPKID, order.PayDetailID.ToString());
                    if (result.Result != 0)
                    {
                        throw new MyException(result.Desc);
                    }
                }
                else if (order.OrderSource == PayOrderSource.SFM)
                {
                    bool isPayScene = !string.IsNullOrWhiteSpace(order.TagID);
                    TxtLogServices.WriteTxtLogEx("SFMError", string.Format("isPayScene:{0}", isPayScene));
                    SFMResult result = SFMInterfaceProcess.PayNotify(order.InOutID, order.SerialNumber, order.Amount.ToString(), isPayScene);
                    if (result == null)
                    {
                        throw new MyException("请求赛菲姆支付通知失败");
                    }
                    if (!result.Success)
                    {
                        throw new MyException(string.Format("{0}【{1}】", result.Message, result.Code));
                    }
                }
                else
                {
                    TempStopPaymentResult result = RechargeService.WXTempStopPayment(order.PayDetailID, payWay, order.Amount, order.PKID, order.AccountID, order.OrderID.ToString(), payTime);
                    if (result.Result != APPResult.Normal)
                    {
                        throw new MyException(SyncResultDescription(result.Result));
                    }
                }
                return(true);
            }

            case OnlineOrderType.PkBitBooking:
            {
                return(PkBitBookingServices.WXReserveBitPay(order.CardId, order.PayDetailID, order.Amount, order.PKID, order.OrderID.ToString()));
            }

            case OnlineOrderType.SellerRecharge:
            {
                return(SyncSellerRecharge(order, (OrderPayWay)payWay));
            }

            case OnlineOrderType.APPRecharge:
            {
                return(1 == AppBalanceNotify.BalanceRechargeNotify(order.OrderID.ToString(), order.PlateNo, order.Amount));
            }

            default: throw new MyException("同步类型不存在");
            }
        }
Exemplo n.º 10
0
        public ActionResult Index(string pid, string io, int source = 0)
        {
            try
            {
                if (SourceClient != RequestSourceClient.AliPay && SourceClient != RequestSourceClient.WeiXin)
                {
                    return(RedirectToAction("Index", "ErrorPrompt", new { message = "请在微信或支付宝中打开" }));
                }
                TxtLogServices.WriteTxtLogEx("ScanCodeInOut", string.Format("微信编号:{0}车场编号:{1},通道编号:{2}", WeiXinOpenId, pid, io));

                BaseCompany company = CompanyServices.QueryByParkingId(pid);
                if (company == null)
                {
                    throw new MyException("获取单位信息失败");
                }

                string plateNumber = string.Empty;
                if (SourceClient == RequestSourceClient.WeiXin)
                {
                    if (string.IsNullOrWhiteSpace(WeiXinOpenId))
                    {
                        string id = string.Format("ScanCodeInOut_Index_pid={0}^io={1}^companyId={2}^source={3}", pid, io, company.CPID, source);
                        return(RedirectToAction("Index", "WeiXinAuthorize", new { id = id }));
                    }
                    plateNumber = WeiXinOpenId;
                }
                if (SourceClient == RequestSourceClient.AliPay)
                {
                    if (string.IsNullOrWhiteSpace(AliPayUserId))
                    {
                        string id = string.Format("ScanCodeInOut_Index_pid={0}^io={1}^companyId={2}^source={3}", pid, io, company.CPID, source);
                        return(RedirectToAction("Index", "AliPayAuthorize", new { id = id }));
                    }
                    plateNumber = AliPayUserId;
                }
                if (source == 0)
                {
                    return(RedirectToAction("ComputeParkingFee", "QRCodeParkPayment", new { pid = pid, gid = io }));
                }
                int result = RechargeService.WXScanCodeInOut(pid, io, plateNumber);
                TxtLogServices.WriteTxtLogEx("ScanCodeInOut", "result:" + result);

                if (result == 0)
                {
                    return(RedirectToAction("InSuccess"));
                }
                if (result == 1)
                {
                    return(RedirectToAction("Index", "QRCodeParkPayment", new { pid = pid, pn = plateNumber }));
                }
                else
                {
                    string message = ErrorDescription(result);
                    TxtLogServices.WriteTxtLogEx("ScanCodeInOut", "message:" + message);
                    return(RedirectToAction("Index", "ErrorPrompt", new { message = message, returnUrl = "", ShowCustomerServicePhone = true }));
                }
            }
            catch (Exception ex)
            {
                ExceptionsServices.AddExceptionToDbAndTxt("ScanCodeInOut", "ScanCodeInOut方法处理异常", ex, LogFrom.WeiXin);
                return(RedirectToAction("Index", "ErrorPrompt", new { message = "跳转链接失败" }));
            }
        }
Exemplo n.º 11
0
        public ActionResult SubmitMonthRenewals(string cardId, int month, double paymoney, PaymentChannel paytype, DateTime afterdate, string plateno, int source)
        {
            try
            {
                TxtLogServices.WriteTxtLog("1");

                TxtLogServices.WriteTxtLog(plateno);
                TxtLogServices.WriteTxtLog(cardId);
                TxtLogServices.WriteTxtLog(source.ToString());
                //TxtLogServices.WriteTxtLog(carInfos.Count().ToString());

                List <ParkUserCarInfo> carInfos = source == 1
                    ?RechargeService.GetMonthCarInfoByPlateNumber(plateno)
                    : RechargeService.GetMonthCarInfoByAccountID(WeiXinUser.AccountID);

                ParkUserCarInfo card = carInfos.FirstOrDefault(p => p.CardID == cardId);

                if (card == null)
                {
                    TxtLogServices.WriteTxtLog(carInfos.Count().ToString());
                    TxtLogServices.WriteTxtLog("2");
                }
                TxtLogServices.WriteTxtLog("3");

                CheckMonthCardOrder(card, month, paymoney, paytype, afterdate);
                TxtLogServices.WriteTxtLog("4");
                BaseCompany company = CompanyServices.QueryByParkingId(card.PKID);
                if (company == null)
                {
                    throw new MyException("获取单位信息失败");
                }

                WX_ApiConfig config = WXApiConfigServices.QueryWXApiConfig(company.CPID);
                if (config == null)
                {
                    ExceptionsServices.AddExceptionToDbAndTxt("WeiXinPageError", "获取微信配置信息失败", "单位编号:" + company.CPID, LogFrom.WeiXin);
                    return(RedirectToAction("Index", "ErrorPrompt", new { message = "获取微信配置信息失败!" }));
                }
                if (!config.Status)
                {
                    ExceptionsServices.AddExceptionToDbAndTxt("WeiXinPageError", "该车场暂停使用微信支付", "单位编号:" + company.CPID, LogFrom.WeiXin);
                    return(RedirectToAction("Index", "ErrorPrompt", new { message = "该车场暂停使用微信支付!" }));
                }
                if (config.CompanyID != WeiXinUser.CompanyID)
                {
                    ExceptionsServices.AddExceptionToDbAndTxt("WeiXinPageError", "微信用户所属公众号和当前公众号不匹配,不能支付", string.Format("支付单位:{0},微信用户单位:{1}", config.CompanyID, WeiXinUser.CompanyID), LogFrom.WeiXin);
                    return(RedirectToAction("Index", "ErrorPrompt", new { message = "微信用户所属公众号和当前公众号不匹配,不能支付!" }));
                }
                if (CurrLoginWeiXinApiConfig == null || config.CompanyID != CurrLoginWeiXinApiConfig.CompanyID)
                {
                    string loginCompanyId = CurrLoginWeiXinApiConfig != null ? CurrLoginWeiXinApiConfig.CompanyID : string.Empty;
                    ExceptionsServices.AddExceptionToDbAndTxt("WeiXinPageError", "车场所属公众号和当前公众号不匹配,不能支付", string.Format("支付单位:{0},微信用户单位:{1}", config.CompanyID, loginCompanyId), LogFrom.WeiXin);
                    return(RedirectToAction("Index", "ErrorPrompt", new { message = "车场所属公众号和当前公众号不匹配,不能支付!" }));
                }

                OnlineOrder model = new OnlineOrder();
                model.OrderID        = IdGenerator.Instance.GetId();
                model.CardId         = card.CardID;
                model.PKID           = card.PKID;
                model.PKName         = card.PKName;
                model.EntranceTime   = card.EndDate;
                model.ExitTime       = afterdate;
                model.MonthNum       = month;
                model.Amount         = (decimal)paymoney;
                model.Status         = OnlineOrderStatus.WaitPay;
                model.PaymentChannel = PaymentChannel.WeiXinPay;
                model.Payer          = WeiXinUser.OpenID;
                model.PayAccount     = WeiXinUser.OpenID;
                model.OrderTime      = DateTime.Now;
                model.PayeeChannel   = paytype;
                model.AccountID      = WeiXinUser.AccountID;
                model.OrderType      = OnlineOrderType.MonthCardRecharge;
                model.PlateNo        = card.PlateNumber;
                model.PayeeUser      = config.SystemName;
                model.PayeeAccount   = config.PartnerId;
                model.CompanyID      = config.CompanyID;
                bool result = OnlineOrderServices.Create(model);
                if (!result)
                {
                    throw new MyException("续期失败[保存订单失败]");
                }

                Response.Cookies.Add(new HttpCookie("SmartSystem_MonthCardPayment_Month", string.Format("{0},{1}", month, (int)paytype)));

                switch (model.PaymentChannel)
                {
                case PaymentChannel.WeiXinPay:
                {
                    return(RedirectToAction("MonthCardPayment", "WeiXinPayment", new { orderId = model.OrderID }));
                }

                default: throw new MyException("支付方式错误");
                }
            }
            catch (MyException ex)
            {
                return(PageAlert("MonthCardRenewal", "CardRenewal", new { cardId = cardId, RemindUserContent = ex.Message }));
            }
            catch (Exception ex)
            {
                ExceptionsServices.AddExceptionToDbAndTxt("WeiXinWeb", string.Format("获取续费信息失败,编号:" + cardId), ex, LogFrom.WeiXin);
                return(PageAlert("MonthCardRenewal", "CardRenewal", new { cardId = cardId, RemindUserContent = "提交支付失败" }));
            }
        }
Exemplo n.º 12
0
        public ActionResult SubmitMonthRenewals(string cardId, int month, double paymoney, PaymentChannel paytype, DateTime afterdate, string plateno, int source)
        {
            try
            {
                List <ParkUserCarInfo> carInfos = new List <ParkUserCarInfo>();
                if (source == 1)
                {
                    carInfos = RechargeService.GetMonthCarInfoByPlateNumber(plateno);
                }
                else
                {
                    if (UserAccount != null)
                    {
                        carInfos = RechargeService.GetMonthCarInfoByAccountID(UserAccount.AccountID);
                    }
                }
                ParkUserCarInfo card = carInfos.FirstOrDefault(p => p.CardID == cardId);
                if (card == null)
                {
                    throw new MyException("获月卡信息失败");
                }
                CheckMonthCardOrder(card, month, paymoney, paytype, afterdate);

                BaseCompany company = CompanyServices.QueryByParkingId(card.PKID);
                if (company == null)
                {
                    throw new MyException("获取单位信息失败");
                }

                OnlineOrder model = new OnlineOrder();
                if (paytype == PaymentChannel.AliPay)
                {
                    AliPayApiConfig config = AliPayApiConfigServices.QueryAliPayConfig(company.CPID);
                    if (config == null)
                    {
                        ExceptionsServices.AddExceptionToDbAndTxt("H5CardRenewalError", "获取支付宝配置信息失败[0001]", "单位编号:" + company.CPID, LogFrom.WeiXin);
                        return(RedirectToAction("Index", "ErrorPrompt", new { message = "获取支付宝配置信息失败!" }));
                    }
                    if (!config.Status)
                    {
                        ExceptionsServices.AddExceptionToDbAndTxt("H5CardRenewalError", "该支付宝暂停使用", "单位编号:" + config.CompanyID, LogFrom.WeiXin);
                        return(RedirectToAction("Index", "ErrorPrompt", new { message = "该车场暂停使用支付宝支付!" }));
                    }
                    AliPayApiConfig requestConfig = AliPayApiConfigServices.QueryAliPayConfig(GetRequestCompanyId);
                    if (requestConfig == null)
                    {
                        throw new MyException("获取请求单位微信配置失败");
                    }

                    if (config.CompanyID != requestConfig.CompanyID)
                    {
                        ExceptionsServices.AddExceptionToDbAndTxt("H5CardRenewalError", "支付的支付宝配置和请求的支付配置不匹配,不能支付", string.Format("支付单位:{0},请求单位:{1}", config.CompanyID, requestConfig.CompanyID), LogFrom.WeiXin);
                        return(RedirectToAction("Index", "ErrorPrompt", new { message = "支付的支付宝配置和请求的支付配置不匹配,不能支付!" }));
                    }
                    model.PayeeUser      = config.SystemName;
                    model.PayeeAccount   = config.PayeeAccount;
                    model.PayeeChannel   = PaymentChannel.AliPay;
                    model.PaymentChannel = PaymentChannel.AliPay;
                    model.CompanyID      = config.CompanyID;
                }
                else
                {
                    WX_ApiConfig config = WXApiConfigServices.QueryWXApiConfig(company.CPID);
                    if (config == null)
                    {
                        ExceptionsServices.AddExceptionToDbAndTxt("H5CardRenewalError", "获取微信配置信息失败", "单位编号:" + company.CPID, LogFrom.WeiXin);
                        return(RedirectToAction("Index", "ErrorPrompt", new { message = "获取微信配置信息失败!" }));
                    }
                    if (!config.Status)
                    {
                        ExceptionsServices.AddExceptionToDbAndTxt("H5CardRenewalError", "该车场暂停使用微信支付", "单位编号:" + company.CPID, LogFrom.WeiXin);
                        return(RedirectToAction("Index", "ErrorPrompt", new { message = "该车场暂停使用微信支付!" }));
                    }
                    WX_ApiConfig requestConfig = WXApiConfigServices.QueryWXApiConfig(GetRequestCompanyId);
                    if (requestConfig == null)
                    {
                        throw new MyException("获取请求单位微信配置失败");
                    }

                    if (config.CompanyID != requestConfig.CompanyID)
                    {
                        ExceptionsServices.AddExceptionToDbAndTxt("H5CardRenewalError", "微信支付配置和当前请求微信支付配置不匹配,不能支付", string.Format("支付单位:{0},请求单位:{1}", config.CompanyID, requestConfig.CompanyID), LogFrom.WeiXin);
                        return(RedirectToAction("Index", "ErrorPrompt", new { message = "微信支付配置和当前请求微信支付配置不匹配,不能支付!" }));
                    }
                    model.PayeeUser      = config.SystemName;
                    model.PayeeAccount   = config.PartnerId;
                    model.PayeeChannel   = PaymentChannel.WeiXinPay;
                    model.PaymentChannel = PaymentChannel.WeiXinPay;
                    model.CompanyID      = config.CompanyID;
                }

                model.OrderID      = IdGenerator.Instance.GetId();
                model.CardId       = card.CardID;
                model.PKID         = card.PKID;
                model.PKName       = card.PKName;
                model.EntranceTime = card.EndDate;
                model.ExitTime     = afterdate;
                model.MonthNum     = month;
                model.Amount       = (decimal)paymoney;
                model.Status       = OnlineOrderStatus.WaitPay;

                model.OrderTime = DateTime.Now;
                model.AccountID = LoginAccountID;
                model.OrderType = OnlineOrderType.MonthCardRecharge;
                model.PlateNo   = card.PlateNumber;

                bool result = OnlineOrderServices.Create(model);
                if (!result)
                {
                    throw new MyException("续期失败[保存订单失败]");
                }

                Response.Cookies.Add(new HttpCookie("SmartSystem_MonthCardPayment_Month", string.Format("{0},{1}", month, (int)paytype)));

                switch (model.PaymentChannel)
                {
                case PaymentChannel.WeiXinPay:
                {
                    return(RedirectToAction("MonthCardPayment", "H5WeiXinPayment", new { orderId = model.OrderID }));
                }

                case PaymentChannel.AliPay:
                {
                    return(RedirectToAction("AliPayRequest", "H5Order", new { orderId = model.OrderID, requestSource = 2 }));
                }

                default: throw new MyException("支付方式错误");
                }
            }
            catch (MyException ex)
            {
                return(PageAlert("MonthCardRenewal", "H5CardRenewal", new { cardId = cardId, RemindUserContent = ex.Message }));
            }
            catch (Exception ex)
            {
                ExceptionsServices.AddExceptionToDbAndTxt("H5CardRenewalError", string.Format("获取续费信息失败,编号:" + cardId), ex, LogFrom.WeiXin);
                return(PageAlert("MonthCardRenewal", "CardRenewal", new { cardId = cardId, RemindUserContent = "提交支付失败" }));
            }
        }
Exemplo n.º 13
0
        public string Pay()
        {
            string sTag = Request["paytype"];
            //string sBody = Request["body"];
            string sAmount      = Request["fee"];
            string sPayAccount  = Request["auth_code"];
            string sPlateNumber = Request["PlateNumber"];
            string sPKID        = Request["PKID"];

            if (sTag.IsEmpty() || (sTag != "0" && sTag != "1" && sTag != "2"))
            {
                return("2");
            }

            //if (string.IsNullOrEmpty(sBody))
            //{
            //    return "2sBody";
            //}
            if (string.IsNullOrEmpty(sAmount))
            {
                return("2");
            }

            if (sTag != "2")
            {
                if (string.IsNullOrEmpty(sPayAccount))
                {
                    return("2");
                }
            }
            if (string.IsNullOrEmpty(sPlateNumber))
            {
                return("2");
            }
            if (string.IsNullOrEmpty(sPKID))
            {
                return("2");
            }

            OnlineOrder model = new OnlineOrder();

            model.OrderTime = DateTime.Now;

            TempParkingFeeResult result = RechargeService.WXTempParkingFee(sPlateNumber, sPKID, sPayAccount, model.OrderTime);

            if (result.Result == APPResult.NoNeedPay)
            {
                return("3"); //不需要交费
            }
            if (result.Result == APPResult.RepeatPay)
            {
                return("4"); //重复交费
            }

            decimal dAmount = decimal.Parse(sAmount) / 100;

            //if (result.Pkorder.Amount != dAmount)
            //{
            //    return "6"; //金额不一致
            //}
            try
            {
                RechargeService.CheckCalculatingTempCost(result.Result);
            }
            catch (Exception ex)
            {
                return(((int)result.Result).ToString());
            }

            if (result.OrderSource == PayOrderSource.Platform)
            {
                bool testResult = CarService.WXTestClientProxyConnectionByPKID(result.ParkingID);
                if (!testResult)
                {
                    throw new MyException("车场网络异常,暂无法缴停车费!");
                }
                //int interfaceOrderState = InterfaceOrderServices.OrderWhetherEffective(result.Pkorder.OrderNo);

                int interfaceOrderState = InterfaceOrderServices.OrderWhetherEffective(result.Pkorder.OrderNo, result.ParkingID, result.Pkorder.TagID);
                if (interfaceOrderState != 1)
                {
                    if (interfaceOrderState == 2)
                    {
                        return("4"); //重复交费
                    }
                    else
                    {
                        return("5"); //订单已失效
                    }
                }
            }

            model.ParkCardNo   = result.CardNo;
            model.PKID         = result.ParkingID;
            model.PKName       = result.ParkName;
            model.InOutID      = result.Pkorder.TagID;
            model.PlateNo      = result.PlateNumber;
            model.EntranceTime = result.EntranceDate;
            model.ExitTime     = model.OrderTime.AddMinutes(result.OutTime);
            //model.Amount = result.Pkorder.Amount;
            model.Amount         = dAmount;
            model.PayDetailID    = result.Pkorder.OrderNo;
            model.DiscountAmount = result.Pkorder.DiscountAmount;
            // model.OrderSource = PayOrderSource.HAND;
            model.ExternalPKID = result.ExternalPKID;

            model.OrderID   = IdGenerator.Instance.GetId();
            model.Status    = OnlineOrderStatus.WaitPay;
            model.OrderType = OnlineOrderType.ParkFee;

            BaseCompany company = CompanyServices.QueryByParkingId(model.PKID);

            if (company == null)
            {
                throw new MyException("获取单位信息失败");
            }

            if (sTag == "0")
            {
                WX_ApiConfig config = WXApiConfigServices.QueryWXApiConfig(company.CPID);
                if (config == null)
                {
                    ExceptionsServices.AddExceptionToDbAndTxt("WeiXinPageError", "获取微信配置信息失败", "单位编号:" + company.CPID, LogFrom.WeiXin);
                    return("-1");
                }
                if (!config.Status)
                {
                    ExceptionsServices.AddExceptionToDbAndTxt("WeiXinPageError", "该车场暂停使用微信支付", "单位编号:" + company.CPID, LogFrom.WeiXin);
                    return("-1");
                }

                model.PayeeUser      = config.SystemName;
                model.PayeeAccount   = config.PartnerId;
                model.PayAccount     = sPayAccount;
                model.Payer          = sPayAccount;
                model.AccountID      = model.AccountID;
                model.CardId         = model.AccountID;
                model.PayeeChannel   = PaymentChannel.WeiXinPay;
                model.PaymentChannel = PaymentChannel.WeiXinPay;
                model.CompanyID      = config.CompanyID;

                bool isSuc = OnlineOrderServices.Create(model);
                if (!isSuc)
                {
                    throw new MyException("生成待缴费订单失败");
                }
            }
            else if (sTag == "1")
            {
                //支付宝
                AliPayApiConfig config = AliPayApiConfigServices.QueryAliPayConfig(company.CPID);
                if (config == null)
                {
                    ExceptionsServices.AddExceptionToDbAndTxt("WeiXinPageError", "获取支付宝配置信息失败[0001]", "单位编号:" + company.CPID, LogFrom.WeiXin);
                    return("-1");
                }
                if (!config.Status)
                {
                    ExceptionsServices.AddExceptionToDbAndTxt("WeiXinPageError", "该支付宝暂停使用", "单位编号:" + config.CompanyID, LogFrom.WeiXin);
                    return("-1");
                }

                model.AccountID      = string.Empty;
                model.CardId         = string.Empty;
                model.PayeeChannel   = PaymentChannel.AliPay;
                model.PaymentChannel = PaymentChannel.AliPay;
                model.PayeeUser      = config.SystemName;
                model.PayeeAccount   = config.PayeeAccount;
                model.Payer          = sPayAccount;
                model.PayAccount     = sPayAccount;
                model.CompanyID      = config.CompanyID;

                bool isSuc = OnlineOrderServices.Create(model);
                if (!isSuc)
                {
                    throw new MyException("生成待缴费订单失败");
                }
            }
            else if (sTag == "2")
            {
                //现金支付的
                model.AccountID  = string.Empty;
                model.CardId     = string.Empty;
                model.Payer      = sPayAccount;
                model.PayAccount = sPayAccount;
                model.CompanyID  = company.CPID;
            }

            //调用刷卡支付,如果内部出现异常则在页面上显示异常原因
            try
            {
                //int status=1;

                string tradeNo   = "";
                string sDataInfo = "";
                if (sTag == "0")    //微信
                {
                    if (!MicroPay.Run(model, out sDataInfo))
                    {
                        return("-2");
                    }
                    else
                    {
                        tradeNo = sDataInfo;
                        //发送通知开闸
                        bool isPayState = OnlineOrderServices.PaySuccess(model.OrderID, tradeNo, DateTime.Now, sPayAccount);
                        if (!isPayState)
                        {
                            throw new Exception("修改微信订单状态失败");
                        }

                        TxtLogServices.WriteTxtLogEx("WXPayReturn", string.Format("WXPayResult:{0}支付完成", tradeNo));
                    }
                }
                else if (sTag == "1")   //支付宝
                {
                    if (AliPayPay.Run(model, out sDataInfo) == false)
                    {
                        return("-3");
                    }
                    else
                    {
                        tradeNo = sDataInfo;

                        bool isPayState = OnlineOrderServices.PaySuccess(model.OrderID, tradeNo, DateTime.Now, sPayAccount);
                        if (!isPayState)
                        {
                            throw new Exception("修改支付宝订单状态失败");
                        }

                        TxtLogServices.WriteTxtLogEx("AliPayReturn", string.Format("AliPayShowResult:{0}支付完成", tradeNo));
                    }
                }
                else if (sTag == "2") //现金支付的
                {
                    TempStopPaymentResult payResult = RechargeService.WXTempStopPayment(result.Pkorder.OrderNo, (int)OrderPayWay.Cash, dAmount, sPKID, "", model.OrderID.ToString(), DateTime.Now);
                    TxtLogServices.WriteTxtLogEx("CashReturn", string.Format("CashShowResult:{1}:{0} 支付完成", payResult.ToXml(System.Text.Encoding.UTF8), dAmount));
                    if (payResult.Result != APPResult.Normal)
                    {
                        return("5");
                    }
                }

                //不是预支付的订单 就暂时不修改了
                //bool results = OnlineOrderServices.UpdatePrepayIdById(tradeNo, model.OrderID);
                //Response.Write("<span style='color:#00CD00;font-size:20px'>" + result + "</span>");
                ParkingFeeService.DeleteParkingFee(model.PlateNo + model.PKID);
                return("0");
            }
            //catch (WxPayException ex)
            //{
            //    return "1";
            //    //Response.Write("<span style='color:#FF0000;font-size:20px'>" + ex.ToString() + "</span>");
            //}
            catch (Exception ex)
            {
                ExceptionsServices.AddExceptionToDbAndTxt("PayError", "该支付失败", "单位编号:" + model.CompanyID + "<br/>" + ex.StackTrace, LogFrom.UnKnown);
                return("-4");
                //Response.Write("<span style='color:#FF0000;font-size:20px'>" + ex.ToString() + "</span>");
            }
        }
Exemplo n.º 14
0
        /// <summary>
        /// 计算停车费
        /// </summary>
        /// <returns></returns>
        ///
        public ActionResult ComputeParkingFee(string licensePlate, string parkingId)
        {
            string htmlurl = string.Empty;

            licensePlate = licensePlate.ToPlateNo();
            if (!string.IsNullOrWhiteSpace(licensePlate) && licensePlate.Length > 2)
            {
                string firstPlate = HttpUtility.UrlEncode(licensePlate.Substring(0, 2), Encoding.GetEncoding("UTF-8"));
                Response.Cookies.Add(new HttpCookie("SmartSystem_WeiXinUser_DefaultPlate", firstPlate));
                //licensePlate = "浙B81X83";
                //string errMsg = "";
                ////string aa = string.Empty;
                ////aa=WXotherServices.GETURL(licensePlate).ToString();
                //ParkIORecord record =  ParkIORecordServices.GetNoExitIORecordByPlateNumber(parkingId, licensePlate, out errMsg);

                //if (record != null && record.EntranceImage.IsEmpty() == false)
                //{
                //    htmlurl = "http://www.yft166.net/Pic/" + record.EntranceImage;
                //}
                //else {
                //    htmlurl = "/Content/mobile/images/images.png";
                //}
                //
                //ViewBag.meas = parkingId;
            }


            bool IsShowPlateNumber = true;

            try
            {
                OnlineOrder model = new OnlineOrder();
                model.OrderTime = DateTime.Now;

                List <WX_CarInfo> myPlates = CarService.GetCarInfoByAccountID(WeiXinUser.AccountID);
                if (myPlates.Count(p => p.PlateNo.ToPlateNo() == licensePlate) == 0)
                {
                    IsShowPlateNumber = false;
                }
                TempParkingFeeResult result = RechargeService.WXTempParkingFee(licensePlate, parkingId, WeiXinUser.AccountID, model.OrderTime);
                if (result.Result == APPResult.NoNeedPay || result.Result == APPResult.RepeatPay)
                {
                    int type = result.Result == APPResult.NoNeedPay ? 0 : 1;
                    return(RedirectToAction("NotNeedPayment", "ParkingPayment", new { licensePlate = licensePlate, type = type, surplusMinutes = result.OutTime, entranceTime = result.EntranceDate }));
                }
                RechargeService.CheckCalculatingTempCost(result.Result);
                if (result.OrderSource == PayOrderSource.Platform)
                {
                    bool testResult = CarService.WXTestClientProxyConnectionByPKID(result.ParkingID);
                    if (!testResult)
                    {
                        throw new MyException("车场网络异常,暂无法缴停车费!");
                    }
                    //int interfaceOrderState = InterfaceOrderServices.OrderWhetherEffective(result.Pkorder.OrderNo);

                    int interfaceOrderState = InterfaceOrderServices.OrderWhetherEffective(result.Pkorder.OrderNo, result.ParkingID, result.Pkorder.TagID);
                    if (interfaceOrderState != 1)
                    {
                        string msg = interfaceOrderState == 2 ? "重复支付" : "订单已失效";
                        return(PageAlert("LicensePlatePayment", "ParkingPayment", new { RemindUserContent = msg }));
                    }
                }
                model.ParkCardNo     = result.CardNo;
                model.PKID           = result.ParkingID;
                model.PKName         = result.ParkName;
                model.InOutID        = result.Pkorder.TagID;
                model.TagID          = result.Pkorder.TagID;
                model.PlateNo        = result.PlateNumber;
                model.EntranceTime   = result.EntranceDate;
                model.ExitTime       = model.OrderTime.AddMinutes(result.OutTime);
                model.Amount         = result.Pkorder.Amount;
                model.PayDetailID    = result.Pkorder.OrderNo;
                model.DiscountAmount = result.Pkorder.DiscountAmount;
                model.OrderSource    = result.OrderSource;
                model.ExternalPKID   = result.ExternalPKID;

                ParkIORecord record = ParkIORecordServices.QueryLastExitIORecordByPlateNumber(licensePlate);

                if (record != null && record.EntranceImage.IsEmpty() == false)
                {
                    htmlurl = "http://www.yft166.net/Pic/" + record.EntranceImage.Replace('\\', '/');
                }
                else
                {
                    htmlurl = "/Content/mobile/images/images.png";
                }

                ViewBag.url = htmlurl;

                ViewBag.Result            = result.Result;
                ViewBag.PayAmount         = result.Pkorder.PayAmount;
                ViewBag.IsShowPlateNumber = IsShowPlateNumber;
                return(View(model));
            }
            catch (MyException ex)
            {
                return(PageAlert("LicensePlatePayment", "ParkingPayment", new { RemindUserContent = ex.Message }));
            }
            catch (Exception ex)
            {
                ExceptionsServices.AddExceptionToDbAndTxt("WeiXinPageError", "计算缴费金额失败", ex, LogFrom.WeiXin);
                return(PageAlert("LicensePlatePayment", "ParkingPayment", new { RemindUserContent = "计算缴费金额失败" }));
            }
        }
Exemplo n.º 15
0
 public RechargeController()
 {
     serviceRecharge = new RechargeService(db);
 }