react-native-sunmi-eid
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-0 • Public • Published

react-native-sunmi-eid

sunmi eid service for react-native app

商品身份证云识别 react-native 实现

Installation

npm install react-native-sunmi-eid

Usage

import SunmiEid from "react-native-sunmi-eid";

// 初始化,建议全局只初始化一次
SunmiEid.init({
  appKey: '',
  appId: ''
}).then(() => {
  ...
})
// 手动开启读卡
SunmiEid.startCheckCard()
// 手动关闭读卡
SunmiEid.stopCheckCard()

// 监听读卡过程中状态变更
const removeEvent = SunmiEid.listen(
  (payload) => {
    console.log('stateChange', payload.status);
  },
  (error) => {
    console.log('error', error);
  }
);

更详细的使用方式请查看 example

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Dependencies (0)

    Dev Dependencies (19)

    Package Sidebar

    Install

    npm i react-native-sunmi-eid

    Weekly Downloads

    0

    Version

    1.0.0-0

    License

    MIT

    Unpacked Size

    407 kB

    Total Files

    105

    Last publish

    Collaborators

    • limoer