public abstract ResultData analysisBitMap(byte[] dataStr, ResultData rd);
public ResultData analysisBit2(byte[] dataStr, ResultData rd) { varRightBcd(dataStr, rd, 1); rd.name = "卡号"; return(new ResultData(rd)); }
public ResultData analysisBit5(byte[] dataStr, ResultData rd) { fixedRightBcd(rd, 1, dataStr); rd.name = "IC卡类型"; return(new ResultData(rd)); }
/// <summary> /// 获取消息类型 /// </summary> /// <param name="dataStr"></param> /// <param name="rd"></param> /// <returns></returns> public override ResultData analysisMsgType(byte[] dataStr, ResultData rd) { fixedRightBcd(rd, 2, dataStr); rd.name = "MsgType"; return(new ResultData(rd)); }
public override void analysisBit(byte[] dataStr, ResultData rd, int len) { rd.value = PosProtocol.bytesToHexString(PosProtocol.subbyte(dataStr, rd.pos, len)); rd.pos = rd.pos + len; }
public ResultData analysisBit52(byte[] dataStr, ResultData rd) { analysisBit(dataStr, rd, 8); rd.name = "密码PIN"; return(new ResultData(rd)); }
public ResultData analysisBit64(byte[] dataStr, ResultData rd) { fixedAsciiStr(rd, 8, dataStr); rd.name = "MAC"; return(new ResultData(rd)); }
public ResultData analysisBit26(byte[] dataStr, ResultData rd) { fixedRightBcd(rd, 1, dataStr); rd.name = "服务点PIN获取码"; return(new ResultData(rd)); }
/// <summary> /// 获取报头 /// </summary> /// <param name="dataStr"></param> /// <param name="rd"></param> /// <returns></returns> public override ResultData analysisHeader(byte[] dataStr, ResultData rd) { rd.value = PosProtocol.bcd2Str(PosProtocol.subbyte(dataStr, 0, rd.pos)); rd.name = "Header"; return(new ResultData(rd)); }
public ResultData analysisBit12(byte[] dataStr, ResultData rd) { fixedRightBcd(rd, 3, dataStr); rd.name = "受卡方所在地时间"; return(new ResultData(rd)); }
public ResultData analysisBit15(byte[] dataStr, ResultData rd) { fixedRightBcd(rd, 2, dataStr); rd.name = "清算日期"; return(new ResultData(rd)); }
public ResultData analysisBit11(byte[] dataStr, ResultData rd) { fixedRightBcd(rd, 3, dataStr); rd.name = "pos流水号"; return(new ResultData(rd)); }
/// <summary> /// 子类实现的方法 /// </summary> /// <param name="dataStr"></param> /// <param name="rd"></param> /// <param name="v"></param> public abstract void analysisBit(byte[] dataStr, ResultData rd, int v);
/// <summary> /// 子类实现的方法 /// </summary> /// <param name="rd"></param> /// <param name="v"></param> /// <param name="dataStr"></param> public abstract void fixedRightBcd(ResultData rd, int v, byte[] dataStr);
/// <summary> /// 获取analysisTPDU /// </summary> /// <param name="dataStr"></param> /// <param name="rd"></param> /// <returns></returns> public override ResultData analysisTPDU(byte[] dataStr, ResultData rd) { fixedRightBcd(rd, 5, dataStr); rd.name = "TPDU"; return(new ResultData(rd)); }
public ResultData analysisBit32(byte[] dataStr, ResultData rd) { varRightBcd(dataStr, rd, 1); rd.name = "受理方标识码,认可pos机具"; return(new ResultData(rd)); }
public ResultData analysisBit49(byte[] dataStr, ResultData rd) { fixedAsciiStr(rd, 3, dataStr); rd.name = "交易货币代码"; return(new ResultData(rd)); }
public ResultData analysisBit36(byte[] dataStr, ResultData rd) { varRightBcd(dataStr, rd, 2); rd.name = "3磁道数据"; return(new ResultData(rd)); }
public ResultData analysisBit59(byte[] dataStr, ResultData rd) { varAsciiStr(dataStr, rd, 2); rd.name = "analysisBit59"; return(new ResultData(rd)); }
public ResultData analysisBit37(byte[] dataStr, ResultData rd) { fixedAsciiStr(rd, 12, dataStr); rd.name = "检索参考号"; return(new ResultData(rd)); }
/// <summary> /// 固定长度BCD解码 /// </summary> /// <param name="rd"></param> public override void fixedRightBcd(ResultData rd, int len, byte[] dataStr) { rd.value = PosProtocol.bcd2Str(PosProtocol.subbyte(dataStr, rd.pos, len)); rd.pos = rd.pos + len; }
public ResultData analysisBit39(byte[] dataStr, ResultData rd) { fixedAsciiStr(rd, 2, dataStr); rd.name = "应答码"; return(new ResultData(rd)); }
/// <summary> /// 固定长度ascii /// </summary> /// <param name="rd"></param> /// <param name="len"></param> /// <param name="dataStr"></param> private void fixedAsciiStr(ResultData rd, int len, byte[] dataStr) { rd.value = PosProtocol.toAsciiStr(PosProtocol.subbyte(dataStr, rd.pos, len)); rd.pos = rd.pos + len; }
public ResultData analysisBit41(byte[] dataStr, ResultData rd) { fixedAsciiStr(rd, 8, dataStr); rd.name = "受卡机终端标识码"; return(new ResultData(rd)); }
public override ResultData analysisBitMap(byte[] dataStr, ResultData rd) { analysisBit(dataStr, rd, 8); rd.name = "BitMap"; return(new ResultData(rd)); }
public ResultData analysisBit42(byte[] dataStr, ResultData rd) { fixedAsciiStr(rd, 15, dataStr); rd.name = "商户代码"; return(new ResultData(rd)); }
public ResultData analysisBit4(byte[] dataStr, ResultData rd) { fixedRightBcd(rd, 6, dataStr); rd.name = "交易金额"; return(new ResultData(rd)); }
public ResultData analysisBit43(byte[] dataStr, ResultData rd) { fixedAsciiStr(rd, 40, dataStr); rd.name = "analysisBit43"; return(new ResultData(rd)); }
public ResultData analysisBit6(byte[] dataStr, ResultData rd) { rd.name = "analysisBit6"; return(new ResultData(rd)); }
/// <summary> /// 获取消息类型 /// </summary> /// <param name="dataStr"></param> /// <param name="rd"></param> /// <returns></returns> public abstract ResultData analysisMsgType(byte[] dataStr, ResultData rd);