facia-mobilesdk 0.0.7 → 0.0.8
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.
|
@@ -23,22 +23,6 @@ public class FaciaReactNativeModule extends ReactContextBaseJavaModule {
|
|
|
23
23
|
|
|
24
24
|
private final static String LOG_TAG = "FaciaModule";
|
|
25
25
|
|
|
26
|
-
@ReactMethod
|
|
27
|
-
public DocumentType ID_CARD(){
|
|
28
|
-
return DocumentType.ID_CARD;
|
|
29
|
-
}
|
|
30
|
-
@ReactMethod
|
|
31
|
-
public DocumentType PASSPORT(){
|
|
32
|
-
return DocumentType.PASSPORT;
|
|
33
|
-
}
|
|
34
|
-
@ReactMethod
|
|
35
|
-
public DocumentType OTHERS(){
|
|
36
|
-
return DocumentType.OTHERS;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
public final DocumentType ID_CARD = DocumentType.ID_CARD;
|
|
40
|
-
public final DocumentType PASSPORT = DocumentType.PASSPORT;
|
|
41
|
-
public final DocumentType OTHERS = DocumentType.OTHERS;
|
|
42
26
|
|
|
43
27
|
public FaciaReactNativeModule(@NonNull ReactApplicationContext reactContext) {
|
|
44
28
|
super(reactContext);
|
|
@@ -51,11 +35,23 @@ public class FaciaReactNativeModule extends ReactContextBaseJavaModule {
|
|
|
51
35
|
}
|
|
52
36
|
|
|
53
37
|
@ReactMethod
|
|
54
|
-
public void verify(String configObject, Callback callback) {
|
|
38
|
+
public void verify(String docType,String configObject, Callback callback) {
|
|
55
39
|
try {
|
|
56
40
|
|
|
41
|
+
|
|
57
42
|
JSONObject configJson = new JSONObject(configObject);
|
|
58
43
|
|
|
44
|
+
if (docType.equalsIgnoreCase("ID_CARD"))
|
|
45
|
+
{
|
|
46
|
+
configJson.put("documentType", DocumentType.ID_CARD)
|
|
47
|
+
}else if (docType.equalsIgnoreCase("PASSPORT"))
|
|
48
|
+
{
|
|
49
|
+
configJson.put("documentType", DocumentType.PASSPORT)
|
|
50
|
+
}else
|
|
51
|
+
{
|
|
52
|
+
configJson.put("documentType", DocumentType.OTHERS)
|
|
53
|
+
}
|
|
54
|
+
|
|
59
55
|
FaciaAi faciaAi = new FaciaAi();
|
|
60
56
|
|
|
61
57
|
faciaAi.createRequest(getCurrentActivity(), configJson, responseSet -> {
|