BlinkCard Module

You can add a card scanning solution to your application by adding VGSCollect/BlinkCard module. It provides a fast and easy way to scan payment cards and import them to VGS Collect. This tutorial is aimed to help you to adapt BlinkCard SDKarrow-up-right with VGS Collect iOS SDK.

Using BlinkCard in your app requires a valid license key. To get your license key you should contact MicroBlinkarrow-up-right.

You can start by watching our step-by-step tutorial, in which you’ll find out how to make BlinkCard SDK a part of your iOS app.

To see VGSCollect/BlinkCard in action, check our Demo apparrow-up-right.

Pricing

VGSCollect/BlinkCard module is a paid integration. Please contactarrow-up-right Microblink for more details.

Before you start

Using VGSCollect/BlinkCard API in your app you should obtain a valid license key. You can obtain it from Microblink dashboardarrow-up-right.

Integration

The module can be deployed in iOS 13.0 or later.

Integrate with Swift Package Manager

To integrate VGSCollect/BlinkCard module via Swift Package Manager, in Xcode add the https://github.com/verygoodsecurity/vgs-collect-ios.git repo and choose the exact versionarrow-up-right.

Select both VGSCollectSDK and VGSBlinkCardCollector packages.

Follow the official Apple SPM guide instructionsarrow-up-right for more details.

Integrate with Cocoapods

Add BlinkCard module alongside with core VGSCollectSDK module into your App Podfile:

Then in Terminal run:

UIKit integration

VGSBlinkCardController

An object you use to manage BlinkCard scan ViewController.

Declaration

Creating a VGSBlinkCardController

VGSBlinkCardController Attributes and Methods

VGSBlinkCardControllerDelegate

Declaration

Managing Controller States

Providing VGSTextFields for setting Scanned Data

If scanned data is valid, it will be set in your VGSTextFields automatically after user confirmation.

VGSBlinkCardDataType

VGSBlinkCardDataType is an Enum of supported scan data types by BlinkCard module.

VGSBlinkCardDataType

Type, Value

.cardNumber

String, Digits string

.name

String, Cardholder name

.cvc

String, 3-4 digits

.expirationDate

String, "mm/yy" digits

.expirationDateLong

String, "mm/yyyy" digits

.expirationDateShortYearThenMonth

String, "yy/mm" digits

.expirationDateLongYearThenMonth

String, "yyyy/mm" digits

.expirationMonth

String, "mm" digits

.expirationYear

String, "yy" digits

.expirationYearLong

String, "yyyy" digits

Usage

Create UI Form with VGSTextfields, if not done yet. Inside your ViewController create and configure VGSBlinkCardController instance:

Implement VGSBlinkCardControllerDelegate methods. To setup scanned data into specific VGSTextFields implement textFieldForScannedData:. If scanned data is valid it will be set in your VGSTextFields automatically. Check VGSBlinkCardDataType to get available scanned data types.

SwiftUI integration

VGS Collect iOS SDK provide support for integration with apps that are buid with SwiftUI toolkit by providing SwiftUI wrappers. VGS Collect SwiftUI wrappers are designed to make integration easier and more straight forward by taking care of all needed state and editing events.

VGSBlinkCardControllerRepresentable

Declaration

Creating a VGSBlinkCardControllerRepresentable

Instance Methods

VGSBlinkCardControllerRepresentable is a SwiftUI wrapper around BlinkCard card scanner controller and have similar attributes and functionality represented in SwiftUI way.

VGSBlinkCardControllerRepresentable card recognition modifier

You can find available attributes and their description in BlinkCard documentationarrow-up-right.

VGSBlinkCardControllerRepresentable Event modifier

Code examples

Create UI Form with VGSTextfieldRepresentable, if not done yet. Inside your View create and configure VGSBlinkCardControllerRepresentable instance:

Last updated