snghrsw_core_card_io 1.0.0 copy "snghrsw_core_card_io: ^1.0.0" to clipboard
snghrsw_core_card_io: ^1.0.0 copied to clipboard

CardIO plugin for flutter.

core_card_io #

CardIO plugin for flutter

A Flutter plugin for iOS and Android for scanning credit cards using the camera. This uses the CardIO library for iOS and Android

Note: This plugin is still under development, and some APIs might not be available yet. Feedback and pull requests are welcome!

Installation #

First, add core_card_io as a dependency in your pubspec.yaml file.

iOS #

Add the following key to your Info.plist file, located in <project root>/ios/Runner/Info.plist:

NSCameraUsageDescription - Set the value to be a string describing why your app needs to use the camera (e.g. "To scan credit cards."). This string will be displayed when the app initially requests permission to access the camera.

Run 'pod install'

Android #

Add the following permission to your Android Manifest, located in `

<uses-permission android:name="android.permission.CAMERA"/>

Add card.io's open source license acknowledgments to your app's acknowledgments.

Example #

Show example folder

  Map<String, dynamic> details = await FlutterCardIo.scanCard({
    "requireExpiry": true,
    "scanExpiry": true,
    "requireCVV": true,
    "requirePostalCode": true,
    "restrictPostalCodeToNumericOnly": true,
    "requireCardHolderName": true,
    "scanInstructions": "Hola! Fit the card within the box",
  });

Response #

{
    "cardholderName": "John doe",
    "cardNumber": "1234 5678 9876 1236",
    "redactedCardNumber": "**** **** **** 1236",
    "expiryMonth": 12,
    "expiryYear": 2022,
    "cvv": 123,
    "postalCode": "93748"
}
3
likes
25
pub points
0%
popularity

Publisher

unverified uploader

CardIO plugin for flutter.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on snghrsw_core_card_io