拉卡拉刷卡器接口回调说明 - 深圳市艾创电子有限公司

拉卡拉刷卡器接口回调说明 - 深圳市艾创电子有限公司

ID:34186530

大小:92.50 KB

页数:9页

时间:2019-03-04

拉卡拉刷卡器接口回调说明 - 深圳市艾创电子有限公司_第1页
拉卡拉刷卡器接口回调说明 - 深圳市艾创电子有限公司_第2页
拉卡拉刷卡器接口回调说明 - 深圳市艾创电子有限公司_第3页
拉卡拉刷卡器接口回调说明 - 深圳市艾创电子有限公司_第4页
拉卡拉刷卡器接口回调说明 - 深圳市艾创电子有限公司_第5页
资源描述:

《拉卡拉刷卡器接口回调说明 - 深圳市艾创电子有限公司》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、eItronInterfacesDocumentV4.0ShenzhenItronDocumentRevisionHistory日期版本修改人审核人修改内容2012-8-10V1.0李欣初版2012-11-20V1.2李欣增加isDevicePresent2013-8-26V3.0WX修改回调函数增加返回MAC2014-7-25V3.1Wx增加IC卡刷卡器通信协议ClassControlCSwiper控制器类负责与刷卡器交互,刷卡器相关的功能都将在此类中进行相应的封装,所有对刷卡器的操作都通过此控制器

2、的实例进行.此类为单例模式.Thecontrollerclassisresponsibleforfunctionsrelatedtoswipecardreaderinteraction,swipecardreaderwillmaketheappropriatepackageintheclass,alloperationsonthecardarecarriedoutbywayofexampleofthiscontroller.Suchasingleton.CSwiperStateChangedListe

3、ner实现此接口的对象与CSwiperController控制器绑定,控制器会回调接口中相应的方法,实现刷卡器事件驱动机制ObjectthatimplementsthisinterfaceandCSwiperControllercontrollerbinding,thecontrollercallbackinterfaceappropriatemethodtoachieveevent-drivenmechanismcardreaderCSwiperConstructionmethodCSwiper.G

4、etInstance(Context,cSwiperListener);function:VoidstartCSwiper(intctrlmode,byte[]random,byte[]appenddata,inttime)StartCSwiperfunctionblockingmodelparameter description:Ctrlmode:Controlflagbit0=0/1Indicatesthereisequipmentgeneratesrandom/generatedbythepar

5、ties。Whenproducedbytheparties,lovebrushproducesonly4bytes.Ifthephonesideislessthan4bytes,thenlovewillbrushupbeforethe4-byteFFBit1=0/1Donotreturntheterminaldata/ReturntoterminaldataMACBit2=0/1Cardnumberisnotblocked/CardnumberisblockedRandom:maxlength4byt

6、es·Appenddata:additional data,maxlength100bytesTime:TimeOutvoidstopCSwiper()StopuseroperationvoiddeleteCDwiper()ReleaseResourceStringgetKsn()ReturnTerminalSNbooleanisDevicePresent()IntgetTerminalType()ReturnTerminaltype0smartpos03:i30+04:hsm2005:i2106:i

7、21BBooleanUpdateTerminalParameters(intindex,intpage,byte[]data)ICCardPublickey/AIDParameterloadingparameter :bit0=0/1publickey/aid。Otherretain(default0)Data:为8583协议的62域内容(不包含长度)PageNo:from0,Inascendingorder。IfpageNo=0clearBeforeRemove:VoidsecondIssuance

8、(Stringcode,byte[]data)Incardtransactionscriptwritebackparameter :Code39域8583中交易应答码Data85838协议的55域中要会写的数据。VoidstatEmvSwiper(bytemodel,byte[]flag,byte[]random,Stringmoney,byte[]appendData,inttimeOut,TransactionInfoinfo)启动IC卡与磁条卡交易

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。