|
|
@ -49,6 +49,11 @@ public class ExchangeRateV2Presenter extends BasePresenter implements ExchangeRa |
|
|
|
return; |
|
|
|
if(!validateAmount(sendAmount)) |
|
|
|
return; |
|
|
|
if(selectedCountryPaymentService==null) |
|
|
|
{ |
|
|
|
view.showToastMessage("Please select a currency"); |
|
|
|
return; |
|
|
|
} |
|
|
|
String sendCountryDefault="118"; |
|
|
|
|
|
|
|
compositeDisposables.add( |
|
|
@ -120,17 +125,18 @@ public class ExchangeRateV2Presenter extends BasePresenter implements ExchangeRa |
|
|
|
else |
|
|
|
{ |
|
|
|
view.showPopUpMessage(paymentServiceApiResponse.paymentServiceApiResponse.getMessage(), CustomAlertDialog.AlertType.FAILED,null); |
|
|
|
view.clearCurrencyData(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void onFailed(String message) { |
|
|
|
Log.d("ExchangeV2", "Failed:" + message); |
|
|
|
view.clearCurrencyData(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void onConnectionNotEstablished(String message) { |
|
|
|
Log.d("ExchangeV2", "ConnectionNotEstablished:" + message); |
|
|
|
view.clearCurrencyData(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -179,28 +185,22 @@ public class ExchangeRateV2Presenter extends BasePresenter implements ExchangeRa |
|
|
|
|
|
|
|
view.updateExchangeRates(recipientAmount, sendAmount, transferDisplay, exRateDisplay); |
|
|
|
} |
|
|
|
else |
|
|
|
view.showPopUpMessage(exchangeCalculationApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED,null); |
|
|
|
else { |
|
|
|
view.showPopUpMessage(exchangeCalculationApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void onFailed(String message) { |
|
|
|
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, new CustomAlertDialog.CustomDialogActionListener() { |
|
|
|
@Override |
|
|
|
public void onCutomDialogActionPressed(CustomAlertDialog.AlertType alertType) { |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void onConnectionNotEstablished(String message) { |
|
|
|
view.showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, new CustomAlertDialog.CustomDialogActionListener() { |
|
|
|
@Override |
|
|
|
public void onCutomDialogActionPressed(CustomAlertDialog.AlertType alertType) { |
|
|
|
view.showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, null); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |