Skip to content

Commit

Permalink
Merge pull request #1 from blinkcard/release/v2.4.0
Browse files Browse the repository at this point in the history
Release/v2.4.0
  • Loading branch information
markosopcic authored Aug 25, 2021
2 parents ea170e7 + 3fd1b8e commit 8d5b58e
Show file tree
Hide file tree
Showing 15 changed files with 320 additions and 209 deletions.
2 changes: 1 addition & 1 deletion BlinkCard/blinkcard-react-native.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ Pod::Spec.new do |s|
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.3.0'
s.dependency 'MBBlinkCard', '~> 2.4.0'
s.frameworks = 'UIKit'
end
4 changes: 2 additions & 2 deletions BlinkCard/overlays/blinkCardOverlays.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import { OverlaySettings } from '../overlaySettings'
export class BlinkCardOverlaySettings extends OverlaySettings {
constructor() {
super('BlinkCardOverlaySettings');
/**
/**
* String: user instructions that are shown above camera preview while the first side of the
* document is being scanned.
* If null, default value will be used.
*/
this.firstSideInstructions = null;
/**
/**
* String: user instructions that are shown above camera preview while the second side of the
* document is being scanned.
* If null, default value will be used.
Expand Down
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.3.0",
"version": "2.4.0",
"description": "AI-driven credit card scanning for cross-platform apps built with ReactNative.",
"main": "index.js",
"repository": {
Expand Down
65 changes: 46 additions & 19 deletions BlinkCard/recognizers/blinkCardRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ export class BlinkCardRecognizerResult extends RecognizerResult {
this.cardNumberPrefix = nativeResult.cardNumberPrefix;

/**
* Flag which indicatew whether the payment card number is valid or not.
* The payment card number is valid
*/
this.cardNumberValid = nativeResult.cardNumberValid;

/**
* Payment card's security code/value.
* Payment card's security code/value.
*/
this.cvv = nativeResult.cvv;

/**
* Defines digital signature of recognition results.
* Digital signature of the recognition result. Available only if enabled with signResult property.
*/
this.digitalSignature = nativeResult.digitalSignature;

/**
* Defines digital signature version.
* Version of the digital signature. Available only if enabled with signResult property.
*/
this.digitalSignatureVersion = nativeResult.digitalSignatureVersion;

Expand All @@ -58,7 +58,7 @@ export class BlinkCardRecognizerResult extends RecognizerResult {
this.expiryDate = nativeResult.expiryDate != null ? new Date(nativeResult.expiryDate) : null;

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

Expand All @@ -78,7 +78,7 @@ export class BlinkCardRecognizerResult extends RecognizerResult {
this.issuer = nativeResult.issuer;

/**
* Information about the payment card owner.
* Information about the payment card owner (name, company, etc.).
*/
this.owner = nativeResult.owner;

Expand All @@ -88,12 +88,13 @@ export class BlinkCardRecognizerResult extends RecognizerResult {
this.processingStatus = nativeResult.processingStatus;

/**
* {true} if recognizer has finished scanning first side and is now scanning back side,
* Returns true if recognizer has finished scanning first side and is now scanning back side,
* false if it's still scanning first side.
*/
this.scanningFirstSideDone = nativeResult.scanningFirstSideDone;

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

Expand All @@ -106,64 +107,90 @@ export class BlinkCardRecognizerResult extends RecognizerResult {
}

/**
* Recognizer used for scanning both sides of payment cards.
* Recognizer used for scanning credit/debit cards.
*/
export class BlinkCardRecognizer extends Recognizer {
constructor() {
super('BlinkCardRecognizer');

/**
* Whether blured frames filtering is allowed.
* Defines whether blured frames filtering is allowed
*
*
*/
this.allowBlurFilter = true;

/**
* The settings which control the anonymization of returned data.
* Defines whether sensitive data should be redacted from the result.
*
*
*/
this.anonymizationSettings = new BlinkCardAnonymizationSettings();

/**
* Should extract the card CVV
* Should extract CVV
*
*
*/
this.extractCvv = true;

/**
* Should extract the payment card's expiry date.
* Should extract the payment card's month of expiry
*
*
*/
this.extractExpiryDate = true;

/**
* Should extract the card IBAN
* Should extract the payment card's IBAN
*
*
*/
this.extractIban = true;

/**
* Should extract the card owner information
*
*
*/
this.extractOwner = true;

/**
* The DPI (Dots Per Inch) for full document image that should be returned.
* Property for setting DPI for full document images
* Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception
*
*
*/
this.fullDocumentImageDpi = 250;

/**
* The extension factors for full document image.
* Image extension factors for full document image.
*
* @see CImageExtensionFactors
*
*/
this.fullDocumentImageExtensionFactors = new ImageExtensionFactors();

/**
* Padding is a minimum distance from the edge of the frame and it is defined as a percentage
* 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.
* Recommended value is 0.02f.
*
*
*/
this.paddingEdge = 0.0;

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

/**
* Defines whether or not recognition result should be signed.
* Whether or not recognition result should be signed.
*
*
*/
this.signResult = false;

Expand Down
58 changes: 43 additions & 15 deletions BlinkCard/recognizers/legacyBlinkCardEliteRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,35 @@ export class LegacyBlinkCardEliteRecognizerResult extends RecognizerResult {
this.cardNumber = nativeResult.cardNumber;

/**
* Payment card's security code/value.
* Payment card's security code/value
*/
this.cvv = nativeResult.cvv;

/**
* Defines digital signature of recognition results.
* Digital signature of the recognition result. Available only if enabled with signResult property.
*/
this.digitalSignature = nativeResult.digitalSignature;

/**
* Defines digital signature version.
* Version of the digital signature. Available only if enabled with signResult property.
*/
this.digitalSignatureVersion = nativeResult.digitalSignatureVersion;

/**
* Defines result of the data matching algorithm for scanned parts/sides of the document.
* Returns CDataMatchResultSuccess if data from scanned parts/sides of the document match,
* CDataMatchResultFailed otherwise. For example if date of expiry is scanned from the front and back side
* of the document and values do not match, this method will return CDataMatchResultFailed. Result will
* be CDataMatchResultSuccess only if scanned values for all fields that are compared are the same.
*/
this.documentDataMatch = nativeResult.documentDataMatch;

/**
* Back side image of the document
* back side image of the document if enabled with returnFullDocumentImage property.
*/
this.fullDocumentBackImage = nativeResult.fullDocumentBackImage;

/**
* Front side image of the document
* front side image of the document if enabled with returnFullDocumentImage property.
*/
this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage;

Expand All @@ -63,12 +66,13 @@ export class LegacyBlinkCardEliteRecognizerResult extends RecognizerResult {
this.inventoryNumber = nativeResult.inventoryNumber;

/**
* Information about the payment card owner (name, company, etc.)
* Information about the payment card owner (name, company, etc.).
*/
this.owner = nativeResult.owner;

/**
* {true} if recognizer has finished scanning first side and is now scanning back side,
* Returns true if recognizer has finished scanning first side and is now scanning back side,
* false if it's still scanning first side.
*/
this.scanningFirstSideDone = nativeResult.scanningFirstSideDone;

Expand All @@ -81,64 +85,88 @@ export class LegacyBlinkCardEliteRecognizerResult extends RecognizerResult {
}

/**
* Recognizer used for scanning both sides of elite payment cards.
* Recognizer used for scanning the front side of elite credit/debit cards.
*/
export class LegacyBlinkCardEliteRecognizer extends Recognizer {
constructor() {
super('LegacyBlinkCardEliteRecognizer');

/**
* Should anonymize the card number area (redact image pixels) on the document image result
*
*
*/
this.anonymizeCardNumber = false;

/**
* Should anonymize the CVV area (redact image pixels) on the document image result
* Should anonymize the CVV on the document image result
*
*
*/
this.anonymizeCvv = false;

/**
* Should anonymize the owner area (redact image pixels) on the document image result
*
*
*/
this.anonymizeOwner = false;

/**
* Defines whether glare detector is enabled.
* Defines if glare detection should be turned on/off.
*
*
*/
this.detectGlare = true;

/**
* Should extract the card's inventory number
*
*
*/
this.extractInventoryNumber = true;

/**
* Should extract the card owner information
*
*
*/
this.extractOwner = true;

/**
* Should extract the payment card's month of expiry
*
*
*/
this.extractValidThru = true;

/**
* The DPI (Dots Per Inch) for full document image that should be returned.
* Property for setting DPI for full document images
* Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception
*
*
*/
this.fullDocumentImageDpi = 250;

/**
* The extension factors for full document image.
* Image extension factors for full document image.
*
* @see CImageExtensionFactors
*
*/
this.fullDocumentImageExtensionFactors = new ImageExtensionFactors();

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

/**
* Defines whether or not recognition result should be signed.
* Whether or not recognition result should be signed.
*
*
*/
this.signResult = false;

Expand Down
Loading

0 comments on commit 8d5b58e

Please sign in to comment.