Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v2.9.0 #7

Merged
merged 6 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BlinkCard/blinkcard-react-native.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Pod::Spec.new do |s|
s.authors = package['author']
s.homepage = package['homepage']
s.license = package['license']
s.platform = :ios, "12.0"
s.platform = :ios, "13.0"
s.source = { :git => "https://github.com/BlinkCard/blinkcard-react-native.git", :tag => "v#{s.version}" }
s.source_files = "src/ios", "src/ios/**/*.{h,m}"
s.dependency 'React'
s.dependency 'MBBlinkCard', '~> 2.6.0'
s.dependency 'MBBlinkCard', '~> 2.9.0'
s.frameworks = 'UIKit'
end
4 changes: 1 addition & 3 deletions BlinkCard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,4 @@ export * from './overlays/blinkCardOverlays'

// export recognizers that can be used and their results
export * from './recognizers/successFrameGrabberRecognizer'
export * from './recognizers/blinkCardRecognizer'
export * from './recognizers/legacyBlinkCardEliteRecognizer'
export * from './recognizers/legacyBlinkCardRecognizer'
export * from './recognizers/blinkCardRecognizer'
48 changes: 48 additions & 0 deletions BlinkCard/overlays/blinkCardOverlays.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,53 @@ export class BlinkCardOverlaySettings extends OverlaySettings {
* Default: true
*/
this.showFlashlightWarning = true;
/**
* String: Instructions for the user to move the document closer
*
* If null, default value will be used.
*/
this.errorMoveCloser = null;
/**
* String: Instructions for the user to move the document farther
*
* If null, default value will be used.
*/
this.errorMoveFarther = null;
/**
* String: Instructions for the user to move the document from the edge
*
* If null, default value will be used.
*/
this.errorCardTooCloseToEdge = null;
/**
* Defines whether button for presenting onboarding screens will be present on screen
*
* Default: true
*/
this.showOnboardingInfo = true;
/**
* Defines whether button for presenting onboarding screens will be present on screen
*
* Default: true
*/
this.showIntroductionDialog = true;
/**
* Option to configure when the onboarding help tooltip will appear.
*
* Default: 8000
*/
this.onboardingButtonTooltipDelay = 8000;
/**
* Language of the UI.
* If default overlay contains textual information, text will be localized to this language. Otherwise device langauge will be used
* example: "en"
*/
this.language = null;
/**
* Used with language variable, it defines the country locale
*
* example: "US" to use "en_US" on Android and en-US on iOS
*/
this.country = null;
}
}
2 changes: 1 addition & 1 deletion BlinkCard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BlinkCard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microblink/blinkcard-react-native",
"version": "2.6.0",
"version": "2.9.0",
"description": "AI-driven credit card scanning for cross-platform apps built with ReactNative.",
"main": "index.js",
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions BlinkCard/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export class Parser {
export const ParserResultState = Object.freeze(
{
/** Parser result is empty */
empty : 1,
empty : 0,
/** Parser result contains some values, but is incomplete or it contains all values, but some are uncertain */
uncertain : 2,
uncertain : 1,
/** Parser result contains all required values */
valid : 3
valid : 2
}
);

Expand Down
8 changes: 4 additions & 4 deletions BlinkCard/recognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ export class Recognizer {
export const RecognizerResultState = Object.freeze(
{
/** Recognizer result is empty */
empty : 1,
empty : 0,
/** Recognizer result contains some values, but is incomplete or it contains all values, but some are uncertain */
uncertain : 2,
uncertain : 1,
/** Recognizer result contains all required values */
valid : 3,
stageValid: 4
valid : 2,
stageValid: 3
}
);

Expand Down
57 changes: 54 additions & 3 deletions BlinkCard/recognizers/blinkCardRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import {
Quadrilateral,


LegacyCardIssuer,
Issuer,
BlinkCardProcessingStatus,
BlinkCardAnonymizationMode,
CardNumberAnonymizationSettings,
BlinkCardAnonymizationSettings,
BlinkCardMatchLevel,
BlinkCardCheckResult,
ImageExtensionFactors,
DataMatchResult,
} from '../types'
Expand Down Expand Up @@ -42,13 +43,23 @@ export class BlinkCardRecognizerResult extends RecognizerResult {
*/
this.cvv = nativeResult.cvv;

/**
* Document liveness check (screen, photocopy, hand presence) which can pass or fail.
*/
this.documentLivenessCheck = nativeResult.documentLivenessCheck;

/**
* The payment card's expiry date.
*/
this.expiryDate = nativeResult.expiryDate != null ? new Date(nativeResult.expiryDate) : null;

/**
* Wheater the first scanned side is blurred.
* Whether the first scanned side is anonymized.
*/
this.firstSideAnonymized = nativeResult.firstSideAnonymized;

/**
* Whether the first scanned side is blurred.
*/
this.firstSideBlurred = nativeResult.firstSideBlurred;

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

/**
* Wheater the second scanned side is blurred.
* Whether the second scanned side is anonymized.
*/
this.secondSideAnonymized = nativeResult.secondSideAnonymized;

/**
* Whether the second scanned side is blurred.
*/
this.secondSideBlurred = nativeResult.secondSideBlurred;

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

/**
* Whether invalid card number is accepted.
*
*
*/
this.allowInvalidCardNumber = false;

/**
* Defines whether sensitive data should be redacted from the result.
*
Expand Down Expand Up @@ -161,6 +184,20 @@ export class BlinkCardRecognizer extends Recognizer {
*/
this.fullDocumentImageExtensionFactors = new ImageExtensionFactors();

/**
* This parameter is used to adjust heuristics that eliminate cases when the hand is present.
*
*
*/
this.handDocumentOverlapThreshold = 0.05;

/**
* Hand scale is calculated as a ratio between area of hand mask and document mask.
*
*
*/
this.handScaleThreshold = 0.15;

/**
* 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
* padding edge and image edge are the same.
Expand All @@ -170,13 +207,27 @@ export class BlinkCardRecognizer extends Recognizer {
*/
this.paddingEdge = 0.0;

/**
* Photocopy analysis match level - higher if stricter.
*
*
*/
this.photocopyAnalysisMatchLevel = BlinkCardMatchLevel.Level5;

/**
* Sets whether full document image of ID card should be extracted.
*
*
*/
this.returnFullDocumentImage = false;

/**
* Screen analysis match level - higher if stricter.
*
*
*/
this.screenAnalysisMatchLevel = BlinkCardMatchLevel.Level5;

this.createResultFromNative = function (nativeResult) { return new BlinkCardRecognizerResult(nativeResult); }
}
}
Loading