Browse Source

KYC fixes

master
Preyea Regmi 6 years ago
parent
commit
d3b7858505
  1. 7
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/gateway/KYCV2Gateway.java
  2. 2
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2InteractorInterface.java
  3. 2
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2Presenter.java

7
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/gateway/KYCV2Gateway.java

@ -1,5 +1,7 @@
package com.gmeremit.online.gmeremittance_native.kycV2.gateway; package com.gmeremit.online.gmeremittance_native.kycV2.gateway;
import com.gmeremit.online.gmeremittance_native.GmeApplication;
import com.gmeremit.online.gmeremittance_native.base.PrefKeys;
import com.gmeremit.online.gmeremittance_native.base.PrivilegedGateway; import com.gmeremit.online.gmeremittance_native.base.PrivilegedGateway;
import com.gmeremit.online.gmeremittance_native.kycV2.model.KYCRegistrationDataResponse; import com.gmeremit.online.gmeremittance_native.kycV2.model.KYCRegistrationDataResponse;
import com.gmeremit.online.gmeremittance_native.kycV2.model.KYCRelatedDataResponse; import com.gmeremit.online.gmeremittance_native.kycV2.model.KYCRelatedDataResponse;
@ -96,6 +98,11 @@ public class KYCV2Gateway extends PrivilegedGateway implements KYCV2InteractorIn
} }
@Override
public void updateKYCSubmittedFlagLocally(boolean action) {
GmeApplication.getStorage().edit().putBoolean(PrefKeys.USER_KYC_SUBMITTED,action).apply();
}
private MultipartBody.Part createImageUploadFieldFromPath(String key,String imagePath) private MultipartBody.Part createImageUploadFieldFromPath(String key,String imagePath)
{ {

2
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2InteractorInterface.java

@ -45,5 +45,7 @@ public interface KYCV2InteractorInterface extends BaseInteractorInterface {
File back, File back,
File passbook, File passbook,
File passport); File passport);
void updateKYCSubmittedFlagLocally(boolean action);
} }
} }

2
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2Presenter.java

@ -553,6 +553,7 @@ public class KYCV2Presenter extends BasePresenter implements KYCV2PresenterInter
protected void onSuccess(KYCRegistrationDataResponse kycRegistrationDataResponse) { protected void onSuccess(KYCRegistrationDataResponse kycRegistrationDataResponse) {
if(kycRegistrationDataResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) if(kycRegistrationDataResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2))
{ {
gateway.updateKYCSubmittedFlagLocally(true);
view.showPopUpMessage(kycRegistrationDataResponse.getMsg(), CustomAlertDialog.AlertType.SUCCESS, new CustomAlertDialog.CustomDialogActionListener() { view.showPopUpMessage(kycRegistrationDataResponse.getMsg(), CustomAlertDialog.AlertType.SUCCESS, new CustomAlertDialog.CustomDialogActionListener() {
@Override @Override
public void onCutomDialogActionPressed(CustomAlertDialog.AlertType alertType) { public void onCutomDialogActionPressed(CustomAlertDialog.AlertType alertType) {
@ -562,6 +563,7 @@ public class KYCV2Presenter extends BasePresenter implements KYCV2PresenterInter
} }
else else
{ {
view.showPopUpMessage(kycRegistrationDataResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null); view.showPopUpMessage(kycRegistrationDataResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null);
} }
} }

Loading…
Cancel
Save