react-native-hyperkyc-sdk 0.3.0 → 0.3.1-alpha01
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
|
@@ -19,24 +19,10 @@ const { Hyperkyc } = NativeModules
|
|
|
19
19
|
var configDictionary = {};
|
|
20
20
|
configDictionary["appId"] = appID
|
|
21
21
|
configDictionary["appKey"] = appKey
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
|
|
23
|
+
|
|
24
24
|
configDictionary["transactionId"] = transactionId
|
|
25
|
-
configDictionary["
|
|
26
|
-
type: "document",
|
|
27
|
-
countryId:"ind",
|
|
28
|
-
documentId:"pan",
|
|
29
|
-
useForFaceMatch: true
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
type: "document",
|
|
33
|
-
useForFaceMatch: true
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
type: "face"
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
]);
|
|
25
|
+
configDictionary["workflowId"] = "<workflow-id>"
|
|
40
26
|
Hyperkyc.launch(configDictionary, function(response){
|
|
41
27
|
console.log(response)
|
|
42
28
|
})
|
|
@@ -12,6 +12,8 @@ import org.json.JSONObject;
|
|
|
12
12
|
import java.util.Iterator;
|
|
13
13
|
|
|
14
14
|
public class HyperkycSdkUtils {
|
|
15
|
+
static String[] skipVariables = new String[]{"variables"};
|
|
16
|
+
|
|
15
17
|
public static WritableArray convertJsonToArray(JSONArray jsonArray) throws JSONException {
|
|
16
18
|
WritableArray array = new WritableNativeArray();
|
|
17
19
|
|
|
@@ -43,6 +45,7 @@ public class HyperkycSdkUtils {
|
|
|
43
45
|
while (iterator.hasNext()) {
|
|
44
46
|
String key = iterator.next();
|
|
45
47
|
Object value = jsonObject.get(key);
|
|
48
|
+
if(!Arrays.asList(skipVariables).contains(key)){
|
|
46
49
|
if (value instanceof JSONObject) {
|
|
47
50
|
map.putMap(key, convertJsonToMap((JSONObject) value));
|
|
48
51
|
} else if (value instanceof JSONArray) {
|
|
@@ -58,6 +61,7 @@ public class HyperkycSdkUtils {
|
|
|
58
61
|
} else {
|
|
59
62
|
map.putString(key, value.toString());
|
|
60
63
|
}
|
|
64
|
+
}
|
|
61
65
|
}
|
|
62
66
|
return map;
|
|
63
67
|
}
|