MagneticStripeReaderDataReceived

成功磁条读取器 (MSR) 扫描事件后引发此事件。

语法

typedef struct _MSR_DATA_RECEIVED {
    MsrCardType CardType;
    unsigned char Track1EncryptedDataLength;
    unsigned char Track2EncryptedDataLength;
    unsigned char Track3EncryptedDataLength;
    unsigned char Track4EncryptedDataLength;
    unsigned char Track1EncryptedData[MSR_TRACK_SIZE];
    unsigned char Track2EncryptedData[MSR_TRACK_SIZE];
    unsigned char Track3EncryptedData[MSR_TRACK_SIZE];
    unsigned char Track4EncryptedData[MSR_TRACK_SIZE];
    unsigned char Track1MaskedDataLength;
    unsigned char Track2MaskedDataLength;
    unsigned char Track3MaskedDataLength;
    unsigned char Track4MaskedDataLength;
    unsigned char Track1MaskedData[MSR_TRACK_SIZE];
    unsigned char Track2MaskedData[MSR_TRACK_SIZE];
    unsigned char Track3MaskedData[MSR_TRACK_SIZE];
    unsigned char Track4MaskedData[MSR_TRACK_SIZE];
    unsigned char Track1DiscretionaryDataLength;
    unsigned char Track2DiscretionaryDataLength;
    unsigned char Track1DiscretionaryData[MSR_TRACK_SIZE];
    unsigned char Track2DiscretionaryData[MSR_TRACK_SIZE];
    unsigned char CardAuthenicationDataLength; // Length of data after encryption, may include padding.
    unsigned char CardAuthenticationDataAbsoluteLength; // Length of data before encryption, may be needed to strip padding on decryption.
    unsigned char CardAuthenicationData[MSR_CARD_AUTHENTICATION_DATA_SIZE];
    unsigned char AdditionalSecurityInformationLength;
    unsigned char AdditionalSecurityInformation[MSR_ADDITIONAL_SECURITY_INFORMATION_SIZE];
} MSR_DATA_RECEIVED, *PMSR_DATA_RECEIVED;

下表显示了此事件的数据缓冲区的内存布局。

内存值 说明
0x00000008 EventType = PosEventType:: MagneticStripeReaderDataReceived
UINT32 DataLength = sizeof (PosEventDataHeader) + sizeof (MSR_DATA_RECEIVED)
32 位 MsrCardType MsrCardType
unsigned char Track1EncryptedDataLength - 如果MsrDataEncryption_None MsrDataEncryption ,则始终为零 (0)
unsigned char Track2EncryptedDataLength - 如果MsrDataEncryption_None MsrDataEncryption ,则始终为零 (0)
unsigned char Track3EncryptedDataLength - 如果MsrDataEncryption_None MsrDataEncryption ,则始终为零 (0 )
unsigned char Track4EncryptedDataLength - 如果MsrDataEncryption_None MsrDataEncryption ,则始终为零 (0 )
unsigned char [MSR_TRACK_SIZE] Track1EncryptedDataLength 字节的加密跟踪 1 数据
unsigned char [MSR_TRACK_SIZE] Track2EncryptedDataLength 字节的加密跟踪 2 数据
unsigned char [MSR_TRACK_SIZE] Track3EncryptedDataLength 字节的加密跟踪 3 数据
unsigned char [MSR_TRACK_SIZE] Track4EncryptedDataLength 字节的加密跟踪 4 数据
unsigned char Track1MaskedDataLength
unsigned char Track2MaskedDataLength
unsigned char Track3MaskedDataLength
unsigned char Track4MaskedDataLength
unsigned char [MSR_TRACK_SIZE] Track1MaskedDataLength 字节的掩码跟踪 1 数据
unsigned char [MSR_TRACK_SIZE] Track2MaskedDataLength 字节的掩码跟踪 2 数据
unsigned char [MSR_TRACK_SIZE] Track3MaskedDataLength 字节的掩码跟踪 3 数据
unsigned char [MSR_TRACK_SIZE] Track4MaskedDataLength 字节的掩码跟踪 4 数据
unsigned char Track1DiscretionaryDataLength - 如果 MagneticStripeReaderIsDecodeDataEnabled 为 false,则始终为零 (0) 。
unsigned char Track2DiscretionaryDataLength - 如果 MagneticStripeReaderIsDecodeDataEnabled 为 false,则始终为零 (0) 。
unsigned char [MSR_TRACK_SIZE] Track1DiscretionaryDataLength 字节的任意跟踪 1 数据
unsigned char [MSR_TRACK_SIZE] Track2DiscretionaryDataLength 字节的任意跟踪 2 数据
unsigned char CardAuthenicationDataLength - 加密数据的长度(以字节为单位),包括填充
unsigned char CardAuthenticationDataAbsoluteLength - 未加密数据的长度(以字节为单位) (解密期间可能需要条带填充)
unsigned char[MSR_ADDITIONAL_SECURITY_INFORMATION_DATA_SIZE] CardAuthenticationDataAbsoluteLength 字节卡身份验证数据
unsigned char AdditionalSecurityInformationLength
unsigned char[MSR_ADDITIONAL_SECURITY_INFORMATION_SIZE] AdditionalSecurityInformationLength 字节的其他安全信息

要求

标头: pointofservicedriverinterface.h