/// <summary> /// 签到 /// </summary> /// <returns></returns> public static Dictionary <string, ResultData> sign() { //签到 Dictionary <int, string> data = new Dictionary <int, string>(); data.Add(3, "000000"); data.Add(41, ConfigurationManager.AppSettings["ClientNo"]); //终端代码 data.Add(42, ConfigurationManager.AppSettings["ShopNo"]); //商户代码 data.Add(63, "01"); byte[] result = Client(LakalaIp, LakalaPort, EncryptWT.EncryptData("0800", "6000000000", EncryptWT.encryptLKL(data, null))); //发送数据 if (result == null || result.Length <= 0) { return(null); } Console.WriteLine(BCDUtil.byteArrToString(result)); AnalysisBaseWT lk = new AnalysisBaseWTSign(); Dictionary <string, ResultData> rd = lk.analysis(result); return(rd); }
/// <summary> /// 签到 /// </summary> /// <returns></returns> static Dictionary <string, ResultData> sign() { //签到 Dictionary <int, string> data = new Dictionary <int, string>(); data.Add(3, "000000"); data.Add(11, "000008"); data.Add(41, "pos00001"); data.Add(42, "000000000000257"); data.Add(63, "01"); byte[] result = Client(LakalaIp, LakalaPort, EncryptWT.EncryptData("0800", "6000000000", EncryptWT.encryptLKL(data, null))); //发送数据 if (result == null || result.Length <= 0) { return(null); } Console.WriteLine(BCDUtil.byteArrToString(result)); AnalysisBaseWT lk = new AnalysisBaseWTSign(); Dictionary <string, ResultData> rd = lk.analysis(result); return(rd); }
/// <summary> /// 签到 /// </summary> /// <returns></returns> public static Dictionary <string, ResultData> sign() { try { //签到 Dictionary <int, string> data = new Dictionary <int, string>(); data.Add(3, "000000"); data.Add(41, SysConfigHelper.readerNode("ClientNo")); //终端代码 data.Add(42, SysConfigHelper.readerNode("ShopNo")); //商户代码 data.Add(63, "01"); byte[] result = Client(LakalaIp, LakalaPort, EncryptWT.EncryptData("0800", "6000000000", EncryptWT.encryptLKL(data, null))); //发送数据 AnalysisBaseWT lk = new AnalysisBaseWTSign(); Dictionary <string, ResultData> rd = lk.analysis(result); return(rd); } catch (WtException e) { throw e; } catch (Exception e) { throw new WtException(WtExceptionCode.Sys.WT_SIGN, e.Message); } }