|
@ -1,5 +1,6 @@ |
|
|
package com.gmeremit.online.gmeremittance_native.exchange_rate.presenter; |
|
|
package com.gmeremit.online.gmeremittance_native.exchange_rate.presenter; |
|
|
|
|
|
|
|
|
|
|
|
import com.crashlytics.android.Crashlytics; |
|
|
import com.gmeremit.online.gmeremittance_native.base.BasePresenter; |
|
|
import com.gmeremit.online.gmeremittance_native.base.BasePresenter; |
|
|
import com.gmeremit.online.gmeremittance_native.customwidgets.CustomAlertDialog; |
|
|
import com.gmeremit.online.gmeremittance_native.customwidgets.CustomAlertDialog; |
|
|
import com.gmeremit.online.gmeremittance_native.exchange_rate.gateway.ExchangeRateV2Gateway; |
|
|
import com.gmeremit.online.gmeremittance_native.exchange_rate.gateway.ExchangeRateV2Gateway; |
|
@ -107,8 +108,15 @@ public class ExchangeRateV2Presenter extends BasePresenter implements ExchangeRa |
|
|
protected void onSuccess(PaymentServiceData paymentServiceApiResponse) { |
|
|
protected void onSuccess(PaymentServiceData paymentServiceApiResponse) { |
|
|
if(paymentServiceApiResponse.paymentServiceApiResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) { |
|
|
if(paymentServiceApiResponse.paymentServiceApiResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) { |
|
|
CountryPaymentServiceSeedValueModel seedValueModel = paymentServiceApiResponse.getCountryPaymentServiceSeedValueModel(); |
|
|
CountryPaymentServiceSeedValueModel seedValueModel = paymentServiceApiResponse.getCountryPaymentServiceSeedValueModel(); |
|
|
|
|
|
|
|
|
CountryPaymentService defaultSelectedCountryService = paymentServiceApiResponse.getPaymentServiceApiResponse().getCountryPaymentServiceFromCountryCodeAndCurrency(seedValueModel.getCountryCode(), seedValueModel.getCurrency()); |
|
|
|
|
|
|
|
|
CountryPaymentService defaultSelectedCountryService ; |
|
|
|
|
|
try { |
|
|
|
|
|
defaultSelectedCountryService = paymentServiceApiResponse.getPaymentServiceApiResponse().getCountryPaymentServiceFromCountryCodeAndCurrency(seedValueModel.getCountryCode(), seedValueModel.getCurrency()); |
|
|
|
|
|
} |
|
|
|
|
|
catch(Exception e) |
|
|
|
|
|
{ |
|
|
|
|
|
Crashlytics.log("Default seed value is null"); |
|
|
|
|
|
defaultSelectedCountryService=null; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (defaultSelectedCountryService == null || defaultSelectedCountryService.getCountryCode() == null || defaultSelectedCountryService.getCountry() == null || defaultSelectedCountryService.getCurrency() == null) { |
|
|
if (defaultSelectedCountryService == null || defaultSelectedCountryService.getCountryCode() == null || defaultSelectedCountryService.getCountry() == null || defaultSelectedCountryService.getCurrency() == null) { |
|
|
// |
|
|
// |
|
@ -122,7 +130,7 @@ public class ExchangeRateV2Presenter extends BasePresenter implements ExchangeRa |
|
|
// defaultSelectedCountryService, |
|
|
// defaultSelectedCountryService, |
|
|
// paymentServiceApiResponse.getCountryPaymentServiceSeedValueModel().getRecipientSeedValue()); |
|
|
// paymentServiceApiResponse.getCountryPaymentServiceSeedValueModel().getRecipientSeedValue()); |
|
|
|
|
|
|
|
|
view.showCountryServiceDataForListedNativeCountry(paymentServiceApiResponse.getPaymentServiceApiResponse().getCountryPaymentServices(),defaultSelectedCountryService,Constants.DEFAULT_EXCHANGE_SEND_AMOUNT); |
|
|
|
|
|
|
|
|
view.showCountryServiceDataForListedNativeCountry(paymentServiceApiResponse.getPaymentServiceApiResponse().getCountryPaymentServices(),defaultSelectedCountryService,seedValueModel.getRecipientSeedValue()); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|