Card Scanner Plugin is an optional plugin to add the feature that use camera to scan the credit card, powered by Card.IO.
- Add the plugin with Cocoapods with
pod 'PWCardScannerPlugin'or manually dragging thelibPWCardScannerPlugin.aand it's headers file to your project - If you use manually install, you must also include CardIO static libs and it's headers in the app
- Import the library header into your project or via
bridging-headers.hif you use Swift - Add it within brick payment method creation:
let brick = PWOptionBrick()
brick.setCardScannerPlugin(PWCardScannerPlugin())- You have to specify the usage of camera and photo library to your
info.plist:
<key>NSCameraUsageDescription</key>
<string>To scan credit card</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>To get image</string>