thai-smartcard-reader
v1.0.4
Published
For read thai smartcard
Downloads
29
Readme
thai-smartcard-reader
For read thai citizen smartcard only
- Must install "webcard" plugin
- You need to "Smartcard reader"
Support
- Safari 11
- IE 9+
- Firefox 51 (Not support newer version)
- Chrome 44 (Not support newer version)
Getting Started
Install dependencies
- install package
npm install --save thai-smartcard-reader
- Download and install
webcard
plugin Mac and Windows ref: https://github.com/cardid/WebCard
Include component
import ThaiSmartcardReader from 'thai-smartcard-reader'
Example
<ThaiSmartcardReader onChange={(data) => console.log(data)} />
Example response data
{
"citizenId": "1234567890123",
"titleTH": "นาย",
"firstnameTH": "ใจดี",
"lastnameTH": "ดีใจ",
"titleEN": "Mr.",
"firstnameEN": "Jaidee",
"lastnameEN": "Deejai",
"birthday": "25600131",
"gender": "1",
"address": [
"30/1",
"หมู่ที่",
"12",
"ตำบลท้ายเมือง",
"อำเภอท้ายบ้าน",
"จังหวัดกระบี่กระบอง"
],
"issueAll": "25570117",
"expire": "25651231"
}
สุดท้าย...ผมตามหาคนช่วยแก้ README อยู่สนใจก็ pull request มาแล้วส่ง email มาให้ผมก็ได้ ผมไม่ค่อยเก่งภาษา