react-native-kalapa-ekyc 1.2.3 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,7 +3,11 @@
3
3
  Complete guide for integrating Kalapa eKYC functionality into your React Native applications.
4
4
  ---
5
5
  ## Changelog
6
-
6
+ ### 1.2.5
7
+ - **Android**: Fix NFC step error UNKNOWN rarely happens on some device like Samsung Note 10
8
+ ### 1.2.4
9
+ - **Android**: Optimize UI / UX in NFC step
10
+ - **React-Native**: show to skip / show confirm screen.
7
11
  ### 1.2.3
8
12
  - **Android**: Optimize UI / UX in NFC step
9
13
  ### 1.2.2
@@ -95,7 +99,7 @@ Add to your `app/package.json`:
95
99
 
96
100
  ```json
97
101
  "dependencies": {
98
- "react-native-kalapa-ekyc": "^1.2.0"
102
+ "react-native-kalapa-ekyc": "^1.2.4"
99
103
  }
100
104
  ```
101
105
 
@@ -163,7 +167,8 @@ let configInfo = {
163
167
  face_data: <FACE_DATA>,
164
168
  mrz: <INPUT_MRZ>,
165
169
  qr_code: <INPUT_QR_CODE>,
166
- allow_mrz_rescan_on_nfc_mismatch: <ALLOW_MRZ_RESCAN_ON_NFC_MISMATCH>
170
+ allow_mrz_rescan_on_nfc_mismatch: <ALLOW_MRZ_RESCAN_ON_NFC_MISMATCH>,
171
+ with_confirm_screen: <WITH_CONFIRM_SCREEN>
167
172
  }
168
173
  ```
169
174
 
@@ -184,6 +189,7 @@ let configInfo = {
184
189
  | `INPUT_MRZ` | String | Pre-filled MRZ data. If valid, skips MRZ scan step. Invalid input throws `INVALID_MRZ` error |
185
190
  | `INPUT_QR_CODE` | String | Pre-filled QR code. If valid, skips QR scan step. Invalid input throws `INVALID_QR` error |
186
191
  | `ALLOW_MRZ_RESCAN_ON_NFC_MISMATCH` | Boolean | If `true`, allows user to rescan MRZ when chip data doesn't match input MRZ |
192
+ | `WITH_CONFIRM_SCREEN` | Boolean | If `true`, allows user to enter confirm step |
187
193
 
188
194
  ---
189
195
 
@@ -56,5 +56,5 @@ dependencies {
56
56
  //noinspection GradleDynamicVersion
57
57
  implementation "com.facebook.react:react-native:+" // From node_modules
58
58
  //kalapasdk
59
- implementation 'vn.kalapa:ekyc:2.11.1'
59
+ implementation 'vn.kalapa:ekyc:2.11.4'
60
60
  }
@@ -64,6 +64,7 @@ public class KalapaEkycModule extends ReactContextBaseJavaModule {
64
64
  String qrCode = data.getString("qr_code") != null ? data.getString("qr_code") : "";
65
65
  String sessionId = data.getString("session_id") != null ? data.getString("session_id") : "";
66
66
  boolean allowMrzRescanOnNfcMismatch = data.getBoolean("allow_mrz_rescan_on_nfc_mismatch");
67
+ boolean withConfirmScreen = data.getBoolean("with_confirm_screen");
67
68
  Context context = getReactApplicationContext();
68
69
  if (getCurrentActivity() != null) {
69
70
  KalapaSDKConfig klpConfig = new KalapaSDKConfig.KalapaSDKConfigBuilder(getCurrentActivity())
@@ -76,6 +77,7 @@ public class KalapaEkycModule extends ReactContextBaseJavaModule {
76
77
  .withBtnTextColor(btnTextColor)
77
78
  .withLanguage(language)
78
79
  .withLivenessVersion(livenessVersion)
80
+ .skipConfirm(!withConfirmScreen)
79
81
  .withAllowMRZRescanOnNFCMismatch(allowMrzRescanOnNfcMismatch)
80
82
  .build();
81
83
 
package/ios/KalapaEkyc.m CHANGED
@@ -30,6 +30,8 @@ RCT_EXPORT_METHOD(start:(NSString *)session
30
30
  NSString *sessionID = data[@"session_id"];
31
31
  id val = data[@"allow_mrz_rescan_on_nfc_mismatch"];
32
32
  BOOL allowMRZRescanOnNfcMismatch = [val isKindOfClass:NSNumber.class] ? [val boolValue] : NO;
33
+ id withConfirmScreenVal = data[@"with_confirm_screen"];
34
+ BOOL withConfirmScreen = [withConfirmScreenVal isKindOfClass:NSNumber.class] ? [withConfirmScreenVal boolValue] : NO;
33
35
 
34
36
  KLPThemeColor *themeColor = [[[KLPThemeColor Builder]
35
37
  withSuccessColor:successColor]
@@ -52,7 +54,9 @@ RCT_EXPORT_METHOD(start:(NSString *)session
52
54
  appearance:klpAppearance
53
55
  mrz:mrz
54
56
  faceData:faceData
55
- allowMRZRescanOnNfcMismatch:allowMRZRescanOnNfcMismatch];
57
+ allowMRZRescanOnNfcMismatch:allowMRZRescanOnNfcMismatch
58
+ withShowConfirmScreen:withConfirmScreen
59
+ ];
56
60
 
57
61
  if (sessionID != nil) {
58
62
  [klpConfig withSession:sessionID];
@@ -74,7 +78,7 @@ RCT_EXPORT_METHOD(start:(NSString *)session
74
78
  }];
75
79
 
76
80
  [klpConfig withResultHandler:^(KalapaResult * _Nullable result) {
77
- NSDictionary *jsonResult = [self handleResult:result];
81
+ NSDictionary *jsonResult = [self handleResult:result];
78
82
  resolve(jsonResult);
79
83
  }];
80
84
 
@@ -102,13 +106,15 @@ RCT_EXPORT_METHOD(start:(NSString *)session
102
106
  appearance:(KLPAppearance *)appearance
103
107
  mrz:(NSString *)mrz
104
108
  faceData:(NSString *)faceData
105
- allowMRZRescanOnNfcMismatch:(BOOL)allowMRZRescanOnNfcMismatch {
106
- KLPConfig *config = [[[[[[KLPConfig BuilderWithSession:session]
109
+ allowMRZRescanOnNfcMismatch:(BOOL)allowMRZRescanOnNfcMismatch
110
+ withShowConfirmScreen:(BOOL)withConfirmScreen {
111
+ KLPConfig *config = [[[[[[[KLPConfig BuilderWithSession:session]
107
112
  withBaseUrl:domain]
108
113
  withLivenessVersion:livenessVersion]
109
114
  withAppearance:appearance]
110
115
  withMRZ:mrz]
111
- withFaceDataBase64:faceData];
116
+ withFaceDataBase64:faceData]
117
+ withShowConfirmScreen:withConfirmScreen];
112
118
  return config;
113
119
  }
114
120
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-kalapa-ekyc",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "React Native SDK for Kalapa eKYC integration",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",