private bool WXPaidAfter(wy_wx_pay Order) { //根据订单ID try { _log.LogInformation($"支付成功,更新类型:{CommonFiled.FeeTypeName(Order.FEE_TYPES)}"); //更新缴费记录表,如果为自主缴费记录,支付成功后,重新生成新数据 //如果类型为物业费 // recoreId 不为空,证明为提醒订单,需要修改record表中的数据 if (Order != null && (!string.IsNullOrEmpty(Order.RECORD_ID)) && Order.RECORD_ID != SelfPayOrder) { return(PropertyCost(Order)); } //如果类型为水费, if (CommonFiled.EnumFeeTypes(Order.FEE_TYPES) == FeeTypes.Water) { return(WaterCost(Order)); } //如果类型为电费 if (CommonFiled.EnumFeeTypes(Order.FEE_TYPES) == FeeTypes.Electricity) { return(ElectricityCost(Order)); } return(true); } catch (Exception ex) { _log.LogError(ex, "微信支付成功后逻辑处理错误:[OrderID]:" + Order.ORDER_ID); return(false); } }
public ActionResult Order(string r, string f, string u) { if (string.IsNullOrEmpty(r) || string.IsNullOrEmpty(f) || string.IsNullOrEmpty(u)) { return(Error("请求参数错误!")); } dynamic DetailInfo = this._order.GetPayDetails(u, f, r).FirstOrDefault(); if (null == DetailInfo) { return(Error("未找到订单信息!")); } int type = Convert.ToInt32(DetailInfo.JFLX); if (PropertyCosts() && CommonFiled.EnumFeeTypes(type) != FeeTypes.Property) { return(Redirect("../MyShop/Payment?back=0")); } DetailInfo.JFLXName = Fee.GetKey(Convert.ToInt32(DetailInfo.JFLX)); ViewBag.Payee = CommonFiled.MchName(Convert.ToInt32(DetailInfo.JFLX)); return(View(DetailInfo)); }
private bool PropertyCost(wy_wx_pay Order) { _log.LogInformation($"【wy_pay_record】准备更新:{Order.RECORD_ID}"); FeeTypes type = CommonFiled.EnumFeeTypes(Order.FEE_TYPES); var Res = this._order.UpdateRecoredJFZT(new wy_pay_record() { RECORD_ID = Order.RECORD_ID, JFZT = 1, JFRQ = Order.PAY_TIME, PAY_WAY = 1, JFJE = (Order.TOTAL_FEE / 100.00) }); if (Res > 0) { _log.LogInformation($"【wy_pay_record】更新成功:{Order.RECORD_ID}"); } else { _log.LogError($"【wy_pay_record】更新失败:{Order.RECORD_ID},订单:{Order.ID}"); return(false); } return(true); }