protected override void OnSucc() { //48域 TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); PayEntity.ConfirmTraceNo = handler.GetStringValue("BF05"); if (m_process == 2) { PayEntity.PowerPayConfirmCode = handler.GetStringValue("3F2B"); PayEntity.PowerRetMsg = handler.GetStringValue("3F1B"); } //PayEntity.PowerCardData.W_EF1 = handler.GetStringValue("1F37"); //PayEntity.PowerCardData.W_EF2 = handler.GetStringValue("1F38"); //PayEntity.PowerCardData.W_EF5 = handler.GetStringValue("1F39"); //byte[] tmp = RecvPackage.GetArrayData(57); //string temp57 = PubFunc.ByteArrayToHexString(tmp, tmp.Length).Trim(); //Log.Debug(temp57); //PayEntity.PowerCardData.W_EF31 = temp57.Substring(0, 264); //PayEntity.PowerCardData.W_EF32 = temp57.Substring( 264, 268); //PayEntity.PowerCardData.W_EF41 = temp57.Substring( 532, 264); //PayEntity.PowerCardData.W_EF42 = temp57.Substring( 796, 268); //PayEntity.PowerCardData.CertDes = temp57.Substring( 1064, 16); //PayEntity.PowerCardData.LimitDes = temp57.Substring( 1080, 16); //PayEntity.PowerCardData.ExtDes = temp57.Substring( 1096, 16); }
protected override void OnSucc() { //48域 TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); ConfirmTraceNo = handler.GetStringValue("BF05"); ReceiptID = handler.GetStringValue("BF06"); }
protected override void OnSucc() { //48域 TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); PayEntity.QueryTraceNo = handler.GetStringValue("BF05"); PayEntity.EleFeeAccountNum = handler.GetStringValue("1F2B"); PayEntity.EleFeeNum = handler.GetStringValue("1F1B"); PayEntity.UserID = handler.GetStringValue("1F3B"); PayEntity.UserName = handler.GetStringValue("1F4B"); PayEntity.UserAddress = handler.GetStringValue("1F5B"); PayEntity.UserPayAmount = double.Parse(handler.GetStringValue("1F6B")) / 100; PayEntity.PayAmount = double.Parse(handler.GetStringValue("1F7B")) / 100; string info = handler.GetStringValue("1F8B"); PayEntity.UserQueryInfo = new List <UserQueryInfo>(); string[] data = info.Split(new string[] { "&;" }, StringSplitOptions.RemoveEmptyEntries); foreach (string item in data) { PayEntity.UserQueryInfo.Add(new UserQueryInfo(item)); } }
protected override void OnSucc() { //54域 CommonData.Amount = double.Parse(RecvPackage.GetString(54)) / 100; //48域 TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); QueryTraceNo = handler.GetStringValue("BF05"); QueryCount = handler.GetStringValue("BF06"); QueryContent = handler.GetStringValue("FF48"); }
protected override void OnSucc() { //48域 TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); if (_mProcess == 1) { PayEntity.ReWriteCardTraceNo1 = handler.GetStringValue("BF05"); } else if (_mProcess == 2) { PayEntity.ReWriteCardTraceNo2 = handler.GetStringValue("BF05"); PayEntity.ReWriteCardReturnMsg = handler.GetStringValue("3F1B"); PayEntity.PowerCardData.W_EF1 = handler.GetStringValue("3F2B"); PayEntity.PowerCardData.W_EF2 = handler.GetStringValue("3F3B"); PayEntity.PowerCardData.W_EF5 = handler.GetStringValue("3F4B"); if (string.IsNullOrEmpty(handler.GetStringValue("3F5B"))) { PayEntity.PowerPayCount = int.Parse(handler.GetStringValue("3F5B")); } PayEntity.ReWriteCardAmount = handler.GetStringValue("3F6B"); PayEntity.ReWriteUserAmount = handler.GetStringValue("3F7B"); } //PayEntity.ConfirmTraceNo = handler.GetStringValue("BF05"); //PayEntity.PowerCardData.W_EF2 = handler.GetStringValue("1F38"); //PayEntity.PowerCardData.W_EF5 = handler.GetStringValue("1F39"); if (_mProcess != 1) { byte[] tmp = RecvPackage.GetArrayData(57); string temp57 = Encoding.Default.GetString(tmp);// PubFunc.ByteArrayToHexString(tmp, tmp.Length).Trim(); Log.Debug(temp57); if (_mProcess == 2) { PayEntity.PowerCardData.W_EF31 = CalcuMsg(temp57.Substring(0, 130)); PayEntity.PowerCardData.W_EF32 = CalcuMsg(temp57.Substring(130, 30)); PayEntity.PowerCardData.W_EF41 = CalcuMsg(temp57.Substring(160, 130)); PayEntity.PowerCardData.W_EF42 = CalcuMsg(temp57.Substring(290, 30)); PayEntity.PowerCardData.CertDes = temp57.Substring(320, 16); PayEntity.PowerCardData.LimitDes = temp57.Substring(336, 16); PayEntity.PowerCardData.ExtDes = temp57.Substring(352, 16); } } }
protected override void OnSucc() { TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); _jdsbh = handler.GetStringValue("1F2B"); }
protected override void OnSucc() { //48域 TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); PayEntity.ConfirmTraceNo = handler.GetStringValue("3F1B"); }
protected override void OnSucc() { TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); PayEntity.InquiryInfo = handler.GetStringValue("1F2B"); }
protected override void OnHostFail(string returnCode, string returnMessage) { base.OnHostFail(returnCode, returnMessage); //48域 TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); ReturnMessage = handler.GetStringValue("1FAB"); }
protected override void OnHostFail(string returnCode, string returnMessage) { base.OnHostFail(returnCode, returnMessage); try { TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); ReturnMessage = handler.GetStringValue("FF52"); if (ReturnCode == "TH") { ReturnMessage = handler.GetStringValue("1F1B"); } } catch (Exception ex) { Log.Debug("Query HostFail" + ex.Message); } }
protected override void OnSucc() { //48域 TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); if (_currentIndex == 1) { PayEntity.CheckTraceNo = handler.GetStringValue("BF05"); PayEntity.CheckReturnMsg = handler.GetStringValue("1F1B"); PayEntity.CheckRechargeAmount = handler.GetStringValue("1F2B"); PayEntity.CheckRemuneration = handler.GetStringValue("1F3B"); PayEntity.CheckOrderStatus = handler.GetStringValue("1F4B"); //PayEntity.PowerCardData.EF1 = handler.GetStringValue("3F5B"); //PayEntity.PowerCardData.EF2 = handler.GetStringValue("3F6B"); //PayEntity.PowerCardData.EF5 = handler.GetStringValue("3F7B"); //PayEntity.CheckBuyEleTimes = handler.GetStringValue("3F8B"); //PayEntity.CheckWriteAmount = handler.GetStringValue("3F9B"); //PayEntity.CheckUserAmount = handler.GetStringValue("3F10"); } //byte[] tmp = RecvPackage.GetArrayData(57); //string temp57 = PubFunc.ByteArrayToHexString(tmp, tmp.Length).Trim(); //Log.Debug(temp57); //if (_currentIndex == 1) //{ // PayEntity.CheckBF31 = temp57.Substring(0, 256); //} //else if (_currentIndex == 2) //{ // PayEntity.CheckBF32 = temp57.Substring(0, 256); // PayEntity.CheckBF41 = temp57.Substring(256, 256); // PayEntity.CheckBF42 = temp57.Substring(512, 256); // PayEntity.Check57sKey1 = temp57.Substring(768, 16); // PayEntity.Check57sKey2 = temp57.Substring(784, 16); // PayEntity.Check57sKey3 = temp57.Substring(800, 16); //} }
protected override void OnSucc() { //37域 系统参考号 PayEntity.PayReferenceNo = RecvPackage.GetString(37); //38域 PayEntity.RecvField38 = RecvPackage.ExistValue(38) ? RecvPackage.GetString(38) : ""; //55域 PayEntity.RecvField55 = RecvPackage.ExistValue(55) ? RecvPackage.GetArrayData(55) : new byte[0]; //48域 TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); PayEntity.PayFlowNo = handler.GetStringValue("BF05"); }
private void TVOnSucc() { //48域 TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); PayEntity.QueryTraceNo = handler.GetStringValue("BF05"); PayEntity.UserName = handler.GetStringValue("1F1B"); PayEntity.QueryAmount = double.Parse(handler.GetStringValue("1F2B")) / 100; PayEntity.QueryDateEnd = handler.GetStringValue("1F3B"); PayEntity.Price1 = double.Parse(handler.GetStringValue("1F4B")) / 100; PayEntity.Price2 = double.Parse(handler.GetStringValue("1F5B")) / 100; PayEntity.PriceInfo = handler.GetStringValue("1F6B"); }
protected override void OnSucc() { //48域 UserID = Encoding.Default.GetString(RecvPackage.GetArrayData(48), 14, 40); TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); UserName = handler.GetStringValue("2F1A"); UserNo = handler.GetStringValue("BF06"); UserTel = handler.GetStringValue("BF07"); IDCard = handler.GetStringValue("BF08"); Sex = handler.GetStringValue("BF09") == "0" ? "男" : "女"; RecordCount = int.Parse(handler.GetStringValue("BF10")); RecordInfo = handler.GetStringValue("BF11"); }
private void WaterOnSucc() { //48域 TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); PayEntity.QueryTraceNo = handler.GetStringValue("BF05"); PayEntity.UserName = handler.GetStringValue("1F1B"); PayEntity.UserAddress = handler.GetStringValue("1F2B"); PayEntity.QueryAmount = double.Parse(handler.GetStringValue("1F3B")) / 100; PayEntity.WaterFee = double.Parse(handler.GetStringValue("1F4B")) / 100; PayEntity.WaterTotalAmount = double.Parse(handler.GetStringValue("1F5B")) / 100; }
protected override void OnSucc() { //48域 TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); PayEntity.TPQueryTraceNo = handler.GetStringValue("BF05"); PayEntity.TPUserName = handler.GetStringValue("1F1B"); PayEntity.TPUserID = handler.GetStringValue("1F2B"); PayEntity.TPPrinAmount = double.Parse(handler.GetStringValue("1F3B")) / 100; PayEntity.TPFeeAmount = double.Parse(handler.GetStringValue("1F4B")) / 100; PayEntity.TPPayAmount = double.Parse(handler.GetStringValue("1F5B")) / 100; }
protected override void OnSucc() { byte[] tmp = RecvPackage.GetArrayData(48); PayEntity.UserID = Encoding.Default.GetString(tmp, 16, 50); TLVHandler handler = new TLVHandler(); handler.ParseTLV(Get48TLVBytes()); if (_currentIndex == 1) { PayEntity.QueryTraceNo = handler.GetStringValue("BF05"); } else if (_currentIndex == 2) { PayEntity.QueryTraceNo = handler.GetStringValue("BF05"); PayEntity.PowerReturnMsg = handler.GetStringValue("1F1B"); PayEntity.UserName = handler.GetStringValue("1F2B"); PayEntity.UserAddress = handler.GetStringValue("1F3B"); PayEntity.PowerAdvName = handler.GetStringValue("1F4B"); PayEntity.PowerCardNo = handler.GetStringValue("1F5B"); PayEntity.EleFeeAccountName = handler.GetStringValue("1F6B"); PayEntity.PowerAreaNum = handler.GetStringValue("1F7B"); PayEntity.EleFeeNum = handler.GetStringValue("1F8B"); PayEntity.PowerIdentity = handler.GetStringValue("1F9B"); if (handler.GetStringValue("1F0B") != "") { PayEntity.PowerPayCount = int.Parse(handler.GetStringValue("1F0B")); } if (handler.GetStringValue("1F1C") != "") { PayEntity.PayAmount = double.Parse(handler.GetStringValue("1F1C")) / 100; } } }