static public string BS30600016(BS30600016 b, string nodeNo, string trandType, ref XmlDocument xml) { head s = new head(); if (trandType == "ET0131") { s.ServiceNo = "P0720002"; s.SceneNo = "01"; s.TradeCode = "WYPJ30600016"; } else if (trandType == "ET0141") { s.ServiceNo = "P0720002"; s.SceneNo = "02"; s.TradeCode = "WYPJ30600026"; } else if (trandType == "ET0111") { s.ServiceNo = "P0720002"; s.SceneNo = "03"; s.TradeCode = "WYPJ30600006"; } XmlHelper xhs = setHead(s); string send = ""; xhs.setBody("applicantAcctNo", b.ApplicantAcctNo); xhs.setBody("billId", b.BillId); xhs.setBody("signature", b.Signature); xhs.setBody("reserve1", b.Reserve1); send = xhs.GetXmlDoc().OuterXml.Length.ToString().PadLeft(8, '0') + xhs.GetXmlDoc().OuterXml; bool jg = tcp.SLSendData(send, nodeNo, trandType, ref xml); return(jg.ToString()); }
static public string BS30600123(BS30600123 b, string nodeNo, string trandType, ref XmlDocument xml) { head s = new head(); s.ServiceNo = "P0720002"; s.SceneNo = "09"; s.TradeCode = "WYPJ30600123"; XmlHelper xhs = setHead(s); string send = ""; xhs.setBody("applicantAcctNo", b.ApplicantAcctNo); xhs.setBody("billId", b.BillId); xhs.setBody("signUpMark", b.SignUpMark); xhs.setBody("signature", b.Signature); xhs.setBody("transNo", b.TransNo); xhs.setBody("reserve1", b.Reserve1); xhs.setBody("remark1", b.Remark1); xhs.setBody("remark2", b.Remark2); send = xhs.GetXmlDoc().OuterXml.Length.ToString().PadLeft(8, '0') + xhs.GetXmlDoc().OuterXml; XmlDocument recv = new XmlDocument(); bool jg = tcp.SLSendData(send, nodeNo, trandType, ref xml); return(jg.ToString()); }
static public string BS30600107(BS30600107 b, string nodeNo, string trandType, ref XmlDocument xml) { head s = new head(); s.ServiceNo = "P0730001"; s.SceneNo = "17"; s.TradeCode = "WYPJ30600107"; XmlHelper xhs = setHead(s); string send = ""; xhs.setBody("applicantAcctNo", b.ApplicantAcctNo); xhs.setBody("transNo", b.TransNo); xhs.setBody("remitter", b.Remitter); xhs.setBody("payee", b.Payee); xhs.setBody("draweeBankName", b.DraweeBankName); xhs.setBody("billNo", b.BillNo); xhs.setBody("maxAcptDt", b.MaxAcptDt); xhs.setBody("minAcptDt", b.MinAcptDt); xhs.setBody("maxDueDt", b.MaxDueDt); xhs.setBody("minDueDt", b.MinDueDt); xhs.setBody("maxBillMoney", b.MaxBillMoney); xhs.setBody("minBillMoney", b.MinBillMoney); xhs.setBody("reserve1", b.Reserve1); xhs.setBody("pageSize", b.PageSize); xhs.setBody("currentPage", b.CurrentPage); send = xhs.GetXmlDoc().OuterXml.Length.ToString().PadLeft(8, '0') + xhs.GetXmlDoc().OuterXml; XmlDocument recv = new XmlDocument(); bool jg = tcp.SLSendData(send, nodeNo, trandType, ref xml); return(jg.ToString()); }
static public string BS30600004(BS30600004 b, string nodeNo, string trandType, ref XmlDocument xml) { head s = new head(); if (trandType == "ET0102") { s.TradeCode = "WYPJ30600003"; s.ServiceNo = "P0720001"; s.SceneNo = "01"; } else if (trandType == "ET0103") { s.TradeCode = "WYPJ30600004"; s.ServiceNo = "P0720001"; s.SceneNo = "02"; } XmlHelper xhs = setHead(s); string send = ""; xhs.setBody("applicantAcctNo", b.ApplicantAcctNo); xhs.setBody("billType", b.BillType); xhs.setBody("billClass", b.BillClass); xhs.setBody("acptDt", b.AcptDt); xhs.setBody("dueDt", b.DueDt); xhs.setBody("billMoney", b.BillMoney); xhs.setBody("remitter", b.Remitter); xhs.setBody("remitterAcctNo", b.RemitterAcctNo); xhs.setBody("remitterBankName", b.RemitterBankName); xhs.setBody("remitterBankNo", b.RemitterBankNo); xhs.setBody("payee", b.Payee); xhs.setBody("payeeAcctNo", b.PayeeAcctNo); xhs.setBody("payeeBankName", b.PayeeBankName); xhs.setBody("payeeBankNo", b.PayeeBankNo); xhs.setBody("acceptor", b.Acceptor); xhs.setBody("acceptorAcctNo", b.AcceptorAcctNo); xhs.setBody("acceptorBankName", b.AcceptorBankName); xhs.setBody("acceptorBankNo", b.AcceptorBankNo); xhs.setBody("forbidFlag", b.ForbidFlag); xhs.setBody("conferNo", b.ConferNo); xhs.setBody("invoiceNo", b.InvoiceNo); xhs.setBody("reserve1", ""); if (trandType == "ET0103") { xhs.setBody("billId", b.BillId); } else { xhs.setBody("origin", b.Origin); } send = xhs.GetXmlDoc().OuterXml.Length.ToString().PadLeft(8, '0') + xhs.GetXmlDoc().OuterXml; XmlDocument recv = new XmlDocument(); bool jg = tcp.SLSendData(send, nodeNo, trandType, ref xml); return(jg.ToString()); }
private string retCatch(Exception ex) { LogWrite.WriteLog(ex.Message, "交易处理失败(" + trandType + "),原因:", nodeNo); retSysError(errMsg); return(DocToStr(xher.GetXmlDoc())); }
/// <summary> /// 解密 /// </summary> /// <param name="zhdh"></param> /// <param name="pinBlock"></param> /// <param name="nodeNo"></param> /// <returns></returns> public static string Decrypt(string zhdh, string pinBlock, string nodeNo) { string s = "error"; try { XmlHelper xher = setCommPara("E141", nodeNo); xher.UpdateContent(@"/union/body/pinBlock", pinBlock); xher.UpdateContent(@"/union/body/accNo", zhdh); string send = xher.GetXmlDoc().OuterXml; string recv = SendData(send, nodeNo); if (recv.IndexOf("error") != 0) { XmlHelper xher1 = new XmlHelper(recv); if (xher1.ReadByNode(@"/union/head/responseCode") == "000000") { s = xher1.ReadByNode(@"/union/body/plainPin"); } } } catch (Exception e) { LogWrite.WriteLog("账号:[" + zhdh + "],原因:[" + e.Message + "]", "调用加密机【解密】失败", nodeNo); } return(s); }
private string formatRetStr(XmlHelper xh) { return(DocToStr(xh.GetXmlDoc())); }