/// <summary> /// 修改原订单支付方式 /// </summary> /// <param name="oid"></param> /// <param name="paymode"></param> /// <returns></returns> private bool UpdateCode(int oid, int paymode) { bool Success = false; JMP.BLL.jmp_order bll = new JMP.BLL.jmp_order(); if (bll.UpdatePayMode(oid, paymode)) { Success = true; } return(Success); }
/// <summary> /// 根据订单编号查询订单信息并调取支付当时 /// </summary> /// <param name="od">参数实体</param> /// <returns></returns> public static string SelectCode(OrderCode od, string json) { string StrJson = "{\"message\":\"参数code有误\",\"result\":8997}"; try { JMP.MDL.jmp_order mode = new JMP.MDL.jmp_order(); JMP.BLL.jmp_order bll = new JMP.BLL.jmp_order(); mode = bll.GetModelbycode(od.code, "jmp_order"); if (mode != null && mode.o_state == 0) { if (mode.o_price == od.price) { if (bll.UpdatePayMode(mode.o_id, od.paymode)) { StrJson = PayType.PaySelect(od.paymode.ToString(), mode.o_app_id, od.tid, od.paytype, mode.o_code, od.goodsname, mode.o_price, mode.o_id, mode.o_privateinfo);//直接调取支付方式 } } else { StrJson = "{\"message\":\"请求金额不一致\",\"result\":8994}"; } } else { StrJson = "{\"message\":\"参数code有误\",\"result\":8997}"; } } catch (Exception e) { string bcxx = "报错提示" + e.Message + "报错对象:" + e.Source + "报错方法:" + e.TargetSite + "报错信息:" + e.ToString() + "报错位置:" + e.StackTrace.ToString(); //报错信息 StrJson = "{\"message\":\"参数异常\",\"result\":8990}"; AddLocLog.AddLog(1, 4, HttpContext.Current.Request.UserHostAddress, "收银台调取支付接口错误信息", "报错信息:" + bcxx + ",支付接口请求数据" + json); //写入报错日志 throw; } return(StrJson); }