Skip to content

Commit 6adb56f

Browse files
authored
Merge pull request #7 from blinkcard/release/v2.9.0
Release/v2.9.0
2 parents 59a7e15 + 40f0ddf commit 6adb56f

41 files changed

Lines changed: 619 additions & 1090 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BlinkCard/blinkcard-react-native.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Pod::Spec.new do |s|
99
s.authors = package['author']
1010
s.homepage = package['homepage']
1111
s.license = package['license']
12-
s.platform = :ios, "12.0"
12+
s.platform = :ios, "13.0"
1313
s.source = { :git => "https://github.com/BlinkCard/blinkcard-react-native.git", :tag => "v#{s.version}" }
1414
s.source_files = "src/ios", "src/ios/**/*.{h,m}"
1515
s.dependency 'React'
16-
s.dependency 'MBBlinkCard', '~> 2.6.0'
16+
s.dependency 'MBBlinkCard', '~> 2.9.0'
1717
s.frameworks = 'UIKit'
1818
end

BlinkCard/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,4 @@ export * from './overlays/blinkCardOverlays'
113113

114114
// export recognizers that can be used and their results
115115
export * from './recognizers/successFrameGrabberRecognizer'
116-
export * from './recognizers/blinkCardRecognizer'
117-
export * from './recognizers/legacyBlinkCardEliteRecognizer'
118-
export * from './recognizers/legacyBlinkCardRecognizer'
116+
export * from './recognizers/blinkCardRecognizer'

BlinkCard/overlays/blinkCardOverlays.js

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,53 @@ export class BlinkCardOverlaySettings extends OverlaySettings {
2525
* Default: true
2626
*/
2727
this.showFlashlightWarning = true;
28+
/**
29+
* String: Instructions for the user to move the document closer
30+
*
31+
* If null, default value will be used.
32+
*/
33+
this.errorMoveCloser = null;
34+
/**
35+
* String: Instructions for the user to move the document farther
36+
*
37+
* If null, default value will be used.
38+
*/
39+
this.errorMoveFarther = null;
40+
/**
41+
* String: Instructions for the user to move the document from the edge
42+
*
43+
* If null, default value will be used.
44+
*/
45+
this.errorCardTooCloseToEdge = null;
46+
/**
47+
* Defines whether button for presenting onboarding screens will be present on screen
48+
*
49+
* Default: true
50+
*/
51+
this.showOnboardingInfo = true;
52+
/**
53+
* Defines whether button for presenting onboarding screens will be present on screen
54+
*
55+
* Default: true
56+
*/
57+
this.showIntroductionDialog = true;
58+
/**
59+
* Option to configure when the onboarding help tooltip will appear.
60+
*
61+
* Default: 8000
62+
*/
63+
this.onboardingButtonTooltipDelay = 8000;
64+
/**
65+
* Language of the UI.
66+
* If default overlay contains textual information, text will be localized to this language. Otherwise device langauge will be used
67+
* example: "en"
68+
*/
69+
this.language = null;
70+
/**
71+
* Used with language variable, it defines the country locale
72+
*
73+
* example: "US" to use "en_US" on Android and en-US on iOS
74+
*/
75+
this.country = null;
2876
}
2977
}

BlinkCard/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

BlinkCard/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microblink/blinkcard-react-native",
3-
"version": "2.6.0",
3+
"version": "2.9.0",
44
"description": "AI-driven credit card scanning for cross-platform apps built with ReactNative.",
55
"main": "index.js",
66
"repository": {

BlinkCard/parser.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ export class Parser {
1818
export const ParserResultState = Object.freeze(
1919
{
2020
/** Parser result is empty */
21-
empty : 1,
21+
empty : 0,
2222
/** Parser result contains some values, but is incomplete or it contains all values, but some are uncertain */
23-
uncertain : 2,
23+
uncertain : 1,
2424
/** Parser result contains all required values */
25-
valid : 3
25+
valid : 2
2626
}
2727
);
2828

BlinkCard/recognizer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ export class Recognizer {
1616
export const RecognizerResultState = Object.freeze(
1717
{
1818
/** Recognizer result is empty */
19-
empty : 1,
19+
empty : 0,
2020
/** Recognizer result contains some values, but is incomplete or it contains all values, but some are uncertain */
21-
uncertain : 2,
21+
uncertain : 1,
2222
/** Recognizer result contains all required values */
23-
valid : 3,
24-
stageValid: 4
23+
valid : 2,
24+
stageValid: 3
2525
}
2626
);
2727

BlinkCard/recognizers/blinkCardRecognizer.js

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ import {
55
Quadrilateral,
66

77

8-
LegacyCardIssuer,
98
Issuer,
109
BlinkCardProcessingStatus,
1110
BlinkCardAnonymizationMode,
1211
CardNumberAnonymizationSettings,
1312
BlinkCardAnonymizationSettings,
13+
BlinkCardMatchLevel,
14+
BlinkCardCheckResult,
1415
ImageExtensionFactors,
1516
DataMatchResult,
1617
} from '../types'
@@ -42,13 +43,23 @@ export class BlinkCardRecognizerResult extends RecognizerResult {
4243
*/
4344
this.cvv = nativeResult.cvv;
4445

46+
/**
47+
* Document liveness check (screen, photocopy, hand presence) which can pass or fail.
48+
*/
49+
this.documentLivenessCheck = nativeResult.documentLivenessCheck;
50+
4551
/**
4652
* The payment card's expiry date.
4753
*/
4854
this.expiryDate = nativeResult.expiryDate != null ? new Date(nativeResult.expiryDate) : null;
4955

5056
/**
51-
* Wheater the first scanned side is blurred.
57+
* Whether the first scanned side is anonymized.
58+
*/
59+
this.firstSideAnonymized = nativeResult.firstSideAnonymized;
60+
61+
/**
62+
* Whether the first scanned side is blurred.
5263
*/
5364
this.firstSideBlurred = nativeResult.firstSideBlurred;
5465

@@ -84,7 +95,12 @@ export class BlinkCardRecognizerResult extends RecognizerResult {
8495
this.scanningFirstSideDone = nativeResult.scanningFirstSideDone;
8596

8697
/**
87-
* Wheater the second scanned side is blurred.
98+
* Whether the second scanned side is anonymized.
99+
*/
100+
this.secondSideAnonymized = nativeResult.secondSideAnonymized;
101+
102+
/**
103+
* Whether the second scanned side is blurred.
88104
*/
89105
this.secondSideBlurred = nativeResult.secondSideBlurred;
90106

@@ -110,6 +126,13 @@ export class BlinkCardRecognizer extends Recognizer {
110126
*/
111127
this.allowBlurFilter = true;
112128

129+
/**
130+
* Whether invalid card number is accepted.
131+
*
132+
*
133+
*/
134+
this.allowInvalidCardNumber = false;
135+
113136
/**
114137
* Defines whether sensitive data should be redacted from the result.
115138
*
@@ -161,6 +184,20 @@ export class BlinkCardRecognizer extends Recognizer {
161184
*/
162185
this.fullDocumentImageExtensionFactors = new ImageExtensionFactors();
163186

187+
/**
188+
* This parameter is used to adjust heuristics that eliminate cases when the hand is present.
189+
*
190+
*
191+
*/
192+
this.handDocumentOverlapThreshold = 0.05;
193+
194+
/**
195+
* Hand scale is calculated as a ratio between area of hand mask and document mask.
196+
*
197+
*
198+
*/
199+
this.handScaleThreshold = 0.15;
200+
164201
/**
165202
* Pading is a minimum distance from the edge of the frame and is defined as a percentage of the frame width. Default value is 0.0f and in that case
166203
* padding edge and image edge are the same.
@@ -170,13 +207,27 @@ export class BlinkCardRecognizer extends Recognizer {
170207
*/
171208
this.paddingEdge = 0.0;
172209

210+
/**
211+
* Photocopy analysis match level - higher if stricter.
212+
*
213+
*
214+
*/
215+
this.photocopyAnalysisMatchLevel = BlinkCardMatchLevel.Level5;
216+
173217
/**
174218
* Sets whether full document image of ID card should be extracted.
175219
*
176220
*
177221
*/
178222
this.returnFullDocumentImage = false;
179223

224+
/**
225+
* Screen analysis match level - higher if stricter.
226+
*
227+
*
228+
*/
229+
this.screenAnalysisMatchLevel = BlinkCardMatchLevel.Level5;
230+
180231
this.createResultFromNative = function (nativeResult) { return new BlinkCardRecognizerResult(nativeResult); }
181232
}
182233
}

0 commit comments

Comments
 (0)