thai-smartcard-reader

1.0.4 • Public • Published

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

  1. install package
npm install --save thai-smartcard-reader
  1. 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 มาให้ผมก็ได้ ผมไม่ค่อยเก่งภาษา

/thai-smartcard-reader/

    Package Sidebar

    Install

    npm i thai-smartcard-reader

    Weekly Downloads

    4

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    56.2 kB

    Total Files

    7

    Last publish

    Collaborators

    • doctoraod