1.0.1 • Published 1 year ago

st-card-scanner v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

st-card-scanner

This library provides credit/debit card scanning functionality for your react-native app.

  • Scan credit/debit cards
  • Open-source and looks well made
  • Supports Android/IOS

Installation

npm install st-card-scanner

Usage

import { openScanner } from 'st-card-scanner';

 React.useEffect(() => {
    openScanner()
    let listener = DeviceEventEmitter.addListener(
      'card_scanner_result',
      function (result: string) {
        console.log("Result====>",result)
        listener.remove();
      },
    );
  }, []);

Run example project

Running the example project:

  • Checkout this repository.
  • Go to example directory and run yarn or npm i
  • Go to example/ios and install Pods with pod install
  • Run app
  • To run Android app: npx react-native run-android
  • To run iOS app: npx react-native run-ios

License

MIT