react-native-kalapa-ekyc 1.2.2 → 1.2.4

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.4
7
+ - **Android**: Optimize UI / UX in NFC step
8
+ - **React-Native**: show to skip / show confirm screen.
9
+ ### 1.2.3
10
+ - **Android**: Optimize UI / UX in NFC step
7
11
  ### 1.2.2
8
12
  - **iOS**: Maintain UI config
9
13
  - **Android**: Maintain / Optimize NFC step
@@ -93,7 +97,7 @@ Add to your `app/package.json`:
93
97
 
94
98
  ```json
95
99
  "dependencies": {
96
- "react-native-kalapa-ekyc": "^1.2.0"
100
+ "react-native-kalapa-ekyc": "^1.2.4"
97
101
  }
98
102
  ```
99
103
 
@@ -161,7 +165,8 @@ let configInfo = {
161
165
  face_data: <FACE_DATA>,
162
166
  mrz: <INPUT_MRZ>,
163
167
  qr_code: <INPUT_QR_CODE>,
164
- allow_mrz_rescan_on_nfc_mismatch: <ALLOW_MRZ_RESCAN_ON_NFC_MISMATCH>
168
+ allow_mrz_rescan_on_nfc_mismatch: <ALLOW_MRZ_RESCAN_ON_NFC_MISMATCH>,
169
+ with_confirm_screen: <WITH_CONFIRM_SCREEN>
165
170
  }
166
171
  ```
167
172
 
@@ -182,6 +187,7 @@ let configInfo = {
182
187
  | `INPUT_MRZ` | String | Pre-filled MRZ data. If valid, skips MRZ scan step. Invalid input throws `INVALID_MRZ` error |
183
188
  | `INPUT_QR_CODE` | String | Pre-filled QR code. If valid, skips QR scan step. Invalid input throws `INVALID_QR` error |
184
189
  | `ALLOW_MRZ_RESCAN_ON_NFC_MISMATCH` | Boolean | If `true`, allows user to rescan MRZ when chip data doesn't match input MRZ |
190
+ | `WITH_CONFIRM_SCREEN` | Boolean | If `true`, allows user to enter confirm step |
185
191
 
186
192
  ---
187
193
 
@@ -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.0'
59
+ implementation 'vn.kalapa:ekyc:2.11.3'
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.2",
3
+ "version": "1.2.4",
4
4
  "description": "React Native SDK for Kalapa eKYC integration",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",