private void orderInfo(ref WaterOrderInfo orderinfo, PayParam p) { WaterOrderParam param = new WaterOrderParam(); param.paymentno = info.msgrsp.orderlist[0].custNo; param.billdate = info.msgrsp.orderlist[0].billDate; param.paymentamout = info.msgrsp.orderlist[0].amout; param.shopType = PayAccess.isWtLkl(p.icParams); log.Write("发起订单:用户编号:" + param.paymentno + ",账单金额:" + param.paymentamout); orderinfo = WaterAccess.WaterOrder(param); if ("9999".Equals(orderinfo.msgrsp.retcode)) { return; } if ("1234".Equals(orderinfo.msgrsp.retcode)) { return; } if (!"0000".Equals(orderinfo.msgrsp.retcode)) { return; } //获取商户号 p.MERCHANTNO_shopNo = orderinfo.msgrsp.MERCHANTNO; //获取终端号 p.TERMINALNO_clientNo = orderinfo.msgrsp.TERMINALNO; //订单实际支付金额 p.rechageAmount = Convert.ToDouble(orderinfo.msgrsp.realAmout).ToString(); //交易订单号 p.orderNo = orderinfo.msgrsp.orderNo; Payment.waterPayParam.OrderInfo = orderinfo; log.Write("订单提交成功:云平台订单号:" + orderinfo.msgrsp.orderNo); }
/// <summary> /// 水务缴费 /// </summary> /// <param name="waterOrderParam"></param> /// <returns></returns> public static WaterOrderInfo WaterOrder(WaterOrderParam waterOrderParam) { WaterInterface access = new WaterInterface(); WaterOrderParam param = new WaterOrderParam(); WaterOrderInfo info = null; param.authcode = SysBLL.Authcode; // 认证码 not null param.servicename = "SW002"; //交易号 not null param.trandateTime = SysBLL.getYYYYMMDDHHMMSSTime(); //交易时间 格式:YYYYMMDDHHMMSS param.reqsn = SysBLL.getSerialNum(); //请求流水号 not null【请求发起方流水号】 param.paymentno = waterOrderParam.paymentno; //缴费户号 not null【水务用户编号】 param.billdate = waterOrderParam.billdate; //账单日期 not null 【根据查询产生的账单日期】 param.paymentamout = waterOrderParam.paymentamout; //账单金额 not null【根据查询产生的账单金额】 param.loginId = SysBLL.getCpuNo(); //交互终端的设备编号(用于自助终端) not null param.shopType = waterOrderParam.shopType; info = access.WaterOrder(param); return(info); }
/// <summary> /// 水务提交订单接口 /// </summary> /// <param name="param"></param> /// <returns></returns> public WaterOrderInfo WaterOrder(WaterOrderParam param) { WaterOrderInfo waterOrderInfo = null; Dictionary <String, String> parameters = new Dictionary <String, String>(); parameters.Add("authcode", param.authcode); parameters.Add("servicename", param.servicename); parameters.Add("trandateTime", param.trandateTime); parameters.Add("reqsn", param.reqsn); parameters.Add("paymentno", param.paymentno); parameters.Add("billdate", param.billdate); parameters.Add("paymentamout", param.paymentamout); parameters.Add("loginId", param.loginId); parameters.Add("shopType", param.shopType); parameters.Add("terminalNo", ConfigurationManager.AppSettings["MechineNo"]); string jsonText = HttpHelper.getHttp(SysConfigHelper.readerNode("getOrderWater"), parameters, null); //反序列化JSON字符串,将JSON字符串转换成LIST列表 waterOrderInfo = JsonConvert.DeserializeObject <WaterOrderInfo>(jsonText); return(waterOrderInfo); }
private void pay() { log.Write("--------------------交易开始--------------------"); log.Write("----------缴费类型:水务"); PayAccess payAccess = new PayAccess(); PayParam p = new PayParam(); Pay pay = new Pay(); //订单结果 WaterOrderInfo orderinfo = null; //初始化参数 payAccess.InitPayParam(ref p); PayBLL.payCode_terminalNo(ref p); try { //获取订单 orderInfo(ref orderinfo, p); //获取订单结果处理 if (pay.orderInfoResult(orderinfo.msgrsp.retcode, orderinfo.msgrsp.retshow) == false) { return; } //支付 if (pay.payResult(ref p)) { log.Write("--------------------交易结束--------------------"); Util.JumpUtil.jumpCommonPage("FormWaterStep06_success"); } return; } catch (Exception ex6) { log.Write("交易异常:" + ex6.Message); exit("缴费失败,请重新缴费,或退卡"); return; } }