com.pax.dal
Interface IMag
-
public interface IMag
关于磁条卡的API。 如果开启权限检查,需在AndroidManifest下添加权限:"com.pax.permission.MAGCARD"API for Magnetic stripe cards. If permission check is enabled, you need to add permission under AndroidManifest: "com.pax.permission.MAGCARD".
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidclose()关闭读卡器Close Magnetic Stripe Card ReaderbooleanisSwiped()检查是否刷过卡Check whether a card is swipedvoidopen()打开读卡器Open Magnetic Stripe Card ReaderTrackDataread()读取磁卡缓冲区的1、2、3磁道的数据Read data of track 1, 2, 3 from magnetic stripe card buffer.TrackDataBytereadByte()读取磁卡缓冲区的1、2、3磁道的数据Read data of track 1, 2, 3 from magnetic stripe card buffer.TrackDataBytereadByteExt()读取磁卡缓冲区的1、2、3磁道或JIS-II磁道的数据。Read data of track 1, 2, 3 or JIS-II from magnetic stripe card buffer.TrackDatareadExt()读取磁卡缓冲区的1、2、3磁道或JIS-II磁道的数据。Read data of track 1, 2, 3 or JIS-II from magnetic stripe card buffer.voidreset()复位磁头,并清除磁卡缓冲区数据Reset magnetic stripe card reader, and clear buffer of magnetic stripe card.voidsetup(byte flag)磁卡功能设置:是否返回磁卡错误码。设置有效周期:设置后直到机器重启或下一次重新设置新的值。Magnetic card function Settings: whether to return magnetic card error code.
-
-
-
Method Detail
-
open
void open() throws MagDevException
打开读卡器Open Magnetic Stripe Card Reader- Throws:
MagDevException
-
reset
void reset() throws MagDevException
复位磁头,并清除磁卡缓冲区数据Reset magnetic stripe card reader, and clear buffer of magnetic stripe card.- Throws:
MagDevException
-
isSwiped
boolean isSwiped() throws MagDevException
检查是否刷过卡Check whether a card is swiped- Returns:
- *
- true -有刷卡
- false -没有刷卡
- true -Card swiped
- false -No card swiping
- Throws:
MagDevException
-
read
TrackData read() throws MagDevException
读取磁卡缓冲区的1、2、3磁道的数据Read data of track 1, 2, 3 from magnetic stripe card buffer.- Returns:
TrackData- Throws:
MagDevException
-
close
void close() throws MagDevException
关闭读卡器Close Magnetic Stripe Card Reader- Throws:
MagDevException
-
readExt
TrackData readExt() throws MagDevException
读取磁卡缓冲区的1、2、3磁道或JIS-II磁道的数据。Read data of track 1, 2, 3 or JIS-II from magnetic stripe card buffer.- Returns:
TrackData- Throws:
MagDevException- Since:
- V3.08.00
-
setup
void setup(byte flag) throws MagDevException
磁卡功能设置:是否返回磁卡错误码。设置有效周期:设置后直到机器重启或下一次重新设置新的值。Magnetic card function Settings: whether to return magnetic card error code. Set duration: set until the machine restarts or reset the new value the next time.- Parameters:
flag-- Throws:
MagDevException- Since:
- V3.16.00
-
readByte
TrackDataByte readByte() throws MagDevException
读取磁卡缓冲区的1、2、3磁道的数据Read data of track 1, 2, 3 from magnetic stripe card buffer.- Returns:
TrackDataByte- Throws:
MagDevException- Since:
- V4.15.00
-
readByteExt
TrackDataByte readByteExt() throws MagDevException
读取磁卡缓冲区的1、2、3磁道或JIS-II磁道的数据。Read data of track 1, 2, 3 or JIS-II from magnetic stripe card buffer.- Returns:
TrackDataByte- Throws:
MagDevException- Since:
- V4.15.00
-
-