Browse Source

Exrate fixes in resend

master
preyearegmi 6 years ago
parent
commit
391cb49b1e
  1. 12
      app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/model/resend/ReceiverDetailModel.java
  2. 15
      app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/presenter/resend/ReSendMoneyV2Presenter.java
  3. 4
      app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/presenter/resend/ReSendMoneyV2PresenterInterface.java
  4. 10
      app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/view/amountdetail/ResendMoneyAmountDetailFragment.java

12
app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/model/resend/ReceiverDetailModel.java

@ -16,9 +16,9 @@ public class ReceiverDetailModel {
@SerializedName("rMobile") @SerializedName("rMobile")
@Expose @Expose
private String rMobile; private String rMobile;
@SerializedName("pCountry")
@SerializedName("rCountryCode")
@Expose @Expose
private String pCountry;
private String rCountryCode;
@SerializedName("deliveryMethod") @SerializedName("deliveryMethod")
@Expose @Expose
private String deliveryMethod; private String deliveryMethod;
@ -58,12 +58,12 @@ public class ReceiverDetailModel {
this.rMobile = rMobile; this.rMobile = rMobile;
} }
public String getPCountry() {
return pCountry;
public String getRCountryCode() {
return rCountryCode;
} }
public void setPCountry(String pCountry) {
this.pCountry = pCountry;
public void setRCountryCode(String rCountryCode) {
this.rCountryCode = rCountryCode;
} }
public String getDeliveryMethod() { public String getDeliveryMethod() {

15
app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/presenter/resend/ReSendMoneyV2Presenter.java

@ -1,7 +1,5 @@
package com.gmeremit.online.gmeremittance_native.resendV2.presenter.resend; package com.gmeremit.online.gmeremittance_native.resendV2.presenter.resend;
import android.util.Log;
import com.gmeremit.online.gmeremittance_native.R; import com.gmeremit.online.gmeremittance_native.R;
import com.gmeremit.online.gmeremittance_native.autodebitV2.model.autodebitaccountlisting.WebRequestModel; import com.gmeremit.online.gmeremittance_native.autodebitV2.model.autodebitaccountlisting.WebRequestModel;
import com.gmeremit.online.gmeremittance_native.base.BasePresenter; import com.gmeremit.online.gmeremittance_native.base.BasePresenter;
@ -11,7 +9,6 @@ import com.gmeremit.online.gmeremittance_native.homeV2.model.UserInfoModelV2;
import com.gmeremit.online.gmeremittance_native.resendV2.gateway.resend.ReSendMoneyV2Gateway; import com.gmeremit.online.gmeremittance_native.resendV2.gateway.resend.ReSendMoneyV2Gateway;
import com.gmeremit.online.gmeremittance_native.resendV2.model.resend.ResendRelatedDataModel; import com.gmeremit.online.gmeremittance_native.resendV2.model.resend.ResendRelatedDataModel;
import com.gmeremit.online.gmeremittance_native.resendV2.model.transactionlisting.PreviousTransactionRelatedData; import com.gmeremit.online.gmeremittance_native.resendV2.model.transactionlisting.PreviousTransactionRelatedData;
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.SendMoneyAPIRequestBody;
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.SendMoneyTransactionResponseBody; import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.SendMoneyTransactionResponseBody;
import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.verification.VerificationViewModel; import com.gmeremit.online.gmeremittance_native.sendmoneyV2.model.verification.VerificationViewModel;
import com.gmeremit.online.gmeremittance_native.transactionpasspromt.PasswordPromptListener; import com.gmeremit.online.gmeremittance_native.transactionpasspromt.PasswordPromptListener;
@ -147,6 +144,16 @@ public class ReSendMoneyV2Presenter extends BasePresenter implements ReSendMoney
} }
} }
@Override
public String getSelectedCurrency() {
return resendRelatedData.getExRate().getPCurrency();
}
@Override
public String getSelectedCountry() {
return resendRelatedData.getReceiver().getRCountryCode();
}
public void performSendMoneyTransaction(String password) { public void performSendMoneyTransaction(String password) {
@ -215,7 +222,7 @@ public class ReSendMoneyV2Presenter extends BasePresenter implements ReSendMoney
resendRelatedData.getExRate().setPaymentType(previousTransactionRelatedData.getSelectedAutoDebitAccount().getType()); resendRelatedData.getExRate().setPaymentType(previousTransactionRelatedData.getSelectedAutoDebitAccount().getType());
resendRelatedData.getExRate().setUserId(gateway.getUserID()); resendRelatedData.getExRate().setUserId(gateway.getUserID());
Log.d("ResendRelatedData",resendRelatedData.getRemitDetail().toString());
getExRateFromNetwork(); getExRateFromNetwork();
} }

4
app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/presenter/resend/ReSendMoneyV2PresenterInterface.java

@ -41,6 +41,10 @@ public interface ReSendMoneyV2PresenterInterface extends BasePresenterInterface
void getPrepData(); void getPrepData();
String getSelectedCurrency();
String getSelectedCountry();
interface ReSendMoneyV2ContractInterface extends BaseContractInterface interface ReSendMoneyV2ContractInterface extends BaseContractInterface
{ {
void promptPassword(PasswordPromptListener listener); void promptPassword(PasswordPromptListener listener);

10
app/src/main/java/com/gmeremit/online/gmeremittance_native/resendV2/view/amountdetail/ResendMoneyAmountDetailFragment.java

@ -299,6 +299,11 @@ public class ResendMoneyAmountDetailFragment extends BaseFragment implements Vie
showSendAndRecieveAmount(selectedSendAmount, selectedRecipientAmount); showSendAndRecieveAmount(selectedSendAmount, selectedRecipientAmount);
updateButtonToCalculate(false); updateButtonToCalculate(false);
String selectedCurrency= ((ReSendMoneyActionListener)getActivity()).getPresenter().getSelectedCurrency();
String selectedCountryCode= ((ReSendMoneyActionListener)getActivity()).getPresenter().getSelectedCountry();
showSelectedCurrency(selectedCountryCode,selectedCurrency);
} else } else
showPopUpMessage(exchangeCalculationApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null); showPopUpMessage(exchangeCalculationApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null);
} else { } else {
@ -322,6 +327,11 @@ public class ResendMoneyAmountDetailFragment extends BaseFragment implements Vie
showSendAndRecieveAmount(selectedSendAmount, selectedRecipientAmount); showSendAndRecieveAmount(selectedSendAmount, selectedRecipientAmount);
updateButtonToCalculate(false); updateButtonToCalculate(false);
String selectedCurrency= ((ReSendMoneyActionListener)getActivity()).getPresenter().getSelectedCurrency();
String selectedCountryCode= ((ReSendMoneyActionListener)getActivity()).getPresenter().getSelectedCountry();
showSelectedCurrency(selectedCountryCode,selectedCurrency);
} else } else
showPopUpMessage(exchangeCalculationApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null); showPopUpMessage(exchangeCalculationApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null);

Loading…
Cancel
Save