Browse Source

register changes

new_design
Mohan Shiwakoti 1 year ago
parent
commit
5d77815cc0
  1. 16
      app/src/main/java/com/remit/jmecustomer/features/kyc/newCustomer/gateway/KYCV3Gateway.java
  2. 5
      app/src/main/java/com/remit/jmecustomer/features/registerv3/newcustomer/gateway/NewRegisterV3Gateway.java

16
app/src/main/java/com/remit/jmecustomer/features/kyc/newCustomer/gateway/KYCV3Gateway.java

@ -57,6 +57,7 @@ public class KYCV3Gateway extends PrivilegedGateway implements KYCV3GatewayInter
HashMap<String, RequestBody> map = new HashMap<>(); HashMap<String, RequestBody> map = new HashMap<>();
map.put("userId", createStringUploadValue(requestBody.getUserId())); map.put("userId", createStringUploadValue(requestBody.getUserId()));
map.put("type", createStringUploadValue(requestBody.getType())); map.put("type", createStringUploadValue(requestBody.getType()));
map.put("TrustDocId", createStringUploadValue(requestBody.getTrustDockId()));
PersonalInfoDTO personalInfoDTO = requestBody.getPersonalInformation(); PersonalInfoDTO personalInfoDTO = requestBody.getPersonalInformation();
@ -74,7 +75,6 @@ public class KYCV3Gateway extends PrivilegedGateway implements KYCV3GatewayInter
map.put("additionalIdType", createStringUploadValue(personalInfoDTO.getAdditionalIdType())); map.put("additionalIdType", createStringUploadValue(personalInfoDTO.getAdditionalIdType()));
map.put("purposeOfRegistration", createStringUploadValue(personalInfoDTO.getPurposeOfRegistration())); map.put("purposeOfRegistration", createStringUploadValue(personalInfoDTO.getPurposeOfRegistration()));
map.put("RegistrationType", createStringUploadValue(registrationType)); map.put("RegistrationType", createStringUploadValue(registrationType));
map.put("TrustDocId", createStringUploadValue(requestBody.getTrustDockId()));
} }
File faceImageFile = null; File faceImageFile = null;
@ -91,8 +91,8 @@ public class KYCV3Gateway extends PrivilegedGateway implements KYCV3GatewayInter
backIdImageFile = requestBody.getPictures().getBackIdImageFile(); backIdImageFile = requestBody.getPictures().getBackIdImageFile();
// sideIdImageFile = requestBody.getPictures().getSideIdImageFile(); // sideIdImageFile = requestBody.getPictures().getSideIdImageFile();
additionalIdImageFile = requestBody.getPictures().getAdditionalIdImageFile(); additionalIdImageFile = requestBody.getPictures().getAdditionalIdImageFile();
for(IDTextDTO item: kycRelatedDataDTO.getAdditionalIdType()){
if(item.getId().equalsIgnoreCase(personalInfoDTO.getAdditionalIdType()) && item.getBackRequired()){
for (IDTextDTO item : kycRelatedDataDTO.getAdditionalIdType()) {
if (item.getId().equalsIgnoreCase(personalInfoDTO.getAdditionalIdType()) && item.getBackRequired()) {
additionalIdBackImageFile = requestBody.getPictures().getAdditionalIdBackImageFile(); additionalIdBackImageFile = requestBody.getPictures().getAdditionalIdBackImageFile();
} }
} }
@ -168,7 +168,7 @@ public class KYCV3Gateway extends PrivilegedGateway implements KYCV3GatewayInter
kycRelatedDataDTO.setPersonalInformation(mockedPersonalInfo); kycRelatedDataDTO.setPersonalInformation(mockedPersonalInfo);
PicturesDTO mockedPictures= new PicturesDTO();
PicturesDTO mockedPictures = new PicturesDTO();
mockedPictures.setIdFront("https://www.whizzprints.com/blogimage/identity-card-78188.png"); mockedPictures.setIdFront("https://www.whizzprints.com/blogimage/identity-card-78188.png");
mockedPictures.setIdBack("https://www.whizzprints.com/blogimage/volunteer-id-card-71891.png"); mockedPictures.setIdBack("https://www.whizzprints.com/blogimage/volunteer-id-card-71891.png");
mockedPictures.setIdSide("https://www.whizzprints.com/blogimage/atm-card-72818.png"); mockedPictures.setIdSide("https://www.whizzprints.com/blogimage/atm-card-72818.png");
@ -189,7 +189,7 @@ public class KYCV3Gateway extends PrivilegedGateway implements KYCV3GatewayInter
jsonObject.addProperty(Constants.USER_ID_KEY, userId); jsonObject.addProperty(Constants.USER_ID_KEY, userId);
jsonObject.addProperty(Constants.OTP_KEY, OTP); jsonObject.addProperty(Constants.OTP_KEY, OTP);
jsonObject.addProperty(Constants.REQUEST_FOR_KEY, requestFor); jsonObject.addProperty(Constants.REQUEST_FOR_KEY, requestFor);
return HttpClientV2.getInstance().verifyEmailCode(auth,jsonObject);
return HttpClientV2.getInstance().verifyEmailCode(auth, jsonObject);
} }
@Override @Override
@ -207,16 +207,16 @@ public class KYCV3Gateway extends PrivilegedGateway implements KYCV3GatewayInter
@Override @Override
public Observable<ResponseBody> agreeToUserTermsAndConditions(String basicAuth, String userID, String agreed) { public Observable<ResponseBody> agreeToUserTermsAndConditions(String basicAuth, String userID, String agreed) {
return HttpClientV2.getInstance().agreeToTermsAndCondition(basicAuth,userID,agreed);
return HttpClientV2.getInstance().agreeToTermsAndCondition(basicAuth, userID, agreed);
} }
@Override @Override
public Observable<ResponseBody> getKycSettings(String auth, JsonObject jsonObject) { public Observable<ResponseBody> getKycSettings(String auth, JsonObject jsonObject) {
return HttpClientV2.getInstance().getKycSetting(auth , jsonObject);
return HttpClientV2.getInstance().getKycSetting(auth, jsonObject);
} }
@Override @Override
public Observable<ResponseBody> saveKycSettings(String auth, JsonObject jsonObject) { public Observable<ResponseBody> saveKycSettings(String auth, JsonObject jsonObject) {
return HttpClientV2.getInstance().saveKycSetting(auth , jsonObject);
return HttpClientV2.getInstance().saveKycSetting(auth, jsonObject);
} }
} }

5
app/src/main/java/com/remit/jmecustomer/features/registerv3/newcustomer/gateway/NewRegisterV3Gateway.java

@ -1,5 +1,7 @@
package com.remit.jmecustomer.features.registerv3.newcustomer.gateway; package com.remit.jmecustomer.features.registerv3.newcustomer.gateway;
import static com.remit.jmecustomer.utils.Constants.FOREIGNER_TYPE;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Context; import android.content.Context;
@ -59,8 +61,9 @@ public class NewRegisterV3Gateway extends PrivilegedGateway implements NewRegist
@Override @Override
public Observable<ResponseBody> validateParameters(String userID, String fullName, String dob) { public Observable<ResponseBody> validateParameters(String userID, String fullName, String dob) {
String selectedNationality = RemitApplication.getStorage().getString(PrefKeys.SELECTED_NATIONALITY, "");
JsonObject jsonObject = new JsonObject(); JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("IdType", "residenceId");
jsonObject.addProperty("IdType", selectedNationality.equalsIgnoreCase(FOREIGNER_TYPE) ? "RESIDENCE" : "DRIVING_LICENCE");
jsonObject.addProperty("IdNumber", userID); jsonObject.addProperty("IdNumber", userID);
jsonObject.addProperty("FullName", fullName); jsonObject.addProperty("FullName", fullName);
jsonObject.addProperty("DOB", dob); jsonObject.addProperty("DOB", dob);

Loading…
Cancel
Save