diff --git a/app/build.gradle b/app/build.gradle index 6d19d5a0..49beb025 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,4 +1,3 @@ - apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.firebase.crashlytics' @@ -6,17 +5,14 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' - - - android { compileSdkVersion 31 defaultConfig { applicationId "com.remit.jmecustomer" minSdkVersion 24 targetSdkVersion 31 - versionCode 13 - versionName "1.0" + versionCode 14 + versionName "1.1" multiDexEnabled true vectorDrawables.useSupportLibrary = true manifestPlaceholders = [fileProvider: "com.remit.jmecustomer.fileprovider"] @@ -76,11 +72,12 @@ android { buildConfigField 'String', 'SecretKey', '"VkYp3s6v"' // TrustDock buildConfigField 'String', 'TrustDockAuthorizationId', '"gC8ULGtvqiwkMqTx4NzQexLL"' - buildConfigField 'String', 'ResidenceCardWithNFCPlanId', '"b1da18ee-fabe-42f0-b7f6-0d375e1f505d"' - buildConfigField 'String', 'SelfieVerificationPlanId', '"ee46f7fd-3988-49cd-a972-1056e498302f"' - buildConfigField 'String', 'ResidenceCardWithoutNFCPlanId', '"9390019a-d41f-42a8-b044-0f41a9825847"' - buildConfigField 'String', 'DrivingLicenseWithoutNFCPlanId', '"f8d1f271-7c95-43bf-bdf8-f84ebe96671d"' - buildConfigField 'String', 'TrustDockVerificationUrl', '"https://api.trustdock.io/v2/verifications?Authorization="' + buildConfigField 'String', 'TrustDockNativeAppSdkToken', '"KYyzZzDyneU6P9CTe8ZaveyK"' + buildConfigField 'String', 'ResidenceCardWithNFCPlanId', '"17f3f05f-f436-41f0-8b1c-434ee2b5e6ec"' + buildConfigField 'String', 'SelfieVerificationPlanId', '"295735e5-022b-44b8-8c35-59604c425daa"' + buildConfigField 'String', 'ResidenceCardWithoutNFCPlanId', '"039cfef5-0248-44c4-8464-25baef241f05"' + buildConfigField 'String', 'DrivingLicenseWithNFCPlanId', '"6eaba29b-3f40-469d-9a7e-afb33252b10e"' + buildConfigField 'String', 'TrustDockVerificationUrl', '"https://api.trustdock.io/v2/verifications"' // debuggable false minifyEnabled true @@ -129,7 +126,7 @@ android { } jme { signingConfig signingConfigs.debug - // buildConfigField 'String', 'BASE_URL', '"http://202.166.220.36:8083/api/"' + // buildConfigField 'String', 'BASE_URL', '"http://202.166.220.36:8083/api/"' buildConfigField 'String', 'BASE_URL', '"https://sandboxapi.japanremit.com:8083/api/"' buildConfigField 'String', 'API_VERSION', '"v1"' buildConfigField 'String', 'BASE_URL_SOCIAL', '"http://10.1.1.171:8080/v1/"' @@ -138,19 +135,21 @@ android { buildConfigField 'String', 'SecretKey', '"QRK2UM0Q"' // TrustDock // UAT - buildConfigField 'String', 'TrustDockAuthorizationId', '"SC5ra2f1GDqMaAVZX289bpuH"' - buildConfigField 'String', 'ResidenceCardWithNFCPlanId', '"b1da18ee-fabe-42f0-b7f6-0d375e1f505d"' - buildConfigField 'String', 'SelfieVerificationPlanId', '"ee46f7fd-3988-49cd-a972-1056e498302f"' - buildConfigField 'String', 'ResidenceCardWithoutNFCPlanId', '"9390019a-d41f-42a8-b044-0f41a9825847"' - buildConfigField 'String', 'DrivingLicenseWithNFCPlanId', '"f8d1f271-7c95-43bf-bdf8-f84ebe96671d"' - buildConfigField 'String', 'TrustDockVerificationUrl', '"https://api.test.trustdock.io/v2/verifications?Authorization="' +// buildConfigField 'String', 'TrustDockAuthorizationId', '"SC5ra2f1GDqMaAVZX289bpuH"' +// buildConfigField 'String', 'TrustDockNativeAppSdkToken', '"rbTme8F4whfAZBuSQcN5gUXr"' +// buildConfigField 'String', 'ResidenceCardWithNFCPlanId', '"b1da18ee-fabe-42f0-b7f6-0d375e1f505d"' +// buildConfigField 'String', 'SelfieVerificationPlanId', '"ee46f7fd-3988-49cd-a972-1056e498302f"' +// buildConfigField 'String', 'ResidenceCardWithoutNFCPlanId', '"9390019a-d41f-42a8-b044-0f41a9825847"' +// buildConfigField 'String', 'DrivingLicenseWithNFCPlanId', '"f8d1f271-7c95-43bf-bdf8-f84ebe96671d"' +// buildConfigField 'String', 'TrustDockVerificationUrl', '"https://api.test.trustdock.io/v2/verifications"' // PROD -// buildConfigField 'String', 'TrustDockAuthorizationId', '"gC8ULGtvqiwkMqTx4NzQexLL"' -// buildConfigField 'String', 'ResidenceCardWithNFCPlanId', '"17f3f05f-f436-41f0-8b1c-434ee2b5e6ec"' -// buildConfigField 'String', 'SelfieVerificationPlanId', '"295735e5-022b-44b8-8c35-59604c425daa"' -// buildConfigField 'String', 'ResidenceCardWithoutNFCPlanId', '"039cfef5-0248-44c4-8464-25baef241f05"' -// buildConfigField 'String', 'DrivingLicenseWithNFCPlanId', '"6eaba29b-3f40-469d-9a7e-afb33252b10e"' -// buildConfigField 'String', 'TrustDockVerificationUrl', '"https://api.trustdock.io/v2/verifications?Authorization="' + buildConfigField 'String', 'TrustDockAuthorizationId', '"gC8ULGtvqiwkMqTx4NzQexLL"' + buildConfigField 'String', 'TrustDockNativeAppSdkToken', '"KYyzZzDyneU6P9CTe8ZaveyK"' + buildConfigField 'String', 'ResidenceCardWithNFCPlanId', '"17f3f05f-f436-41f0-8b1c-434ee2b5e6ec"' + buildConfigField 'String', 'SelfieVerificationPlanId', '"295735e5-022b-44b8-8c35-59604c425daa"' + buildConfigField 'String', 'ResidenceCardWithoutNFCPlanId', '"039cfef5-0248-44c4-8464-25baef241f05"' + buildConfigField 'String', 'DrivingLicenseWithNFCPlanId', '"6eaba29b-3f40-469d-9a7e-afb33252b10e"' + buildConfigField 'String', 'TrustDockVerificationUrl', '"https://api.trustdock.io/v2/verifications"' // debuggable true minifyEnabled false @@ -245,14 +244,12 @@ dependencies { implementation 'androidx.biometric:biometric:1.1.0' - implementation 'io.trustdock.sdk:verification-sandbox-full:2.7.2' + //implementation 'io.trustdock.sdk:verification-sandbox-full:2.7.2' + implementation 'io.trustdock.sdk:verification-full:2.7.4' + implementation 'com.google.android.flexbox:flexbox:3.0.0' implementation 'me.relex:circleindicator:2.1.4' - - - - // if persistence is not needed (Data retained in memory lost on app close) debugImplementation 'com.ashokvarma.android:gander-imdb:3.1.0' releaseImplementation 'com.ashokvarma.android:gander-no-op:3.1.0' @@ -261,11 +258,18 @@ dependencies { allprojects { repositories { maven { - url "https://native-app-sdk-repository.test.trustdock.io/android/release/content/repositories" + //PROD + url "https://native-app-sdk-repository.trustdock.io/android/release/content/repositories" credentials { username = "japanremit-1039" - password = "sHRf5Sf7S3r5Q4Hz" + password = "9sAWcB6ce3GSumTT" } + //UAT +// url "https://native-app-sdk-repository.test.trustdock.io/android/release/content/repositories" +// credentials { +// username = "japanremit-1039" +// password = "sHRf5Sf7S3r5Q4Hz" +// } } maven { url 'https://raw.githubusercontent.com/iProov/android/master/maven/' } } diff --git a/app/src/main/java/com/remit/jmecustomer/features/changetxnpin/presenter/ChangePinV2Presenter.java b/app/src/main/java/com/remit/jmecustomer/features/changetxnpin/presenter/ChangePinV2Presenter.java index 6f9441b0..9eb81add 100644 --- a/app/src/main/java/com/remit/jmecustomer/features/changetxnpin/presenter/ChangePinV2Presenter.java +++ b/app/src/main/java/com/remit/jmecustomer/features/changetxnpin/presenter/ChangePinV2Presenter.java @@ -1,7 +1,9 @@ package com.remit.jmecustomer.features.changetxnpin.presenter; import com.remit.jmecustomer.R; +import com.remit.jmecustomer.RemitApplication; import com.remit.jmecustomer.base.BaseViewModel; +import com.remit.jmecustomer.base.PrefKeys; import com.remit.jmecustomer.common.customwidgets.CustomAlertDialog; import com.remit.jmecustomer.common.model.FormInputStateDTO; import com.remit.jmecustomer.utils.Constants; @@ -44,11 +46,11 @@ public class ChangePinV2Presenter extends BaseViewModel implements ChangePinV2In private void bindView(ChangePinLiveData.ChangePinViewBindings viewBindings) { viewEventCompositeDisposable.add( Observable.combineLatest( - viewBindings.getCurrentPinInputLiveData().map(this.changePinValidator::isCurrentPinValid), - viewBindings.getNewPinInputLiveData().map(this.changePinValidator::isNewPinValid), - viewBindings.getConfirmPinInputLiveData().map(this.changePinValidator::isConfirmPinValid), - (isCurrentPassValid, isNewPasswordValid, isConfirmPasswordValid) -> - isCurrentPassValid && isNewPasswordValid && isConfirmPasswordValid) + viewBindings.getCurrentPinInputLiveData().map(this.changePinValidator::isCurrentPinValid), + viewBindings.getNewPinInputLiveData().map(this.changePinValidator::isNewPinValid), + viewBindings.getConfirmPinInputLiveData().map(this.changePinValidator::isConfirmPinValid), + (isCurrentPassValid, isNewPasswordValid, isConfirmPasswordValid) -> + isCurrentPassValid && isNewPasswordValid && isConfirmPasswordValid) .subscribeWith(new DisposableObserver() { @Override public void onNext(Boolean result) { @@ -91,12 +93,13 @@ public class ChangePinV2Presenter extends BaseViewModel implements ChangePinV2In @Override public boolean validateAllChangePinForm() { + String hasUpdatedCredentials = RemitApplication.getStorage().getString(PrefKeys.HAS_UPDATED_CREDENTIALS, "0"); if ( - changePinValidator.isCurrentPinValid(changePinValidator.currentPin) + (hasUpdatedCredentials.equalsIgnoreCase("5") || changePinValidator.isCurrentPinValid(changePinValidator.currentPin)) && changePinValidator.isNewPinValid(changePinValidator.newPin) && changePinValidator.isConfirmPinValid(changePinValidator.confirmPin) ) { -return true; + return true; } return false; } diff --git a/app/src/main/java/com/remit/jmecustomer/features/changetxnpin/view/ChangeTxnPinActivity.java b/app/src/main/java/com/remit/jmecustomer/features/changetxnpin/view/ChangeTxnPinActivity.java index bf00f31c..1b4f5735 100644 --- a/app/src/main/java/com/remit/jmecustomer/features/changetxnpin/view/ChangeTxnPinActivity.java +++ b/app/src/main/java/com/remit/jmecustomer/features/changetxnpin/view/ChangeTxnPinActivity.java @@ -10,6 +10,8 @@ import androidx.lifecycle.ViewModelProvider; import com.google.android.material.textfield.TextInputEditText; import com.google.android.material.textfield.TextInputLayout; import com.jakewharton.rxbinding3.widget.RxTextView; +import com.remit.jmecustomer.RemitApplication; +import com.remit.jmecustomer.base.PrefKeys; import com.remit.jmecustomer.features.changetxnpin.presenter.ChangePinLiveData; import com.remit.jmecustomer.features.changetxnpin.presenter.ChangePinV2Presenter; import com.remit.jmecustomer.features.changetxnpin.presenter.ChangePinV2PresenterInterface; @@ -128,6 +130,11 @@ public class ChangeTxnPinActivity extends BaseActivity implements ChangePinV2Pre toolbarTitle.setText(getResources().getString(R.string.changepin_text)); iv_cancel.setVisibility(View.INVISIBLE); } + String hasUpdatedCredentials = RemitApplication.getStorage().getString(PrefKeys.HAS_UPDATED_CREDENTIALS, "0"); + if(hasUpdatedCredentials.equalsIgnoreCase("5")){ + currentPin_TxtInputLayout.setVisibility(View.GONE); + toolbarTitle.setText(getResources().getString(R.string.setup_new_pin_title)); + } } @OnClick(R.id.iv_back) diff --git a/app/src/main/java/com/remit/jmecustomer/features/home/presenter/HomeNotificationHandler.java b/app/src/main/java/com/remit/jmecustomer/features/home/presenter/HomeNotificationHandler.java index 4ef5e36e..d5d11ed3 100644 --- a/app/src/main/java/com/remit/jmecustomer/features/home/presenter/HomeNotificationHandler.java +++ b/app/src/main/java/com/remit/jmecustomer/features/home/presenter/HomeNotificationHandler.java @@ -1,5 +1,6 @@ package com.remit.jmecustomer.features.home.presenter; +import com.remit.jmecustomer.base.PrefKeys; import com.remit.jmecustomer.features.home.view.HomeFragmentV2; import com.remit.jmecustomer.R; import com.remit.jmecustomer.RemitApplication; @@ -53,49 +54,51 @@ public class HomeNotificationHandler { this.stringExtractor = stringExtractor; } - public static HomeNotificationViewDTO generateNotificationFromType(RemitApplication.StringExtractor stringExtractor, HomeNoticeViewTypeEnum type, String redirectTo,String residenceType) { - return new HomeNotificationHandler(stringExtractor).generateHomeNotificationViewExplicitlyFromType(type, redirectTo,residenceType); + public static HomeNotificationViewDTO generateNotificationFromType(RemitApplication.StringExtractor stringExtractor, HomeNoticeViewTypeEnum type, String redirectTo, String residenceType) { + return new HomeNotificationHandler(stringExtractor).generateHomeNotificationViewExplicitlyFromType(type, redirectTo, residenceType); } - private HomeNotificationViewDTO generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum type, String redirectTo,String residenceType) { + private HomeNotificationViewDTO generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum type, String redirectTo, String residenceType) { switch (type) { case KYC_NOT_SUBMITTED: - HomeNotificationViewDTO kycNotSubmittedNotificationViewDTO = new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(R.string.kyc_fill_text), stringExtractor.getStringFromStringId(R.string.complete_your_registration_text), isExistingCustomer, HomeNoticeViewTypeEnum.KYC_NOT_SUBMITTED, hasUpdatedDefaultCredentials, redirectTo,residenceType); + HomeNotificationViewDTO kycNotSubmittedNotificationViewDTO = new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(R.string.kyc_fill_text), stringExtractor.getStringFromStringId(R.string.complete_your_registration_text), isExistingCustomer, HomeNoticeViewTypeEnum.KYC_NOT_SUBMITTED, hasUpdatedDefaultCredentials, redirectTo, residenceType); kycNotSubmittedNotificationViewDTO.setFocused(true); return kycNotSubmittedNotificationViewDTO; case TERMSNOTACCEPTED: - HomeNotificationViewDTO termsNotAcceptedNotificationViewDTO = new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(R.string.terms_and_condition_title_text), stringExtractor.getStringFromStringId(R.string.terms_not_accepted_text), isExistingCustomer, HomeNoticeViewTypeEnum.TERMSNOTACCEPTED, hasUpdatedDefaultCredentials, redirectTo,residenceType); + HomeNotificationViewDTO termsNotAcceptedNotificationViewDTO = new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(R.string.terms_and_condition_title_text), stringExtractor.getStringFromStringId(R.string.terms_not_accepted_text), isExistingCustomer, HomeNoticeViewTypeEnum.TERMSNOTACCEPTED, hasUpdatedDefaultCredentials, redirectTo, residenceType); termsNotAcceptedNotificationViewDTO.setFocused(true); return termsNotAcceptedNotificationViewDTO; case KYC_NOT_VERIFIED: - return new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(R.string.kyc_verify_pending_text), stringExtractor.getStringFromStringId(R.string.verification_in_aproval_process_text), isExistingCustomer, HomeNoticeViewTypeEnum.KYC_NOT_VERIFIED, hasUpdatedDefaultCredentials, redirectTo,residenceType); + return new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(R.string.kyc_verify_pending_text), stringExtractor.getStringFromStringId(R.string.verification_in_aproval_process_text), isExistingCustomer, HomeNoticeViewTypeEnum.KYC_NOT_VERIFIED, hasUpdatedDefaultCredentials, redirectTo, residenceType); - case CHANGE_TXN_PIN: - HomeNotificationViewDTO changeTxnPinNotificationViewDTO = new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(R.string.change_txn_pin), stringExtractor.getStringFromStringId(R.string.change_txn_pin_detail), isExistingCustomer, HomeNoticeViewTypeEnum.CHANGE_TXN_PIN, hasUpdatedDefaultCredentials, redirectTo,residenceType); + case CHANGE_TXN_PIN: { + String hasUpdatedCredentials = RemitApplication.getStorage().getString(PrefKeys.HAS_UPDATED_CREDENTIALS, "0"); + HomeNotificationViewDTO changeTxnPinNotificationViewDTO = new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(hasUpdatedCredentials.equalsIgnoreCase("5") ? R.string.setup_new_pin_title : R.string.change_txn_pin), stringExtractor.getStringFromStringId(R.string.change_txn_pin_detail), isExistingCustomer, HomeNoticeViewTypeEnum.CHANGE_TXN_PIN, hasUpdatedDefaultCredentials, redirectTo, residenceType); changeTxnPinNotificationViewDTO.setFocused(true); return changeTxnPinNotificationViewDTO; - - case CHANGE_PIN: - HomeNotificationViewDTO changePinNotificationViewDTO = new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(R.string.change_txn_pin), stringExtractor.getStringFromStringId(R.string.change_txn_pin_detail1), isExistingCustomer, HomeNoticeViewTypeEnum.CHANGE_PIN, hasUpdatedDefaultCredentials, redirectTo,residenceType); + } + case CHANGE_PIN: { + String hasUpdatedCredentials = RemitApplication.getStorage().getString(PrefKeys.HAS_UPDATED_CREDENTIALS, "0"); + HomeNotificationViewDTO changePinNotificationViewDTO = new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(hasUpdatedCredentials.equalsIgnoreCase("5") ? R.string.setup_new_pin_title : R.string.change_txn_pin), stringExtractor.getStringFromStringId(hasUpdatedCredentials.equalsIgnoreCase("5") ? R.string.setup_new_pin_body : R.string.change_txn_pin_detail1), isExistingCustomer, HomeNoticeViewTypeEnum.CHANGE_PIN, hasUpdatedDefaultCredentials, redirectTo, residenceType); changePinNotificationViewDTO.setFocused(true); return changePinNotificationViewDTO; - + } case CHANGE_TXN_PIN_N_PASS: - HomeNotificationViewDTO changeTxnPinNPassNotificationViewDTO = new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(R.string.change_txn_pin_n_pass), stringExtractor.getStringFromStringId(R.string.change_txn_pin_n_pass_detail), isExistingCustomer, HomeNoticeViewTypeEnum.CHANGE_TXN_PIN_N_PASS, hasUpdatedDefaultCredentials, redirectTo,residenceType); + HomeNotificationViewDTO changeTxnPinNPassNotificationViewDTO = new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(R.string.change_txn_pin_n_pass), stringExtractor.getStringFromStringId(R.string.change_txn_pin_n_pass_detail), isExistingCustomer, HomeNoticeViewTypeEnum.CHANGE_TXN_PIN_N_PASS, hasUpdatedDefaultCredentials, redirectTo, residenceType); changeTxnPinNPassNotificationViewDTO.setFocused(true); return changeTxnPinNPassNotificationViewDTO; case CHANGE_TXN_PASS: - HomeNotificationViewDTO changeTxnPassNotificationViewDTO = new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(R.string.change_password_text), stringExtractor.getStringFromStringId(R.string.change_txn_pass_detail), isExistingCustomer, HomeNoticeViewTypeEnum.CHANGE_TXN_PASS, hasUpdatedDefaultCredentials, redirectTo,residenceType); + HomeNotificationViewDTO changeTxnPassNotificationViewDTO = new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(R.string.change_password_text), stringExtractor.getStringFromStringId(R.string.change_txn_pass_detail), isExistingCustomer, HomeNoticeViewTypeEnum.CHANGE_TXN_PASS, hasUpdatedDefaultCredentials, redirectTo, residenceType); changeTxnPassNotificationViewDTO.setFocused(true); return changeTxnPassNotificationViewDTO; case EMAIL_NOT_VERIFIED: - HomeNotificationViewDTO emailNotVerifiedDto = new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(R.string.verify_email_text), stringExtractor.getStringFromStringId(R.string.verify_email_detail_text), isExistingCustomer, HomeNoticeViewTypeEnum.EMAIL_NOT_VERIFIED, hasUpdatedDefaultCredentials, redirectTo,residenceType); + HomeNotificationViewDTO emailNotVerifiedDto = new HomeNotificationViewDTO(stringExtractor.getStringFromStringId(R.string.verify_email_text), stringExtractor.getStringFromStringId(R.string.verify_email_detail_text), isExistingCustomer, HomeNoticeViewTypeEnum.EMAIL_NOT_VERIFIED, hasUpdatedDefaultCredentials, redirectTo, residenceType); emailNotVerifiedDto.setFocused(true); return emailNotVerifiedDto; @@ -106,27 +109,29 @@ public class HomeNotificationHandler { } - public HomeNotificationViewDTO generateAppropriateHomeNotificationViewDTO(String redirectTo,String residenceType) { - return generateAppropriateRegistrationRelatedNotification(redirectTo,residenceType); + public HomeNotificationViewDTO generateAppropriateHomeNotificationViewDTO(String redirectTo, String residenceType) { + return generateAppropriateRegistrationRelatedNotification(redirectTo, residenceType); } - private HomeNotificationViewDTO generateAppropriateRegistrationRelatedNotification(String redirectTo,String residenceType) { + private HomeNotificationViewDTO generateAppropriateRegistrationRelatedNotification(String redirectTo, String residenceType) { if (!isEmailVerified) - return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.EMAIL_NOT_VERIFIED,redirectTo,residenceType); + return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.EMAIL_NOT_VERIFIED, redirectTo, residenceType); else if (!kycSubmit) - return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.KYC_NOT_SUBMITTED,redirectTo,residenceType); + return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.KYC_NOT_SUBMITTED, redirectTo, residenceType); else if (!isTermsAccepted) - return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.TERMSNOTACCEPTED,redirectTo,residenceType); + return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.TERMSNOTACCEPTED, redirectTo, residenceType); else if (!isVerified) - return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.KYC_NOT_VERIFIED,redirectTo,residenceType); + return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.KYC_NOT_VERIFIED, redirectTo, residenceType); else if (hasUpdatedDefaultCredentials.equals("1")) - return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.CHANGE_TXN_PIN,redirectTo,residenceType); + return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.CHANGE_TXN_PIN, redirectTo, residenceType); else if (hasUpdatedDefaultCredentials.equals("2")) - return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.CHANGE_TXN_PIN_N_PASS,redirectTo,residenceType); + return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.CHANGE_TXN_PIN_N_PASS, redirectTo, residenceType); else if (hasUpdatedDefaultCredentials.equals("3")) - return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.CHANGE_TXN_PASS,redirectTo,residenceType); + return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.CHANGE_TXN_PASS, redirectTo, residenceType); else if (hasUpdatedDefaultCredentials.equals("4")) - return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.CHANGE_PIN,redirectTo,residenceType); + return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.CHANGE_PIN, redirectTo, residenceType); + else if (hasUpdatedDefaultCredentials.equals("5")) + return generateHomeNotificationViewExplicitlyFromType(HomeNoticeViewTypeEnum.CHANGE_PIN, redirectTo, residenceType); else return null; } diff --git a/app/src/main/java/com/remit/jmecustomer/features/kyc/newCustomer/gateway/KYCV3Gateway.java b/app/src/main/java/com/remit/jmecustomer/features/kyc/newCustomer/gateway/KYCV3Gateway.java index f488c762..867d9d50 100644 --- a/app/src/main/java/com/remit/jmecustomer/features/kyc/newCustomer/gateway/KYCV3Gateway.java +++ b/app/src/main/java/com/remit/jmecustomer/features/kyc/newCustomer/gateway/KYCV3Gateway.java @@ -73,6 +73,7 @@ public class KYCV3Gateway extends PrivilegedGateway implements KYCV3GatewayInter map.put("otherIdType", createStringUploadValue(personalInfoDTO.getOtherIdType())); map.put("additionalIdType", createStringUploadValue(personalInfoDTO.getAdditionalIdType())); map.put("purposeOfRegistration", createStringUploadValue(personalInfoDTO.getPurposeOfRegistration())); + map.put("RegistrationType", createStringUploadValue("MKYC")); } File faceImageFile = null; diff --git a/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/presenter/ExistingKYCV4PresenterInterface.java b/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/presenter/ExistingKYCV4PresenterInterface.java index 96ce0a9d..a40257f2 100644 --- a/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/presenter/ExistingKYCV4PresenterInterface.java +++ b/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/presenter/ExistingKYCV4PresenterInterface.java @@ -13,14 +13,15 @@ import java.util.List; public interface ExistingKYCV4PresenterInterface extends BasePresenterInterface { - ExistingCustomerDetailViewLiveData getCustomerRelatedViewEvents(ExistingCustomerDetailViewLiveData.CustomerDetailViewBinding viewBindings); ExistingKYCIDTypeViewLiveData getKYCIdTypeViewEvents(ExistingKYCIDTypeViewLiveData.KYCIDTypeViewBindings viewBindings); void getKycRelatedData(boolean isKYCSubmitted); + void setNewToken(String newToken); - void termsAndConditionAccept(); + + void termsAndConditionAccept(Boolean agree); boolean getBackAdditionalRequired(); @@ -28,14 +29,18 @@ public interface ExistingKYCV4PresenterInterface extends BasePresenterInterface boolean validateAllDetailForm(); - - List getOccupationList(); + List getSourceOfFundList(); + List getMonthlyIncomeList(); + List getBusinessTypeList(); + List getPurposeOfRegistrationList(); + List getIdTypeList(); + List getVisaStatusList(); void sendFullKYCDataUpdate(); @@ -44,35 +49,29 @@ public interface ExistingKYCV4PresenterInterface extends BasePresenterInterface void kycSubmitSucessForPopUp(); - interface KYCV3ViewContractInterface extends BaseContractInterface - { - - KYCV3CustomerDetailViewContractInterface getCustomerDetailViewContract(); + interface KYCV3ViewContractInterface extends BaseContractInterface { + KYCV3CustomerDetailViewContractInterface getCustomerDetailViewContract(); void onTermsPostSuccess(); - - - /** * Lazy load kyc related form when all related data are available. */ void lazyLoadForms(); void showDocumentDetailForm(); - void showTermsAndCondition(); - void promptToInputAnswer(String question, AnswerInputDialog.AnswerInputDialogListener listener); + void showTermsAndCondition(); + void promptToInputAnswer(String question, AnswerInputDialog.AnswerInputDialogListener listener); - interface KYCV3CustomerDetailViewContractInterface extends BaseContractInterface - { - } + interface KYCV3CustomerDetailViewContractInterface extends BaseContractInterface { + } } diff --git a/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/presenter/ExistingKYCV4ViewModel.java b/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/presenter/ExistingKYCV4ViewModel.java index b9760fe1..95aa9b1b 100644 --- a/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/presenter/ExistingKYCV4ViewModel.java +++ b/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/presenter/ExistingKYCV4ViewModel.java @@ -428,9 +428,9 @@ public class ExistingKYCV4ViewModel extends BaseViewModel implements ExistingKYC } @Override - public void termsAndConditionAccept() { + public void termsAndConditionAccept(Boolean agree) { this.compositeDisposable.add( - this.gateway.agreeToUserTermsAndConditions(this.gateway.getBasicAuth(view.getContext()), this.gateway.getUserID(), "Y") + this.gateway.agreeToUserTermsAndConditions(this.gateway.getBasicAuth(view.getContext()), this.gateway.getUserID(), agree ? "Y" : "N") .doOnSubscribe(sub -> view.showProgressBar(true, "")) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) @@ -1017,7 +1017,7 @@ public class ExistingKYCV4ViewModel extends BaseViewModel implements ExistingKYC public void requestWithSomeHttpHeaders(List plan) { RequestQueue queue = Volley.newRequestQueue(view.getContext()); - String url = BuildConfig.TrustDockVerificationUrl + BuildConfig.TrustDockAuthorizationId; + String url = BuildConfig.TrustDockVerificationUrl; JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.POST, url, null, new Response.Listener() { @Override @@ -1025,7 +1025,7 @@ public class ExistingKYCV4ViewModel extends BaseViewModel implements ExistingKYC try { String publicKey = response.getString("public_id"); //setupPlans() - String nativeAppSdkToken = "rbTme8F4whfAZBuSQcN5gUXr"; + String nativeAppSdkToken = BuildConfig.TrustDockNativeAppSdkToken; TrustdockVerificationParams param = new TrustdockVerificationParams( publicKey, nativeAppSdkToken, @@ -1048,7 +1048,7 @@ public class ExistingKYCV4ViewModel extends BaseViewModel implements ExistingKYC @Override public Map getHeaders() throws AuthFailureError { Map params = new HashMap(); - params.put("Authorization", "Bearer SC5ra2f1GDqMaAVZX289bpuH"); + params.put("Authorization", "Bearer " + BuildConfig.TrustDockAuthorizationId); return params; } }; diff --git a/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/view/documents/ExistingKYCIDTypeFragment.java b/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/view/documents/ExistingKYCIDTypeFragment.java index 04c2d601..7520e660 100644 --- a/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/view/documents/ExistingKYCIDTypeFragment.java +++ b/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/view/documents/ExistingKYCIDTypeFragment.java @@ -279,7 +279,10 @@ public class ExistingKYCIDTypeFragment extends BaseFragment { String selectedNationality = RemitApplication.getStorage().getString(PrefKeys.SELECTED_NATIONALITY, ""); if (isNoNFC && selectedNationality.equalsIgnoreCase(FOREIGNER_TYPE)) openTrustDockSDK(true); - else startActivity(new Intent(getContext(), HomeActivityV2.class)); + else { + kycv4ViewModel.termsAndConditionAccept(false); + startActivity(new Intent(getContext(), HomeActivityV2.class)); + } dialog.dismiss(); } }); diff --git a/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/view/termsAndConditions/ExistingKycTermsAndConditionFragment.java b/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/view/termsAndConditions/ExistingKycTermsAndConditionFragment.java index 2d14cbc1..04c8c6b5 100644 --- a/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/view/termsAndConditions/ExistingKycTermsAndConditionFragment.java +++ b/app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/view/termsAndConditions/ExistingKycTermsAndConditionFragment.java @@ -30,7 +30,7 @@ public class ExistingKycTermsAndConditionFragment extends WebBrowserFragmentV2 { @Override protected void proceedButtonClicked() { - kycv3ViewModel.termsAndConditionAccept(); + kycv3ViewModel.termsAndConditionAccept(true); } @Override diff --git a/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/presenter/KYCV4PresenterInterface.java b/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/presenter/KYCV4PresenterInterface.java index 720c7bee..4d95ecad 100644 --- a/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/presenter/KYCV4PresenterInterface.java +++ b/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/presenter/KYCV4PresenterInterface.java @@ -51,7 +51,7 @@ public interface KYCV4PresenterInterface extends BasePresenterInterface { void kycSubmitSuccessForPopUp(); - void termsAndConditionAccept(); + void termsAndConditionAccept(Boolean agree); interface KYCV3ViewContractInterface extends BaseContractInterface { diff --git a/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/presenter/KYCV4ViewModel.java b/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/presenter/KYCV4ViewModel.java index 71898e39..38d9be77 100644 --- a/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/presenter/KYCV4ViewModel.java +++ b/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/presenter/KYCV4ViewModel.java @@ -740,9 +740,9 @@ public class KYCV4ViewModel extends BaseViewModel implements KYCV4PresenterInter } @Override - public void termsAndConditionAccept() { + public void termsAndConditionAccept(Boolean agree) { this.compositeDisposable.add( - this.gateway.agreeToUserTermsAndConditions(this.gateway.getBasicAuth(view.getContext()), this.gateway.getUserID(), "Y") + this.gateway.agreeToUserTermsAndConditions(this.gateway.getBasicAuth(view.getContext()), this.gateway.getUserID(), agree ? "Y" : "N") .doOnSubscribe(sub -> view.showProgressBar(true, "")) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) @@ -1295,7 +1295,7 @@ public class KYCV4ViewModel extends BaseViewModel implements KYCV4PresenterInter public void requestWithSomeHttpHeaders(List plan) { RequestQueue queue = Volley.newRequestQueue(view.getContext()); - String url = BuildConfig.TrustDockVerificationUrl + BuildConfig.TrustDockAuthorizationId; + String url = BuildConfig.TrustDockVerificationUrl; JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.POST, url, null, new Response.Listener() { @Override @@ -1304,7 +1304,7 @@ public class KYCV4ViewModel extends BaseViewModel implements KYCV4PresenterInter String publicKey = response.getString("public_id"); trustDockId = response.getString("id"); //setupPlans() - String nativeAppSdkToken = "rbTme8F4whfAZBuSQcN5gUXr"; + String nativeAppSdkToken = BuildConfig.TrustDockNativeAppSdkToken; TrustdockVerificationParams param = new TrustdockVerificationParams( publicKey, nativeAppSdkToken, @@ -1327,7 +1327,7 @@ public class KYCV4ViewModel extends BaseViewModel implements KYCV4PresenterInter @Override public Map getHeaders() throws AuthFailureError { Map params = new HashMap(); - params.put("Authorization", "Bearer SC5ra2f1GDqMaAVZX289bpuH"); + params.put("Authorization", "Bearer " + BuildConfig.TrustDockAuthorizationId); return params; } }; diff --git a/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/view/documents/KYCIDTypeFragment.java b/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/view/documents/KYCIDTypeFragment.java index adbda3ed..cee8968b 100644 --- a/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/view/documents/KYCIDTypeFragment.java +++ b/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/view/documents/KYCIDTypeFragment.java @@ -309,8 +309,10 @@ public class KYCIDTypeFragment extends BaseFragment implements KYCV4PresenterInt String selectedNationality = RemitApplication.getStorage().getString(PrefKeys.SELECTED_NATIONALITY, ""); if (isNoNFC && selectedNationality.equalsIgnoreCase(FOREIGNER_TYPE)) openTrustDockSDK(true); - else + else { + kycv4ViewModel.termsAndConditionAccept(false); startActivity(new Intent(getContext(), HomeActivityV2.class)); + } dialog.dismiss(); } }); diff --git a/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/view/termsAndCondition/NewKycTermsAndConditionFragment.java b/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/view/termsAndCondition/NewKycTermsAndConditionFragment.java index 0679465b..3cf10d2a 100644 --- a/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/view/termsAndCondition/NewKycTermsAndConditionFragment.java +++ b/app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/view/termsAndCondition/NewKycTermsAndConditionFragment.java @@ -39,7 +39,7 @@ public class NewKycTermsAndConditionFragment extends WebBrowserFragmentV2 { } @Override protected void proceedButtonClicked() { - kycv4ViewModel.termsAndConditionAccept(); + kycv4ViewModel.termsAndConditionAccept(true); } @Override diff --git a/app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/utils/EditTextConfigurationFactory.java b/app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/utils/EditTextConfigurationFactory.java index 8dace26d..98d3affe 100644 --- a/app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/utils/EditTextConfigurationFactory.java +++ b/app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/utils/EditTextConfigurationFactory.java @@ -25,7 +25,7 @@ public class EditTextConfigurationFactory { return new EditTextConfiguration(InputType.TYPE_CLASS_TEXT, isLocalKeyboardAllowed, "^[\\x00-\\x7A]+$", maxLength); case "ANW": - return new EditTextConfiguration(InputType.TYPE_CLASS_TEXT, isLocalKeyboardAllowed, "^[a-zA-Z0-9]*$\n", maxLength); + return new EditTextConfiguration(InputType.TYPE_CLASS_TEXT, isLocalKeyboardAllowed, "^[a-zA-Z0-9]*$", maxLength); default: return new EditTextConfiguration(InputType.TYPE_CLASS_TEXT, true, null, maxLength); diff --git a/app/src/main/res/values-bn/strings.xml b/app/src/main/res/values-bn/strings.xml index 36f5a3fd..3ea411ae 100644 --- a/app/src/main/res/values-bn/strings.xml +++ b/app/src/main/res/values-bn/strings.xml @@ -85,6 +85,8 @@ পিন নম্বর পরিবর্তন করুণ পিন নম্বর অবশ্যই ৬ সংখ্যার হতে হবে বাতিল করুন + লেনদেন পিন সেটআপ করুন + নতুন লেনদেন পিন সেটআপ করতে এখানে ক্লিক করুন আপনার সহযোগিতার জন্য আমরা আছি ( সকাল ৯টা থেকে রাত ১২ টা ) diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index fc81cb68..c8123a36 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -82,6 +82,8 @@ PINの変更 PINは6桁の数字でお願いします。 キャンセル + 取引暗証番号の設定 + 新しいトランザクション PIN を設定するには、ここをクリックしてください お困りの際はいつでもサポート致します(受付時間 09:30~18:30)。 diff --git a/app/src/main/res/values-ne/strings.xml b/app/src/main/res/values-ne/strings.xml index cdaa8998..8c16c65f 100644 --- a/app/src/main/res/values-ne/strings.xml +++ b/app/src/main/res/values-ne/strings.xml @@ -82,6 +82,8 @@ PIN परिवर्तन गर्नुहोस् PIN 6 अंकको हुनुपर्दछ रद्द गर्नुहोस् + PIN सेटअप गर्नुहोस् + कृपया नयाँ पिन सेटअप गर्न यहाँ क्लिक गर्नुहोस् यहाँको सेवाको लागी हामी बिहान ९:३० देखी साझ ६:३० सम्म हरेक दिन उपलब्ध छौं diff --git a/app/src/main/res/values-si/strings.xml b/app/src/main/res/values-si/strings.xml index ce027790..b0d78267 100644 --- a/app/src/main/res/values-si/strings.xml +++ b/app/src/main/res/values-si/strings.xml @@ -85,6 +85,8 @@ රහස් අංකය වෙනස් කරන්න රහස් අංකය ඉලක්කම් 6ක් විය යුතුය අවලංගු කරන්න + ගනුදෙනු PIN සකසන්න + කරුණාකර නව ගනුදෙනු පින් පිහිටුවීමට මෙතන ක්ලික් කරන්න ඔබට සහායවීමට අපි සැමවිටම මෙහි සිටින්නෙමු (9.30 සිට 18.30 දක්වා) diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 0d481774..4f344c4b 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -83,6 +83,9 @@ Thay đổi pin Pin phải có 6 chữ số Hủy + Thiết lập mã PIN giao dịch + Vui lòng nhấp vào đây để thiết lập Pin giao dịch mới + Chúng tôi sẵn sàng trợ giúp bạn (Thời gian làm việc 9:30 – 18:30) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e1c1b50d..11197533 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -106,6 +106,10 @@ Change PIN PIN should be 6 digit number Cancel + Setup Transaction PIN + Please click here to setup new Transaction Pin + + We are here to help you \n (Available time 09:30 AM - 06:30 PM)