Browse Source

add new sendmoney and benificiery changes

new_design
Mukesh Dhungana 1 year ago
parent
commit
39db98f908
  1. 24
      app/build.gradle
  2. 1
      app/src/main/java/com/remit/jmecustomer/common/customwidgets/common/GenericPromptDialog.java
  3. 36
      app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/presenter/ExistingKYCV4ViewModel.java
  4. 2
      app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/presenter/KYCV4ViewModel.java
  5. 12
      app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/model/recipientlistingV3/ReceiverInfoV3Model.java
  6. 2
      app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/RecipientAddV3ContractInterface.java
  7. 11
      app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/RecipientPresenterInterface.java
  8. 13
      app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/add/RecipientAddV3ViewModel.java
  9. 10
      app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/edit/RecipientEditV3ViewModel.java
  10. 3
      app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/utils/EditTextConfigurationFactory.java
  11. 68
      app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/view/recipientaddeditV3/BeneficiaryAddEditV3Fragment.java
  12. 8
      app/src/main/java/com/remit/jmecustomer/features/registerv3/newcustomer/gateway/NewRegisterV3Gateway.java
  13. 2
      app/src/main/java/com/remit/jmecustomer/features/registerv3/newcustomer/presenter/NewRegisterV3InteractorInterface.java
  14. 16
      app/src/main/java/com/remit/jmecustomer/features/registerv3/newcustomer/presenter/NewRegisterV3Presenter.java
  15. 4
      app/src/main/java/com/remit/jmecustomer/features/registerv3/newcustomer/presenter/NewRegisterV3PresenterInterface.java
  16. 8
      app/src/main/java/com/remit/jmecustomer/features/registerv3/newcustomer/presenter/NewRegisterV3ViewLiveData.java
  17. 66
      app/src/main/java/com/remit/jmecustomer/features/registerv3/newcustomer/view/NewRegisterV3Activity.java
  18. 4
      app/src/main/java/com/remit/jmecustomer/features/sendmoney/gateway/SendMoneyV2Gateway.java
  19. 35
      app/src/main/java/com/remit/jmecustomer/features/sendmoney/model/RewardsPointDTO.java
  20. 12
      app/src/main/java/com/remit/jmecustomer/features/sendmoney/model/payoutmode/AccountValidationApiResponse.java
  21. 2
      app/src/main/java/com/remit/jmecustomer/features/sendmoney/presenter/SendMoneyV2InteractorInterface.java
  22. 13
      app/src/main/java/com/remit/jmecustomer/features/sendmoney/presenter/SendMoneyV2ViewModel.java
  23. 49
      app/src/main/java/com/remit/jmecustomer/features/sendmoney/view/amountdetail/AmountDetailSendMoneyFragment.java
  24. 3
      app/src/main/java/com/remit/jmecustomer/utils/https/API_URL.java
  25. 6
      app/src/main/java/com/remit/jmecustomer/utils/https/ApiEndpoints.java
  26. 37
      app/src/main/res/layout/activity_register_v3.xml
  27. 2
      app/src/main/res/layout/dialog_generic_prompt.xml
  28. 45
      app/src/main/res/layout/fragment_beneficiary_add_edit_v3.xml
  29. 14
      app/src/main/res/values-bn/strings.xml
  30. 14
      app/src/main/res/values-ja/strings.xml
  31. 14
      app/src/main/res/values-ne/strings.xml
  32. 14
      app/src/main/res/values-si/strings.xml
  33. 14
      app/src/main/res/values-vi/strings.xml
  34. 18
      app/src/main/res/values/strings.xml

24
app/build.gradle

@ -72,11 +72,14 @@ android {
buildConfigField 'String', 'GME_TOKEN', '"@NcRfTjWnZr4u7x!A%D*G-KaPdSgVkXp"'
buildConfigField 'String', 'ClientId', '"5220224461B37738C528430"'
buildConfigField 'String', 'SecretKey', '"VkYp3s6v"'
buildConfigField 'String', 'TrustDockAuthorizationId', '"SC5ra2f1GDqMaAVZX289bpuH"'
// 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="'
//
debuggable false
minifyEnabled true
shrinkResources true
@ -131,11 +134,20 @@ android {
buildConfigField 'String', 'GME_TOKEN', '"39587YT398@FBQOW8RY3#948R7GB@CNEQW987GF87$TD18$1981..919@@##joghndvberteiru"'
buildConfigField 'String', 'ClientId', '"172017F9EC11222E8107142733"'
buildConfigField 'String', 'SecretKey', '"QRK2UM0Q"'
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"'
// TrustDock
// 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', '"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="'
//
debuggable true
minifyEnabled false
shrinkResources false

1
app/src/main/java/com/remit/jmecustomer/common/customwidgets/common/GenericPromptDialog.java

@ -56,6 +56,7 @@ public class GenericPromptDialog extends DialogFragment implements View.OnClickL
{
try {
iconView.setImageResource(iconsRes);
iconView.setVisibility(View.VISIBLE);
}
catch (Exception e)
{

36
app/src/main/java/com/remit/jmecustomer/features/newkyc/existingCustomer/presenter/ExistingKYCV4ViewModel.java

@ -566,15 +566,15 @@ public class ExistingKYCV4ViewModel extends BaseViewModel implements ExistingKYC
String selectedNationality = RemitApplication.getStorage().getString(PrefKeys.SELECTED_NATIONALITY, "");
compositeDisposable.add(
loginGateway.loginUser(
loginGateway.getBasicAuth(view.getContext()),
this.userId,
this.userPwd,
appRelatedMetaData.getDeviceId(),
Utils.getIPAddress(true),
fcmID,
false,
null,
null,
loginGateway.getBasicAuth(view.getContext()),
this.userId,
this.userPwd,
appRelatedMetaData.getDeviceId(),
Utils.getIPAddress(true),
fcmID,
false,
null,
null,
selectedNationality)
.doOnSubscribe(sub -> view.showProgressBar(true, ""))
.subscribeOn(Schedulers.io())
@ -602,7 +602,7 @@ public class ExistingKYCV4ViewModel extends BaseViewModel implements ExistingKYC
onReceivingKycRelatedData(t.getData());
view.lazyLoadForms();
if (t.getData().areAnyPicturesAvailableFromServer() && isKYCSubmitted)
view.showTermsAndCondition();
view.showTermsAndCondition();
/* onReceivingKycRelatedData(gateway.getMockedData());
view.lazyLoadForms();
if (true)
@ -1017,10 +1017,9 @@ public class ExistingKYCV4ViewModel extends BaseViewModel implements ExistingKYC
public void requestWithSomeHttpHeaders(List<TrustdockPlan> plan) {
RequestQueue queue = Volley.newRequestQueue(view.getContext());
String url = API_URL.GET_TRUSTDOCK_VERIFICATION + BuildConfig.TrustDockAuthorizationId;
JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.POST, url,null,
new Response.Listener<JSONObject>()
{
String url = BuildConfig.TrustDockVerificationUrl + BuildConfig.TrustDockAuthorizationId;
JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.POST, url, null,
new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
try {
@ -1034,22 +1033,21 @@ public class ExistingKYCV4ViewModel extends BaseViewModel implements ExistingKYC
);
TrustdockVerificationSDK.Companion.start((Context) view.getContext(), param);
} catch (Exception ex) {
Log.d("ERROR","error => "+ex.toString());
Log.d("ERROR", "error => " + ex.toString());
}
}
},
new Response.ErrorListener()
{
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
// TODO Auto-generated method stub
Log.d("ERROR","error => "+error.toString());
Log.d("ERROR", "error => " + error.toString());
}
}
) {
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
Map<String, String> params = new HashMap<String, String>();
params.put("Authorization", "Bearer SC5ra2f1GDqMaAVZX289bpuH");
return params;
}

2
app/src/main/java/com/remit/jmecustomer/features/newkyc/newCustomer/presenter/KYCV4ViewModel.java

@ -1295,7 +1295,7 @@ public class KYCV4ViewModel extends BaseViewModel implements KYCV4PresenterInter
public void requestWithSomeHttpHeaders(List<TrustdockPlan> plan) {
RequestQueue queue = Volley.newRequestQueue(view.getContext());
String url = API_URL.GET_TRUSTDOCK_VERIFICATION + BuildConfig.TrustDockAuthorizationId;
String url = BuildConfig.TrustDockVerificationUrl + BuildConfig.TrustDockAuthorizationId;
JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.POST, url, null,
new Response.Listener<JSONObject>() {
@Override

12
app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/model/recipientlistingV3/ReceiverInfoV3Model.java

@ -124,6 +124,10 @@ public class ReceiverInfoV3Model implements Parcelable {
@Expose
private String isForceUpdate;
@SerializedName("IsAccountValidationReq ")
@Expose
private String isAccountValidation ;
public boolean getHasVerifiedOTP() {
return hasVerifiedOTP;
}
@ -404,6 +408,14 @@ public class ReceiverInfoV3Model implements Parcelable {
this.isForceUpdate = isForceUpdate;
}
public String getIsAccountValidation() {
return isAccountValidation;
}
public void setIsAccountValidation(String isAccountValidation) {
this.isAccountValidation = isAccountValidation;
}
public void updateSelectedServiceTypeData(ServiceTypeModel selectedServiceType) {
this.agent = new AgentV3Model(selectedServiceType.getId(), selectedServiceType.getDescription(), "", null, "");
printLog();

2
app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/RecipientAddV3ContractInterface.java

@ -271,6 +271,8 @@ public interface RecipientAddV3ContractInterface extends BaseContractInterface
void promptToInputAnswer(String question, AnswerInputDialog.AnswerInputDialogListener listener);
void showAccountNumberErrorDialog(String msg);
}
}

11
app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/RecipientPresenterInterface.java

@ -21,15 +21,23 @@ public interface RecipientPresenterInterface extends BasePresenterInterface {
void onServiceTypeSelected(ServiceTypeModel selectedServiceType);
void onBankSelected(PaymentBankModel selectedServiceType);
void onBranchSelected(BankBranchDTO selectedBranch);
void onProvinceSelected(PayoutProvincesModel selectedProvinces);
void onDistrictSelected(DropDownDTO selectedProvinces);
void onTransferReasonSelected(DropDownDTO selectedTransferReason);
void onIDTypeSelected(DropDownDTO selectedIDType);
void onRelationSelected(DropDownDTO selectedRelation);
void proceedToEditSuccess();
void proceedToAddSuccess();
void showEmailCodePopUp();
void verifyEmailCode(String emailCode);
@ -99,6 +107,7 @@ public interface RecipientPresenterInterface extends BasePresenterInterface {
void onNativeCountryServiceSelected(NativeCountry selectedNativeCountry);
void getDynamicValidationAndDropDownList(String countryId, String serviceType);
void getDynamicValidationAndDropDownList(String countryId, String serviceType);
void validateAccountNumber();
}

13
app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/add/RecipientAddV3ViewModel.java

@ -169,6 +169,11 @@ public class RecipientAddV3ViewModel extends RecipientAddEditBaseV3ViewModel {
);
}
@Override
public void validateAccountNumber() {
if (validator.requiresAccountValidation())
performAccountValidation(validator.getRecipientDetail().getAgent().getAccountNo());
}
private void performAccountValidation(String accountNumber) {
@ -334,8 +339,8 @@ public class RecipientAddV3ViewModel extends RecipientAddEditBaseV3ViewModel {
protected void onSuccess(GenericResponseDataModel<ReceiverInfoV3Model> t) {
if (t.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) {
successMessage = t.getMsg() + " \n " + getStringfromStringId(R.string.recipient_add_success_message_text).replace("xxx", getReceiverName(t.getData()));
receiverId=t.getData().getReceiverId();
Log.d(TAG, "receiverId "+receiverId);
receiverId = t.getData().getReceiverId();
Log.d(TAG, "receiverId " + receiverId);
sendMoneyRequiredDataV3 = new SendMoneyRequiredDataV3(t.getData());
view.showTermsAndConditionScreen();
} else {
@ -385,6 +390,10 @@ public class RecipientAddV3ViewModel extends RecipientAddEditBaseV3ViewModel {
view.getRecipientAddEditV3ContractInterface().setErrorOnWidgetAccountNo(accountValidationApiResponse.getMsg());
view.getRecipientAddEditV3ContractInterface().scrollAccountNumberView();
// show show error dialog
if (accountValidationApiResponse.getErrorCode().equalsIgnoreCase("1") && accountValidationApiResponse.getExtra() != null && accountValidationApiResponse.getExtra().equalsIgnoreCase("Y")) {
view.getRecipientAddEditV3ContractInterface().showAccountNumberErrorDialog(accountValidationApiResponse.getMsg());
}
}
}

10
app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/edit/RecipientEditV3ViewModel.java

@ -149,7 +149,11 @@ public class RecipientEditV3ViewModel extends RecipientAddEditBaseV3ViewModel {
);
}
@Override
public void validateAccountNumber() {
if (validator.requiresAccountValidation())
performAccountValidation(validator.getRecipientDetail().getAgent().getAccountNo());
}
/**
* 1. Get CountryService Detail
*/
@ -502,6 +506,10 @@ public class RecipientEditV3ViewModel extends RecipientAddEditBaseV3ViewModel {
view.getRecipientAddEditV3ContractInterface().setErrorOnWidgetAccountNo(accountValidationApiResponse.getMsg());
view.getRecipientAddEditV3ContractInterface().scrollAccountNumberView();
// show show error dialog
if (accountValidationApiResponse.getErrorCode().equalsIgnoreCase("1") && accountValidationApiResponse.getExtra().equalsIgnoreCase("Y")) {
view.getRecipientAddEditV3ContractInterface().showAccountNumberErrorDialog(accountValidationApiResponse.getMsg());
}
}
}

3
app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/utils/EditTextConfigurationFactory.java

@ -24,6 +24,9 @@ public class EditTextConfigurationFactory {
case "ANS":
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);
default:
return new EditTextConfiguration(InputType.TYPE_CLASS_TEXT, true, null, maxLength);
}

68
app/src/main/java/com/remit/jmecustomer/features/recipientmanagement/view/recipientaddeditV3/BeneficiaryAddEditV3Fragment.java

@ -1,5 +1,6 @@
package com.remit.jmecustomer.features.recipientmanagement.view.recipientaddeditV3;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.text.InputFilter;
@ -7,11 +8,17 @@ import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.lifecycle.ViewModelProvider;
import androidx.transition.TransitionManager;
import com.remit.jmecustomer.RemitApplication;
import com.remit.jmecustomer.base.PrefKeys;
import com.remit.jmecustomer.common.customwidgets.common.GenericEditTextPromptDialog;
import com.remit.jmecustomer.features.home.view.HomeActivityV2;
import com.remit.jmecustomer.features.recipientmanagement.model.recipientaddeditV3.countryservice.CountryServiceModel;
import com.remit.jmecustomer.features.recipientmanagement.model.recipientaddeditV3.countryservice.ServiceTypeModel;
import com.remit.jmecustomer.features.recipientmanagement.model.recipientaddeditV3.dynamicvalidation.DropDownDTO;
@ -36,6 +43,7 @@ import com.remit.jmecustomer.databinding.FragmentBeneficiaryAddEditV3Binding;
import com.remit.jmecustomer.features.kyc.newCustomer.model.NativeCountry;
import com.remit.jmecustomer.features.recipientmanagement.view.RecipientAddV3ViewModelFactory;
import com.remit.jmecustomer.features.recipientmanagement.view.RecipientEditV3ViewModelFactory;
import com.remit.jmecustomer.features.recipientmanagement.view.recipientlistingV3.RecipientListingV3Activity;
import com.remit.jmecustomer.features.sendmoney.model.SendMoneyRequiredDataV3;
import com.remit.jmecustomer.features.sendmoney.model.payoutmode.BankBranchDTO;
import com.remit.jmecustomer.features.sendmoney.view.SendMoneyV2Activity;
@ -46,6 +54,7 @@ import com.remit.jmecustomer.features.webbrowser.model.WebRequestModel;
import static android.view.View.GONE;
import static com.remit.jmecustomer.features.recipientmanagement.view.recipientaddeditV3.RecipientAddEditV3Activity.RECIPIENT_INFO_BUNDLE_KEY_v3;
import static com.remit.jmecustomer.features.webbrowser.WebBrowserV2Activity.WEB_BROWSWER_URL_BUNDLE_KEY;
import static com.remit.jmecustomer.utils.Constants.FOREIGNER_TYPE;
public class BeneficiaryAddEditV3Fragment extends BaseFragment implements RecipientAddV3ContractInterface.RecipientAddEditV3ContractInterface, View.OnClickListener {
private final String TAG = BeneficiaryAddEditV3Fragment.class.getSimpleName();
@ -81,6 +90,7 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
private ReceiverInfoV3Model recipientToBeEdited;
private RecipientAddEditBaseV3ViewModel viewModel;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
binding = FragmentBeneficiaryAddEditV3Binding.inflate(inflater, container, false);
@ -97,14 +107,26 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
private void init() {
recipientToBeEdited = getArguments().getParcelable(RECIPIENT_INFO_BUNDLE_KEY_v3);
if (recipientToBeEdited != null) {
RecipientEditV3ViewModelFactory recipientEditViewModelFactory = new RecipientEditV3ViewModelFactory((RecipientAddV3ContractInterface) getActivity(),recipientToBeEdited);
RecipientEditV3ViewModelFactory recipientEditViewModelFactory = new RecipientEditV3ViewModelFactory((RecipientAddV3ContractInterface) getActivity(), recipientToBeEdited);
viewModel = new ViewModelProvider(requireActivity(), recipientEditViewModelFactory).get(RecipientEditV3ViewModel.class);
} else {
RecipientAddV3ViewModelFactory recipientAddViewModelFactory = new RecipientAddV3ViewModelFactory((RecipientAddV3ContractInterface)getActivity(),recipientToBeEdited);
RecipientAddV3ViewModelFactory recipientAddViewModelFactory = new RecipientAddV3ViewModelFactory((RecipientAddV3ContractInterface) getActivity(), recipientToBeEdited);
viewModel = new ViewModelProvider(requireActivity(), recipientAddViewModelFactory).get(RecipientAddV3ViewModel.class);
}
initTextWatchers();
removeInputFiltersByDefault();
binding.edReceiverAccountNo.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View view, boolean hasFocus) {
if (!hasFocus) {
String selectedPaymentModeText = binding.edReceiverPaymentMethodSelection.getText().toString();
if (selectedPaymentModeText.equalsIgnoreCase("Mobile Wallet") || selectedPaymentModeText.equalsIgnoreCase("Bank Deposit")) {
// Toast.makeText(getContext(), "Lost the focus", Toast.LENGTH_LONG).show();
viewModel.validateAccountNumber();
}
}
}
});
}
@Override
@ -168,9 +190,9 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
@Override
public void showNativeCountrySelectionView(boolean visibility) {
if(visibility){
if (visibility) {
binding.recieverNativeCountryViewContainer.setVisibility(View.VISIBLE);
}else{
} else {
binding.recieverNativeCountryViewContainer.setVisibility(GONE);
}
@ -349,7 +371,6 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
}
@Override
public void updateValueToWidgetNativeCountry(String nativeCountry) {
binding.edReceiverNativeCountrySelection.setText(nativeCountry);
@ -619,7 +640,6 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
}
@Override
public void updateValidationRuleToWidgetEmail(boolean isFieldRequired, EditTextConfigurationFactory.EditTextConfiguration editTextConfiguration) {
// editTextConfiguration.applyConfigurationSetting(binding.edReceiverTransferReasonSelection); --->???
@ -715,6 +735,7 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
public void setErrorOnWidgetLocalFullName(String error) {
binding.receiverLocalFullNameWrapper.setError(error);
}
@Override
public void setErrorOnWidgetSelectCountry(String error) {
binding.receiverCountrySelectionWrapper.setError(error);
@ -864,7 +885,6 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
}
@Override
public void addOptionalAsHintToWidgetEmail(Boolean isOptional) {
ValidationUtils.updateHint(binding.receiverEmailWrapper, isOptional);
@ -944,7 +964,7 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
break;
case R.id.btn_submit:
if(viewModel.verifyAddEdit()){
if (viewModel.verifyAddEdit()) {
viewModel.onSubmitBtnPressed();
}
break;
@ -959,6 +979,7 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
startActivity(intent);
}
public class RecipientAccountNoTextWatcher extends TextWatcherAdapter {
@Override
public void onTextUpdated(String text) {
@ -1147,7 +1168,7 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
serviceMethodListingDialog.setListener(selectedPaymentMethod ->
{
viewModel.onServiceTypeSelected(selectedPaymentMethod);
if(selectedPaymentMethod.getText().equalsIgnoreCase("Mobile Wallet"))
if (selectedPaymentMethod.getText().equalsIgnoreCase("Mobile Wallet"))
binding.receiverAccountNoWrapper.setHint(getString(R.string.receiver_wallet_no_text_enter));
else
binding.receiverAccountNoWrapper.setHint(getString(R.string.account_text));
@ -1278,6 +1299,7 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
relationMethodListingDialog.show(getActivity().getSupportFragmentManager(), this.getClass().getSimpleName());
}
}
public class IDTypeSelectionClickListener implements View.OnClickListener {
@Override
@ -1298,4 +1320,32 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
}
}
@Override
public void showAccountNumberErrorDialog(String msg) {
try {
GenericPromptDialog genericPromptDialog = new GenericPromptDialog();
genericPromptDialog.setTitleMessage(getString(R.string.account_validation_failed_text));
genericPromptDialog.setBodyMessage(msg);
genericPromptDialog.setIconsRes(R.drawable.error);
genericPromptDialog.setCancellable(true);
genericPromptDialog.setPositiveBtnString("Proceed");
genericPromptDialog.setListener(new GenericPromptDialog.GenericDialogPromptListener() {
@Override
public void onNegativeBtnPressed() {
startActivity(new Intent(getContext(), RecipientListingV3Activity.class));
}
@Override
public void onPositiveBtnPressed() {
}
});
if (!genericPromptDialog.isAdded())
genericPromptDialog.show(getChildFragmentManager(), "RECIPIENTEDITPROMPT");
} catch (Exception ex) {
}
}
}

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

@ -56,10 +56,12 @@ public class NewRegisterV3Gateway extends PrivilegedGateway implements NewRegist
@Override
public Observable<ResponseBody> validateParameters(String userID) {
public Observable<ResponseBody> validateParameters(String userID, String fullName, String dob) {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("type", "residenceId");
jsonObject.addProperty("idnumber", userID);
jsonObject.addProperty("IdType", "residenceId");
jsonObject.addProperty("IdNumber", userID);
jsonObject.addProperty("FullName", fullName);
jsonObject.addProperty("DOB", dob);
return HttpClientV2.getInstance().validateParams(jsonObject);
}

2
app/src/main/java/com/remit/jmecustomer/features/registerv3/newcustomer/presenter/NewRegisterV3InteractorInterface.java

@ -25,7 +25,7 @@ public interface NewRegisterV3InteractorInterface extends BaseInteractorInterfac
Observable<List<NativeCountry>> getNativeCountryList(Context context);
Observable<ResponseBody> validateParameters(String userID);
Observable<ResponseBody> validateParameters(String userID, String fullName, String dob);
void saveUserId(String selectedUserId);

16
app/src/main/java/com/remit/jmecustomer/features/registerv3/newcustomer/presenter/NewRegisterV3Presenter.java

@ -44,7 +44,7 @@ public class NewRegisterV3Presenter extends BaseViewModel implements NewRegister
private final CompositeDisposable useCaseCompositeDisposable;
private final CompositeDisposable viewEventCompositeDisposable;
private final CompositeDisposable compositeDisposable;
private final com.remit.jmecustomer.features.registerv2.newcustomer.presenter.NewRegisterV3ViewLiveData newExistingRegisterViewLiveData;
private final com.remit.jmecustomer.features.registerv3.newcustomer.presenter.NewRegisterV3ViewLiveData newExistingRegisterViewLiveData;
private final MutableLiveData<FormInputStateDTO<String>> verificationLiveData;
private final RegisterValidator registerValidator;
@ -64,7 +64,7 @@ public class NewRegisterV3Presenter extends BaseViewModel implements NewRegister
compositeDisposable = new CompositeDisposable();
this.registerGateway = registerGateway;
this.loginGateway = loginGateway;
newExistingRegisterViewLiveData = new com.remit.jmecustomer.features.registerv2.newcustomer.presenter.NewRegisterV3ViewLiveData();
newExistingRegisterViewLiveData = new com.remit.jmecustomer.features.registerv3.newcustomer.presenter.NewRegisterV3ViewLiveData();
registerValidator = new RegisterValidator();
remitAuthManager = RemitAuthManager.getGmeAuthManager((AppCompatActivity) view.getContext());
@ -252,12 +252,12 @@ public class NewRegisterV3Presenter extends BaseViewModel implements NewRegister
}
@Override
public com.remit.jmecustomer.features.registerv2.newcustomer.presenter.NewRegisterV3ViewLiveData getRegisterRelatedViewEvents(com.remit.jmecustomer.features.registerv2.newcustomer.presenter.NewRegisterV3ViewLiveData.RegisterViewBinding viewBindings) {
public com.remit.jmecustomer.features.registerv3.newcustomer.presenter.NewRegisterV3ViewLiveData getRegisterRelatedViewEvents(com.remit.jmecustomer.features.registerv3.newcustomer.presenter.NewRegisterV3ViewLiveData.RegisterViewBinding viewBindings) {
bindView(viewBindings);
return newExistingRegisterViewLiveData;
}
private void bindView(com.remit.jmecustomer.features.registerv2.newcustomer.presenter.NewRegisterV3ViewLiveData.RegisterViewBinding viewBindings) {
private void bindView(com.remit.jmecustomer.features.registerv3.newcustomer.presenter.NewRegisterV3ViewLiveData.RegisterViewBinding viewBindings) {
this.viewEventCompositeDisposable.add(
Observable.combineLatest(
viewBindings.getReferralCodeObservable().map(registerValidator::validateReferralCode),
@ -309,14 +309,14 @@ public class NewRegisterV3Presenter extends BaseViewModel implements NewRegister
}
@Override
public void verifyResidenceId() {
perfromUserIDValidationFromApi();
public void verifyResidenceId(String fullName, String dob) {
perfromUserIDValidationFromApi(fullName, dob);
// view.showResidienceIdVerifyScreen(false, true);
}
private void perfromUserIDValidationFromApi() {
useCaseCompositeDisposable.add(this.registerGateway.validateParameters(residenceID)
private void perfromUserIDValidationFromApi(String fullName, String dob) {
useCaseCompositeDisposable.add(this.registerGateway.validateParameters(residenceID, fullName, dob)
.delay(300, TimeUnit.MILLISECONDS)
.doOnSubscribe(d -> view.showProgressBar(true, getStringfromStringId(R.string.processing_request_text)))
.subscribeOn(Schedulers.io())

4
app/src/main/java/com/remit/jmecustomer/features/registerv3/newcustomer/presenter/NewRegisterV3PresenterInterface.java

@ -8,7 +8,7 @@ import com.remit.jmecustomer.base.BaseContractInterface;
import com.remit.jmecustomer.base.BasePresenterInterface;
import com.remit.jmecustomer.common.model.FormInputStateDTO;
import com.remit.jmecustomer.features.kyc.newCustomer.model.NativeCountry;
import com.remit.jmecustomer.features.registerv2.newcustomer.presenter.NewRegisterV3ViewLiveData;
import com.remit.jmecustomer.features.registerv3.newcustomer.presenter.NewRegisterV3ViewLiveData;
import java.util.List;
@ -47,7 +47,7 @@ public interface NewRegisterV3PresenterInterface extends BasePresenterInterface
String getLastRegisteredUserPwd();
void verifyResidenceId();
void verifyResidenceId(String fullName, String dob);
void performReferralCodeValidationFromApi(String referralCode);

8
app/src/main/java/com/remit/jmecustomer/features/registerv3/newcustomer/presenter/NewRegisterV3ViewLiveData.java

@ -1,4 +1,4 @@
package com.remit.jmecustomer.features.registerv2.newcustomer.presenter;
package com.remit.jmecustomer.features.registerv3.newcustomer.presenter;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
@ -14,6 +14,7 @@ public class NewRegisterV3ViewLiveData {
private MutableLiveData<FormInputStateDTO<String>> passwordInputLiveData;
private MutableLiveData<FormInputStateDTO<String>> confirmPasswordInputLiveData;
private MutableLiveData<FormInputStateDTO> allFormValidLiveData;
private MutableLiveData<FormInputStateDTO<String>> dobInputLiveData;
public NewRegisterV3ViewLiveData() {
referralCodeLiveData=new MutableLiveData<>();
@ -21,6 +22,7 @@ public class NewRegisterV3ViewLiveData {
passwordInputLiveData=new MutableLiveData<>();
confirmPasswordInputLiveData =new MutableLiveData<>();
allFormValidLiveData=new MutableLiveData<>();
dobInputLiveData=new MutableLiveData<>();
}
public MutableLiveData<FormInputStateDTO<String>> getReferralCodeLiveData() {
@ -63,7 +65,9 @@ public class NewRegisterV3ViewLiveData {
public LiveData<FormInputStateDTO> getAllFormValidLiveData() {
return allFormValidLiveData;
}
public LiveData<FormInputStateDTO<String>> getDobInputLiveData() {
return dobInputLiveData;
}
public void setAllFormValidLiveData(FormInputStateDTO allFormValidLiveData) {
this.allFormValidLiveData.setValue(allFormValidLiveData);
}

66
app/src/main/java/com/remit/jmecustomer/features/registerv3/newcustomer/view/NewRegisterV3Activity.java

@ -16,6 +16,7 @@ import android.widget.ScrollView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatAutoCompleteTextView;
import androidx.lifecycle.ViewModelProvider;
import androidx.transition.TransitionManager;
@ -25,11 +26,12 @@ import com.google.android.material.textfield.TextInputEditText;
import com.google.android.material.textfield.TextInputLayout;
import com.google.firebase.messaging.FirebaseMessaging;
import com.jakewharton.rxbinding3.widget.RxTextView;
import com.remit.jmecustomer.common.view.MAutoCompleteTextView;
import com.remit.jmecustomer.features.newkyc.newCustomer.view.KYCV4Activity;
import com.remit.jmecustomer.features.registerv2.newcustomer.presenter.NewRegisterV3ViewLiveData;
import com.remit.jmecustomer.features.registerv3.newcustomer.NewRegisterV3ViewModelFactory;
import com.remit.jmecustomer.features.registerv3.newcustomer.presenter.NewRegisterV3Presenter;
import com.remit.jmecustomer.features.registerv3.newcustomer.presenter.NewRegisterV3PresenterInterface;
import com.remit.jmecustomer.features.registerv3.newcustomer.presenter.NewRegisterV3ViewLiveData;
import com.remit.jmecustomer.features.termsandcondition.view.TermsAndConditionAcitivity;
import com.remit.jmecustomer.BuildConfig;
import com.remit.jmecustomer.R;
@ -44,12 +46,18 @@ import com.remit.jmecustomer.features.kyc.newCustomer.view.KYCV3Activity;
import com.remit.jmecustomer.features.login.view.LoginV2Activity;
import com.google.firebase.dynamiclinks.FirebaseDynamicLinks;
import com.google.firebase.dynamiclinks.PendingDynamicLinkData;
import com.remit.jmecustomer.utils.Utils;
import com.tsongkha.spinnerdatepicker.SpinnerDatePickerDialogBuilder;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.List;
import java.util.Locale;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import io.reactivex.subjects.PublishSubject;
import static com.remit.jmecustomer.features.kyc.newCustomer.view.KYCV3Activity.KYC_FORM_REQUEST_CODE;
import static com.remit.jmecustomer.utils.Constants.FOREIGNER_TYPE;
@ -107,6 +115,15 @@ public class NewRegisterV3Activity extends BaseActivity implements NewRegisterV3
@BindView(R.id.confirmPassword_TxtInputLayout)
TextInputLayout confirmPasswordTxtInputLayout;
@BindView(R.id.ed_fullName)
TextInputEditText ed_fullName;
@BindView(R.id.dob_edTxt)
AppCompatAutoCompleteTextView dob_edTxt;
@BindView(R.id.dob_TxtInputLayout)
TextInputLayout dob_TxtInputLayout;
@BindView(R.id.btn_submit)
Button btn_submit;
@ -122,6 +139,7 @@ public class NewRegisterV3Activity extends BaseActivity implements NewRegisterV3
private NewRegisterV3ViewLiveData registerRelatedViewEvents;
private List<NativeCountry> nativeCountryList;
private GenericEditTextPromptDialog genericPromptDialog;
private PublishSubject<CharSequence> dobSelectionSubject;
public static void showRegisterActivity(Context context) {
Intent intent = new Intent(context, NewRegisterV3Activity.class);
@ -176,6 +194,7 @@ public class NewRegisterV3Activity extends BaseActivity implements NewRegisterV3
registerRelatedViewEvents.getAllFormValidLiveData().observe(this, result -> {
// btn_submit.setEnabled(result.isValid());
});
registerRelatedViewEvents.getDobInputLiveData().observe(this, this::onDOBStateChanged);
referralCodeEdTxt.setText("");
@ -218,6 +237,7 @@ public class NewRegisterV3Activity extends BaseActivity implements NewRegisterV3
}));
RemitApplication.getStorage().edit().putString(PrefKeys.SELECTED_NATIONALITY, FOREIGNER_TYPE).apply();
dobSelectionSubject = PublishSubject.create();
}
@ -310,7 +330,7 @@ public class NewRegisterV3Activity extends BaseActivity implements NewRegisterV3
public void onVerifyButtonClicked() {
hideKeyBoard();
if (presenter.validateResidenceId(residenceId_edTxt.getText().toString().trim())) {
presenter.verifyResidenceId();
presenter.verifyResidenceId(ed_fullName.getText().toString(), dob_edTxt.getText().toString());
}
}
@ -463,10 +483,50 @@ public class NewRegisterV3Activity extends BaseActivity implements NewRegisterV3
break;
case R.id.radio_japanese:
if (checked) {
residenceId_TxtInputLayout.setHint(R.string.driver_license_hint_text);
residenceId_TxtInputLayout.setHint(R.string.driver_license_passport_hint_text);
RemitApplication.getStorage().edit().putString(PrefKeys.SELECTED_NATIONALITY, RESIDENT_TYPE).apply();
}
break;
}
}
private void onDOBStateChanged(FormInputStateDTO<String> state) {
if (state.isValid()) {
dob_TxtInputLayout.setError(null);
if (state.hasData()) {
dob_edTxt.setText(state.getData());
dobSelectionSubject.onNext(state.getData());
}
} else
dob_TxtInputLayout.setError(state.getErrorMessage());
}
@OnClick(R.id.dob_edTxt)
public void promptDatePickerForDOB() {
hideKeyBoard();
SpinnerDatePickerDialogBuilder builder = new SpinnerDatePickerDialogBuilder();
builder.context(this)
.spinnerTheme(R.style.NumberPickerStyle)
.showTitle(true)
.showDaySpinner(true)
.dialogTheme(R.style.DatePickerTheme)
.setTitle(getString(R.string.select_dob_text))
.setPositiveButtonText(getString(R.string.ok_text))
.setNegativeButtonText(getString(R.string.cancel_text))
.setCurrentDateAsMaxDate()
.defaultDate(1990, 1, 1)
.callback(new com.tsongkha.spinnerdatepicker.DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(com.tsongkha.spinnerdatepicker.DatePicker datePicker, int year, int monthOfYear, int dayOfMonth) {
Calendar newDate = Calendar.getInstance();
newDate.set(year, monthOfYear, dayOfMonth);
String date = new SimpleDateFormat(Utils.getDefaultDateFormat(), Locale.US).format(newDate.getTime());
dob_edTxt.setText(date);
dobSelectionSubject.onNext(date);
}
})
.build().show();
}
}

4
app/src/main/java/com/remit/jmecustomer/features/sendmoney/gateway/SendMoneyV2Gateway.java

@ -99,7 +99,7 @@ public class SendMoneyV2Gateway extends PrivilegedGateway implements SendMoneyV2
}
@Override
public Observable<ResponseBody> getRewardsPoint(String auth, String customerId) {
return HttpClientV2.getInstance().getRewardsPoints(auth, customerId);
public Observable<ResponseBody> getRewardsPoint(String auth, String customerId, String receiverId, String paymentPartnerId, Boolean isAccountValidation) {
return HttpClientV2.getInstance().getRewardsPoints(auth, customerId, receiverId, paymentPartnerId, isAccountValidation);
}
}

35
app/src/main/java/com/remit/jmecustomer/features/sendmoney/model/RewardsPointDTO.java

@ -2,6 +2,7 @@ package com.remit.jmecustomer.features.sendmoney.model;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.remit.jmecustomer.features.recipientmanagement.model.recipientlistingV3.ReceiverInfoV3Model;
public class RewardsPointDTO {
@SerializedName("ShowRewardPoint")
@ -16,6 +17,18 @@ public class RewardsPointDTO {
@Expose
private String RewardMessage;
@SerializedName("ShowValidationAlert")
@Expose
private String ShowValidationAlert;
@SerializedName("ValidationMsg")
@Expose
private String ValidationMsg;
@SerializedName("RecipientInfoModel")
@Expose
private ReceiverInfoV3Model RecipientInfoModel;
public String getShowRewardPoint() {
return ShowRewardPoint;
}
@ -39,4 +52,26 @@ public class RewardsPointDTO {
public void setRewardMessage(String rewardMessage) {
this.RewardMessage = rewardMessage;
}
public String getShowValidationAlert() {
return ShowValidationAlert;
}
public void setShowValidationAlert(String showValidationAlert) {
this.ShowValidationAlert = showValidationAlert;
}
public String getValidationMsg() {
return ValidationMsg;
}
public void setValidationMsg(String validationMsg) {
this.ValidationMsg = validationMsg;
}
public ReceiverInfoV3Model getRecipientInfoModel() {
return RecipientInfoModel;
}
public void setRecipientInfoModel(ReceiverInfoV3Model recipientInfoModel) {
this.RecipientInfoModel = recipientInfoModel;
}
}

12
app/src/main/java/com/remit/jmecustomer/features/sendmoney/model/payoutmode/AccountValidationApiResponse.java

@ -18,6 +18,10 @@ public class AccountValidationApiResponse {
@Expose
private Object data;
@SerializedName("Extra")
@Expose
private String Extra;
public AccountValidationApiResponse(String errorCode, String msg, String id) {
this.errorCode = errorCode;
this.msg = msg;
@ -55,4 +59,12 @@ public class AccountValidationApiResponse {
public void setData(Object data) {
this.data = data;
}
public String getExtra() {
return Extra;
}
public void setExtra(String extra) {
this.Extra = extra;
}
}

2
app/src/main/java/com/remit/jmecustomer/features/sendmoney/presenter/SendMoneyV2InteractorInterface.java

@ -50,7 +50,7 @@ public interface SendMoneyV2InteractorInterface extends BaseInteractorInterface
Observable<ResponseBody> getCDDI(String auth, String userId);
Observable<ResponseBody> getRewardsPoint(String auth, String customerId);
Observable<ResponseBody> getRewardsPoint(String auth, String customerId, String receiverId, String paymentPartnerId, Boolean isAccountValidation);
}
}

13
app/src/main/java/com/remit/jmecustomer/features/sendmoney/presenter/SendMoneyV2ViewModel.java

@ -382,9 +382,9 @@ public class SendMoneyV2ViewModel extends BaseViewModel implements SendMoneyV2Pr
compositeObservable.add(
gateway.sendDataForForexCalculation(gateway.getAuth(), senderCountryId,
senderCurrency, recieverCurrency, Utils.removeCommaFromAmount(senderAmount),
Utils.removeCommaFromAmount(recieveAmount), paymentMethodId, calculationPreference, recipientCountryName,
recipientCountryID, bankId, paymentPartnerId, gateway.getUserID(), "wallet", discountFee)
senderCurrency, recieverCurrency, Utils.removeCommaFromAmount(senderAmount),
Utils.removeCommaFromAmount(recieveAmount), paymentMethodId, calculationPreference, recipientCountryName,
recipientCountryID, bankId, paymentPartnerId, gateway.getUserID(), "wallet", discountFee)
.doOnSubscribe(subs -> view.showProgressBar(true, ""))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -396,7 +396,7 @@ public class SendMoneyV2ViewModel extends BaseViewModel implements SendMoneyV2Pr
@Override
public void fetchRewardsLiveData() {
this.compositeDisposable.add(
this.gateway.getRewardsPoint(gateway.getAuth(), gateway.getUserIDNumber())
this.gateway.getRewardsPoint(gateway.getAuth(), gateway.getUserIDNumber(), selectedRecipient.getReceiverId(), selectedRecipient.getPayoutPartner(), selectedRecipient.getIsAccountValidation() != null && selectedRecipient.getIsAccountValidation().equalsIgnoreCase("Y"))
.doOnSubscribe(subs -> view.showProgressBar(true, ""))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -640,11 +640,12 @@ public class SendMoneyV2ViewModel extends BaseViewModel implements SendMoneyV2Pr
@Override
protected void onSuccess(GenericResponseDataModel<RewardsPointDTO> t) {
if (t.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) {
rewardsPointDTOMutableLiveData.setValue(t.getData());
RewardsPointDTO rewardsPointDTO = t.getData();
rewardsPointDTO.setRecipientInfoModel(selectedRecipient);
rewardsPointDTOMutableLiveData.setValue(rewardsPointDTO);
} else {
view.showPopUpMessage(t.getMsg(), CustomAlertDialog.AlertType.FAILED, null);
}
}
@Override

49
app/src/main/java/com/remit/jmecustomer/features/sendmoney/view/amountdetail/AmountDetailSendMoneyFragment.java

@ -2,10 +2,13 @@ package com.remit.jmecustomer.features.sendmoney.view.amountdetail;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.cardview.widget.CardView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.view.ViewCompat;
@ -27,6 +30,10 @@ import android.widget.ImageView;
import android.widget.TextView;
import com.google.android.material.textfield.TextInputLayout;
import com.remit.jmecustomer.common.customwidgets.common.GenericPromptDialog;
import com.remit.jmecustomer.features.recipientmanagement.model.recipientlistingV3.ReceiverInfoV3Model;
import com.remit.jmecustomer.features.recipientmanagement.view.recipientaddeditV3.RecipientAddEditV3Activity;
import com.remit.jmecustomer.features.recipientmanagement.view.recipientlistingV3.RecipientListingV3Activity;
import com.remit.jmecustomer.features.sendmoney.model.RewardsPointDTO;
import com.remit.jmecustomer.features.sendmoney.model.amountdetail.AmountDetailRelatedDataModel;
import com.remit.jmecustomer.features.sendmoney.model.amountdetail.RecipientCurrencyModel;
@ -390,7 +397,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
getForex();
}
return true;
case R.id.ed_rewardsPoint:{
case R.id.ed_rewardsPoint: {
if (actionId == EditorInfo.IME_ACTION_DONE) {
hideKeyBoard();
getForex();
@ -529,7 +536,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
String strEnteredVal = ed_rewardsPoint.getText().toString();
if(!strEnteredVal.isEmpty()) {
if (!strEnteredVal.isEmpty()) {
int num = Integer.parseInt(strEnteredVal);
if (num > Integer.parseInt(rewardPoint)) {
iv_rewardsPoint.setError("You cannot use more than " + rewardPoint);
@ -593,5 +600,43 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
pointsAvailableText.setText(rewardsPointDTO.getRewardMessage());
this.rewardPoint = rewardsPointDTO.getPoint();
}
// show show error dialog
if (rewardsPointDTO.getShowValidationAlert().equalsIgnoreCase("Y")) {
showAccountNumberErrorDialog(rewardsPointDTO.getValidationMsg(), rewardsPointDTO.getRecipientInfoModel());
}
}
public void showAccountNumberErrorDialog(String msg, ReceiverInfoV3Model recipientInfoModel) {
try {
GenericPromptDialog genericPromptDialog = new GenericPromptDialog();
genericPromptDialog.setTitleMessage(getString(R.string.account_validation_failed_text));
genericPromptDialog.setBodyMessage(msg);
genericPromptDialog.setIconsRes(R.drawable.error);
genericPromptDialog.setCancellable(true);
genericPromptDialog.setPositiveBtnString("Proceed");
genericPromptDialog.setNegativeBtnString("Edit");
genericPromptDialog.setListener(new GenericPromptDialog.GenericDialogPromptListener() {
@Override
public void onNegativeBtnPressed() {
proceedToEditRecipient(recipientInfoModel);
}
@Override
public void onPositiveBtnPressed() {
}
});
if (!genericPromptDialog.isAdded())
genericPromptDialog.show(getChildFragmentManager(), "RECIPIENTEDITPROMPT");
} catch (Exception ex) {
}
}
public void proceedToEditRecipient(ReceiverInfoV3Model recipientInfoModel) {
Intent intent = new Intent(getContext(), RecipientAddEditV3Activity.class);
intent.putExtra(RecipientAddEditV3Activity.RECIPIENT_INFO_BUNDLE_KEY_v3, recipientInfoModel);
startActivityForResult(intent, RecipientAddEditV3Activity.RECIPIENT_ACTION_EDIT_REQUEST_CODE_v3);
}
}

3
app/src/main/java/com/remit/jmecustomer/utils/https/API_URL.java

@ -16,7 +16,8 @@ public class API_URL {
public static final String SEND_MONEY_CALCULATE_EXCHANGE_RATE = BuildConfig.API_VERSION + "/mobile/sendmoney/calculate";
public static final String SEND_MONEY_GET_BRANCHLIST_V2 = BuildConfig.API_VERSION + "/mobile/sendmoney/load/branch/{countryCode}/{bankId}/";
public static final String SEND_MONEY_AMOUNT_VALIDATION_V2 = BuildConfig.API_VERSION + "/mobile/sendmoney/validation/account";
//public static final String SEND_MONEY_AMOUNT_VALIDATION_V2 = BuildConfig.API_VERSION + "/mobile/sendmoney/validation/account";
public static final String SEND_MONEY_AMOUNT_VALIDATION_V2 = BuildConfig.API_VERSION + "/mobile/sendmoney/accountValidation";
public static final String SEND_MONEY_TRANSACTION_V2 = BuildConfig.API_VERSION + "/mobile/sendmoney/dotransaction";
public static final String SEND_MONEY_GET_RECEIPT_V2 = BuildConfig.API_VERSION + "/mobile/receipt/{tranId}";
public static final String SIGN_IN_V2 = BuildConfig.API_VERSION + "/users/access-code";

6
app/src/main/java/com/remit/jmecustomer/utils/https/ApiEndpoints.java

@ -346,7 +346,7 @@ public interface ApiEndpoints {
@POST(API_URL.SET_NOTICE_STAT)
@Headers("Content-Type: application/json")
Observable<ResponseBody> setNoticeReadStatus(@Header("Authorization") String token, @Path("tranId")String tranId, @Path("yesNo")String yesNo);
Observable<ResponseBody> setNoticeReadStatus(@Header("Authorization") String token, @Path("tranId") String tranId, @Path("yesNo") String yesNo);
@POST(API_URL.FINGER_PRINT_SETUP)
@Headers("Content-Type: application/json")
@ -374,11 +374,11 @@ public interface ApiEndpoints {
@GET(API_URL.GET_REWARDS_POINTS)
@Headers("Content-Type: application/json")
Observable<ResponseBody> getRewardsPoints(@Header("Authorization") String token, @Path("customerId") String customerId);
Observable<ResponseBody> getRewardsPoints(@Header("Authorization") String token, @Path("customerId") String customerId, @Query("receiverId") String receiverId, @Query("payoutPartner") String paymentPartnerId, @Query("IsAccountValidation") Boolean isAccountValidation);
@POST(API_URL.VALIDATE_REFERRAL_CODE)
@Headers("Content-Type: application/json")
Observable<ResponseBody> validateReferralCode(@Header("Authorization") String token,@Body() JsonObject jsonObject);
Observable<ResponseBody> validateReferralCode(@Header("Authorization") String token, @Body() JsonObject jsonObject);
@GET(API_URL.GET_LOYALTY_POINTS_DETAILS)
@Headers("Content-Type: application/json")

37
app/src/main/res/layout/activity_register_v3.xml

@ -95,6 +95,43 @@
android:singleLine="true" />
</com.remit.jmecustomer.common.view.MTextInputLayout>
<com.remit.jmecustomer.common.view.MTextInputLayout
android:id="@+id/receiverFullNameWrapper"
style="@style/MTextInputLayoutForm"
android:hint="@string/full_name_text"
app:errorEnabled="true"
app:errorTextAppearance="@style/MTextInpuLayoutErrorStyle">
<com.remit.jmecustomer.common.view.MTextInputEditText
android:id="@+id/ed_fullName"
style="@style/MTextInputEditText"
android:inputType="text"
app:endIconMode="clear_text"
app:errorEnabled="true"
app:maxLengthLimiter="100" />
</com.remit.jmecustomer.common.view.MTextInputLayout>
<com.remit.jmecustomer.common.view.MTextInputLayout
android:id="@+id/dob_TxtInputLayout"
android:hint="@string/dob_text"
style="@style/MTextInputLayoutFormDropDown"
app:endIconMode="dropdown_menu"
app:errorEnabled="true"
app:startIconDrawable="@drawable/ic_calendar"
app:endIconDrawable="@drawable/icv_dropdown"
app:errorTextAppearance="@style/MTextInpuLayoutErrorStyle"
>
<com.remit.jmecustomer.common.view.MAutoCompleteTextView
android:id="@+id/dob_edTxt"
style="@style/MAutoCompleteDropDown"
android:inputType="textNoSuggestions"
android:imeOptions="actionDone"
/>
</com.remit.jmecustomer.common.view.MTextInputLayout>
<com.remit.jmecustomer.common.customwidgets.GmeButton
android:id="@+id/btn_verify"
style="@style/MButton"

2
app/src/main/res/layout/dialog_generic_prompt.xml

@ -54,7 +54,7 @@
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/_1sdp"
android:layout_weight="1"
android:background="@color/colorPrimary"
android:background="@color/text_dialog"
android:gravity="center"
android:paddingTop="10dp"
android:paddingBottom="10dp"

45
app/src/main/res/layout/fragment_beneficiary_add_edit_v3.xml

@ -129,22 +129,22 @@
</com.remit.jmecustomer.common.view.MTextInputLayout>
<com.remit.jmecustomer.common.view.MTextInputLayout
android:id="@+id/receiverAccountNoWrapper"
style="@style/MTextInputLayoutForm"
android:hint="@string/account_text"
app:errorEnabled="true"
app:errorTextAppearance="@style/MTextInpuLayoutErrorStyle">
<!-- <com.remit.jmecustomer.common.view.MTextInputLayout-->
<!-- android:id="@+id/receiverAccountNoWrapper"-->
<!-- style="@style/MTextInputLayoutForm"-->
<!-- android:hint="@string/account_text"-->
<!-- app:errorEnabled="true"-->
<!-- app:errorTextAppearance="@style/MTextInpuLayoutErrorStyle">-->
<com.remit.jmecustomer.common.view.MTextInputEditText
android:id="@+id/ed_receiverAccountNo"
style="@style/MTextInputEditText"
android:inputType="text"
app:endIconMode="clear_text"
app:errorEnabled="true"
<!-- <com.remit.jmecustomer.common.view.MTextInputEditText-->
<!-- android:id="@+id/ed_receiverAccountNo"-->
<!-- style="@style/MTextInputEditText"-->
<!-- android:inputType="text"-->
<!-- app:endIconMode="clear_text"-->
<!-- app:errorEnabled="true"-->
app:maxLengthLimiter="100" />
</com.remit.jmecustomer.common.view.MTextInputLayout>
<!-- app:maxLengthLimiter="100" />-->
<!-- </com.remit.jmecustomer.common.view.MTextInputLayout>-->
<com.remit.jmecustomer.common.view.MTextInputLayout
@ -284,6 +284,23 @@
app:maxLengthLimiter="60" />
</com.remit.jmecustomer.common.view.MTextInputLayout>
<com.remit.jmecustomer.common.view.MTextInputLayout
android:id="@+id/receiverAccountNoWrapper"
style="@style/MTextInputLayoutForm"
android:hint="@string/account_text"
app:errorEnabled="true"
app:errorTextAppearance="@style/MTextInpuLayoutErrorStyle">
<com.remit.jmecustomer.common.view.MTextInputEditText
android:id="@+id/ed_receiverAccountNo"
style="@style/MTextInputEditText"
android:inputType="text"
app:endIconMode="clear_text"
app:errorEnabled="true"
app:maxLengthLimiter="100" />
</com.remit.jmecustomer.common.view.MTextInputLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/mobileViewContainer"
android:layout_width="match_parent"

14
app/src/main/res/values-bn/strings.xml

@ -228,6 +228,13 @@
<string name="invalidAdditionalIdFrontImage_text">অতিরিক্ত আইডির সামনের ছবি ইনভ্যালিড</string>
<string name="invalidAdditionalIdBackImage_text">অতিরিক্ত আইডির পেছনের ছবি ইনভ্যালিড</string>
<!--New EKYC-->
<string name="ekyc_registration_title_text">রেজিস্ট্রেশন প্রসেস ইকেওয়াইসি</string>
<string name="scan_text">স্ক্যান</string>
<string name="scan_doc_text">স্ক্যান ডোকুমেন্টস</string>
<string name="scan_residence_card_text">রেসিডেন্ট কার্ড</string>
<string name="scan_driver_license_text"> ড্রাইভিং লাইসেন্স নম্বর</string>
<!--Login-->
<string name="use_fingerprint_text">আঙুলের ছাপ ব্যবহার করুন</string>
<string name="login_title_text">স্বাগতম জাপান মানি এক্সপ্রেসে</string>
@ -333,6 +340,7 @@
<string name="invalidDistrict_text">জেলা ইনভ্যালিড</string>
<string name="receiver_wallet_no_text">ওয়ালেট নম্বর</string>
<string name="receiver_wallet_no_text_enter">ওয়ালেট নম্বর লিখুন</string>
<string name="account_validation_failed_text">একাউন্ট ভেলিডেশন ফেল</string>
<!--Register-->
<string name="register_title_text1">JME তে নিবন্ধন করুন</string>
@ -612,4 +620,10 @@
<!-- loyalty points -->
<string name="loyalty_points_text">লয়্যালিটি পয়েন্ট</string>
<string name="loyalty_points_btn_link_text">টাকা পাঠান</string>
<!-- Trust Dock -->
<string name="id_number_hint_text">আইডি নম্বর</string>
<string name="driver_license_hint_text" >ড্রাইভিং লাইসেন্স</string>
<string name="invalid_driver_license_text" >ইনভ্যালিড ড্রাইভিং লাইসেন্স</string>
<string name="driver_license_passport_hint_text" >ড্রাইভিং লাইসেন্স/পাসপোর্ট</string>
</resources>

14
app/src/main/res/values-ja/strings.xml

@ -225,6 +225,13 @@
<string name="invalidAdditionalIdFrontImage_text">無効な追加IDの表面画像</string>
<string name="invalidAdditionalIdBackImage_text">無効な追加ID裏面画像</string>
<!--New EKYC-->
<string name="ekyc_registration_title_text">オンライン本人確認(EKYC)による登録</string>
<string name="scan_text">スキャン</string>
<string name="scan_doc_text">書類をスキャン</string>
<string name="scan_residence_card_text">在留カード</string>
<string name="scan_driver_license_text">運転免許証番号</string>
<!--Login-->
<string name="use_fingerprint_text">指紋認証を使用</string>
<string name="login_title_text">JMEへようこそ</string>
@ -330,6 +337,7 @@
<string name="invalidDistrict_text">無効な区/市</string>
<string name="receiver_wallet_no_text">ウォレット番号</string>
<string name="receiver_wallet_no_text_enter">ウォレット番号を入力してください。</string>
<string name="account_validation_failed_text">口座確認に失敗しました</string>
<!--Register-->
<string name="register_title_text1">JMEへの登録</string>
@ -609,4 +617,10 @@
<!-- loyalty points -->
<string name="loyalty_points_text">ロイヤリティポイント .</string>
<string name="loyalty_points_btn_link_text">"送金する”</string>
<!-- Trust Dock -->
<string name="id_number_hint_text">本人確認書類番号</string>
<string name="driver_license_hint_text" >運転免許証</string>
<string name="invalid_driver_license_text" >無効な運転免許証</string>
<string name="driver_license_passport_hint_text" >運転免許証番号/パスポート</string>
</resources>

14
app/src/main/res/values-ne/strings.xml

@ -225,6 +225,13 @@
<string name="invalidAdditionalIdFrontImage_text">अतिरिक्त परिचय पत्रको अगाडीको तस्बिर मिलेन</string>
<string name="invalidAdditionalIdBackImage_text">अतिरिक्त परिचय पत्रको पछाडीको तस्बिर मिलेन</string>
<!--New EKYC-->
<string name="ekyc_registration_title_text">दर्ता प्रक्रिया EKYC</string>
<string name="scan_text">स्क्यान गर्नुहोस्</string>
<string name="scan_doc_text">कागजातहरू स्क्यान गर्नुहोस्</string>
<string name="scan_residence_card_text">रेसिडेन्स कार्ड</string>
<string name="scan_driver_license_text">चालक लाइसेन्स कार्ड</string>
<!--Login-->
<string name="use_fingerprint_text">औँठा छाप प्रयोग गर्नुहोस्</string>
@ -334,6 +341,7 @@
<string name="invalidDistrict_text">अवैध जिल्ला</string>
<string name="receiver_wallet_no_text">वालेट नम्बर</string>
<string name="receiver_wallet_no_text_enter">वालेट नम्बर टाइप गर्नुहोस्</string>
<string name="account_validation_failed_text">खाता नाम वा नम्बर मिलेन </string>
<!--Register-->
<string name="register_title_text1">JME मा दर्ता गर्नुहोस्</string>
@ -610,4 +618,10 @@
<!-- loyalty points -->
<string name="loyalty_points_text">लोयल्त्री पोइन्टस </string>
<string name="loyalty_points_btn_link_text">पैसा पठाउनुहोस्</string>
<!-- Trust Dock -->
<string name="id_number_hint_text">परिचय पत्र नम्बर</string>
<string name="driver_license_hint_text" >सवारीचालक अनुमतिपत्र</string>
<string name="invalid_driver_license_text" >अवैध ड्राइभिङ लाइसेन्स</string>
<string name="driver_license_passport_hint_text" >ड्राइभिङ लाइसेन्स / राहदानी</string>
</resources>

14
app/src/main/res/values-si/strings.xml

@ -228,6 +228,13 @@
<string name="invalidAdditionalIdFrontImage_text">අතිරේක හැඳුනුම්පතේ ඉදිරිපස රූපය වලංගු නොමැත</string>
<string name="invalidAdditionalIdBackImage_text">අතිරේක හැඳුනුම්පතේ පිටුපස රූපය වලංගු නොමැත</string>
<!--New EKYC-->
<string name="ekyc_registration_title_text">ලියාපදිංචි කිරීමේ ක්‍රියාවලිය EKYC</string>
<string name="scan_text">ස්කෑන් කරන්න</string>
<string name="scan_doc_text">ලේඛන පරිලෝකනය කරන්න</string>
<string name="scan_residence_card_text">පදිංචි කාඩ්පත</string>
<string name="scan_driver_license_text">රියදුරු බලපත්ර අංකය</string>
<!--Login-->
<string name="use_fingerprint_text">ඇඟිලිසලකුණ භාවිතාකරන්න</string>
<string name="login_title_text">JME වෙත සාදරයෙන් පිළිගනිමු</string>
@ -333,6 +340,7 @@
<string name="invalidDistrict_text">දිස්ත්‍රික්කය වලංගු නොමැත</string>
<string name="receiver_wallet_no_text">වොලට් අංකය</string>
<string name="receiver_wallet_no_text_enter">වොලට් අංකය ඇතුලත් කරන්න</string>
<string name="account_validation_failed_text">ගිණුම් වලංගු කිරීම අසාර්ථක විය</string>
<!--Register-->
<string name="register_title_text1">JME \n ලියාපදිංචි වන්න</string>
@ -612,4 +620,10 @@
<!-- loyalty points -->
<string name="loyalty_points_text">ලෝයල්ටි පොයින්ට්ස්</string>
<string name="loyalty_points_btn_link_text">මුදල් එවන්න</string>
<!-- Trust Dock -->
<string name="id_number_hint_text">හැඳුනුම්පත අංකය</string>
<string name="driver_license_hint_text" >රියැදුරු බලපත්ර</string>
<string name="invalid_driver_license_text" >වලංගු නොවන රියදුරු බලපත්‍රය</string>
<string name="driver_license_passport_hint_text" >රියදුරු බලපත්‍රය/ ගමන් බලපත්‍රය</string>
</resources>

14
app/src/main/res/values-vi/strings.xml

@ -225,6 +225,13 @@
<string name="invalidAdditionalIdFrontImage_text">Thẻ mặt trước thẻ ID không hợp lệ</string>
<string name="invalidAdditionalIdBackImage_text">Thêm mặt sau thẻ ID không hợp lệ</string>
<!--New EKYC-->
<string name="ekyc_registration_title_text">Quy trình đăng ký EKYC </string>
<string name="scan_text">Quét</string>
<string name="scan_doc_text">Quét giấy tờ</string>
<string name="scan_residence_card_text">Thẻ ngoại kiều ( thẻ cư trú )</string>
<string name="scan_driver_license_text">Mã số bằng lái xe</string>
<!--Login-->
<string name="use_fingerprint_text">Sử dụng vân tay</string>
<string name="login_title_text">Chào mừng đến với Japan Money Express</string>
@ -331,6 +338,7 @@
<string name="invalidDistrict_text">Quận không hợp lệ</string>
<string name="receiver_wallet_no_text">Số ví điện tử</string>
<string name="receiver_wallet_no_text_enter">Nhập số ví điện tử</string>
<string name="account_validation_failed_text">Xác thực tài khoản không thành công</string>
<!--Register-->
<string name="register_title_text1">Đăng ký để JME</string>
@ -609,4 +617,10 @@
<!-- loyalty points -->
<string name="loyalty_points_text">Điểm thưởng tích lỹ</string>
<string name="loyalty_points_btn_link_text">Gửi tiền</string>
<!-- Trust Dock -->
<string name="id_number_hint_text">Mã số thẻ ngoại kiều</string>
<string name="driver_license_hint_text" >Bằng lái xe</string>
<string name="invalid_driver_license_text" >Giấy phép lái xe không hợp lệ</string>
<string name="driver_license_passport_hint_text" >Giấy phép lái xe / Hộ chiếu</string>
</resources>

18
app/src/main/res/values/strings.xml

@ -253,11 +253,11 @@
<string name="invalidAdditionalIdBackImage_text">Invalid Additional ID Back Image</string>
<!--New EKYC-->
<string name="ekyc_registration_title_text" translatable="false">Registration Process EYC</string>
<string name="scan_text" translatable="false">Scan</string>
<string name="scan_doc_text" translatable="false">Scan Documents</string>
<string name="scan_residence_card_text" translatable="false">Residence Card</string>
<string name="scan_driver_license_text" translatable="false">Driver\'s License Card</string>
<string name="ekyc_registration_title_text">Registration Process EYC</string>
<string name="scan_text">Scan</string>
<string name="scan_doc_text">Scan Documents</string>
<string name="scan_residence_card_text">Residence Card</string>
<string name="scan_driver_license_text">Driver\'s License Card</string>
<!--Login-->
<string name="use_fingerprint_text">Use Fingerprint</string>
@ -366,6 +366,7 @@
<string name="invalidDistrict_text">Invalid District</string>
<string name="receiver_wallet_no_text">Wallet Number</string>
<string name="receiver_wallet_no_text_enter">Enter Wallet Number</string>
<string name="account_validation_failed_text">Account Validation Failed</string>
<!--Register-->
<string name="register_title_text1">Register to\nJME</string>
@ -658,7 +659,8 @@
<string name="loyalty_points_btn_link_text">Send Money</string>
<!-- Trust Dock -->
<string name="id_number_hint_text" translatable="false">ID Number</string>
<string name="driver_license_hint_text" translatable="false">Driving License</string>
<string name="invalid_driver_license_text" translatable="false">Invalid Driving License</string>
<string name="id_number_hint_text">ID Number</string>
<string name="driver_license_hint_text" >Driving License</string>
<string name="invalid_driver_license_text" >Invalid Driving License</string>
<string name="driver_license_passport_hint_text" >Driving License/ Passport</string>
</resources><!---->
Loading…
Cancel
Save