Advanced customization guide
This document outlines the advanced customization options available in the CardVerify framework.
Parts of the verify flow can be customized to perform better on slower devices at the expense of some user experience on faster devices. These customization options are available in the VerifyCardViewController and VerifyCardAddViewController class.

Configuration

When instantiating VerifyCardViewController or VerifyCardAddViewController, you have the option to set scanPerformancePriority and maxErrorCorrectionDuration.
Note that you should only consider configuring the verify flow with devices iOS 13.0 and higher.
In markets that primarily have older iOS devices, we recommend that you add the following to your code before presenting the VerifyCardViewController or VerifyCardAddViewController:
Swift
Objective-C
1
@IBAction func pressVerifyCardViewControllerButton() {
2
let vc = VerifyCardViewController(userId: "user_id", lastFour: "7890", bin: "123456", cardNetwork: .UNKNOWN)
3
vc.scanPerformancePriority = .accurate
4
vc.maxErrorCorrectionDuration = 4.0
5
vc.verifyCardDelegate = self
6
self.present(vc, animated: true)
7
}
8
9
@IBAction func pressVerifyAddCardViewControllerButton() {
10
let vc = VerifyCardAddViewController(userId: "user_id")
11
vc.scanPerformancePriority = .accurate
12
vc.maxErrorCorrectionDuration = 4.0
13
vc.cardAddDelegate = self
14
self.present(vc, animated: true)
15
}
Copied!
1
- (IBAction)pressVerifyCardViewControllerButton:(id)sender {
2
VerifyCardViewController *vc = [[VerifyCardViewController alloc] initWithUserId:@"userid" lastFour:@"7890" bin:@"1234"];
3
vc.scanPerformancePriority = ScanPerformanceAccurate;
4
vc.maxErrorCorrectionDuration = 4.0;
5
vc.verifyCardDelegate = self;
6
[self presentViewController:vc animated:YES completion:nil];
7
}
8
9
- (IBAction)pressVerifyAddCardViewControllerButton:(id)sender {
10
VerifyCardAddViewController *vc = [[VerifyCardAddViewController alloc] initWithUserId:@""];
11
vc.scanPerformancePriority = ScanPerformanceAccurate;
12
vc.maxErrorCorrectionDuration = 4.0;
13
vc.cardAddDelegate = self;
14
[self presentViewController:vc animated:YES completion:nil];
15
}
Copied!
Note that settings these values will make the scan take longer overall, but with a much higher chance of extracting the name and expiry.

Fast Scan Performance

The fast scanning option is the default behavior for all scanning flows. It has a non-configurable maximum error correction duration of 2 seconds.
field
default value
VerifyViewController.scanPerformancePriority
fast
VerifyViewController.maxErrorCorrectionDuration
2.seconds

Accurate Scan Performance

The accurate scanning option is the configurable behavior for VerifyCardViewController and VerifyCardAddViewController. While the overall scan time will be much slower, the longer scan time can improve the accuracy of the name and expiry extraction.
field
default value
VerifyViewController.scanPerformancePriority
accurate
VerifyViewController.maxErrorCorrectionDuration
4.seconds