|
|
@ -9,7 +9,7 @@ import com.gmeremit.online.gmeremittance_native.accountmanage.presenter.payments |
|
|
|
import com.gmeremit.online.gmeremittance_native.base.BasePresenter; |
|
|
|
import com.gmeremit.online.gmeremittance_native.customwidgets.CustomAlertDialog; |
|
|
|
import com.gmeremit.online.gmeremittance_native.domesticremit.send.model.KFTCBalanceCheckDTO; |
|
|
|
import com.gmeremit.online.gmeremittance_native.utils.https.GenericThrowable; |
|
|
|
import com.gmeremit.online.gmeremittance_native.security.utils.SecurityUtils; |
|
|
|
import com.gmeremit.online.gmeremittance_native.topup.local.model.topup.ButtonsGrid; |
|
|
|
import com.gmeremit.online.gmeremittance_native.topup.local.model.topup.CardInfoDTO; |
|
|
|
import com.gmeremit.online.gmeremittance_native.topup.local.model.topup.LocalTopUpDetailDTO; |
|
|
@ -24,9 +24,9 @@ import com.gmeremit.online.gmeremittance_native.utils.Constants; |
|
|
|
import com.gmeremit.online.gmeremittance_native.utils.Utils; |
|
|
|
import com.gmeremit.online.gmeremittance_native.utils.https.GenericApiObserverResponseV2; |
|
|
|
import com.gmeremit.online.gmeremittance_native.utils.https.GenericResponseDataModel; |
|
|
|
import com.gmeremit.online.gmeremittance_native.utils.https.GenericThrowable; |
|
|
|
import com.gmeremit.online.gmeremittance_native.utils.https.HTTPConstants; |
|
|
|
import com.gmeremit.online.gmeremittance_native.utils.https.HttpClientV2; |
|
|
|
import com.gmeremit.online.gmeremittance_native.security.utils.SecurityUtils; |
|
|
|
import com.google.gson.reflect.TypeToken; |
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
@ -356,8 +356,10 @@ public class LocalTopUpPresenter extends BasePresenter implements LocalTopUpPres |
|
|
|
LocalTopUpTxnRequestBodyDTO localTopUpTxnRequestBodyDTO = new LocalTopUpTxnRequestBodyDTO(); |
|
|
|
localTopUpTxnRequestBodyDTO.setBuyType(REGULAR_CARD_TYPE); |
|
|
|
localTopUpTxnRequestBodyDTO.setCustomerId(this.gateway.getUserIDNumber()); |
|
|
|
localTopUpTxnRequestBodyDTO.setChargeType(regularTopUpValidator.selectedCarrierType.getCardCode()); |
|
|
|
localTopUpTxnRequestBodyDTO.setCardName(regularTopUpValidator.selectedCarrierType.getCardName()); |
|
|
|
// localTopUpTxnRequestBodyDTO.setChargeType(regularTopUpValidator.selectedCarrierType.getCardCode()); |
|
|
|
// localTopUpTxnRequestBodyDTO.setCardName(regularTopUpValidator.selectedCarrierType.getCardName()); |
|
|
|
localTopUpTxnRequestBodyDTO.setChargeType(""); |
|
|
|
localTopUpTxnRequestBodyDTO.setCardName(""); |
|
|
|
localTopUpTxnRequestBodyDTO.setPhoneNo(userMsisdn); |
|
|
|
localTopUpTxnRequestBodyDTO.setPrice(regularTopUpValidator.selectedDeno.getPrice()); |
|
|
|
localTopUpTxnRequestBodyDTO.setUseWalletMoney(regularTopUpValidator.selectedDeno.getPrice()); |
|
|
@ -481,7 +483,7 @@ public class LocalTopUpPresenter extends BasePresenter implements LocalTopUpPres |
|
|
|
|
|
|
|
@Override |
|
|
|
public void onRegularTopUpCarrierTypeSelected(CardInfoDTO carrierType) { |
|
|
|
regularTopUpValidator.isSelectedCarrierTypeValid(carrierType); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -509,11 +511,10 @@ public class LocalTopUpPresenter extends BasePresenter implements LocalTopUpPres |
|
|
|
public class RegularTopUpValidator { |
|
|
|
|
|
|
|
private ButtonsGrid selectedDeno; |
|
|
|
private CardInfoDTO selectedCarrierType; |
|
|
|
|
|
|
|
void isDenoValid(ButtonsGrid selectedDeno) { |
|
|
|
this.selectedDeno = selectedDeno; |
|
|
|
if (selectedDeno != null && selectedDeno.getPrice() != null && this.selectedCarrierType != null) { |
|
|
|
if (selectedDeno != null && selectedDeno.getPrice() != null) { |
|
|
|
//Since we are showing account balance only when user explicitly request. So by-pass amount comparision |
|
|
|
//if user hasn't viewed corresponding account balance otherwise perform comparision. |
|
|
|
compareReuglarTopPrices(); |
|
|
@ -544,18 +545,10 @@ public class LocalTopUpPresenter extends BasePresenter implements LocalTopUpPres |
|
|
|
|
|
|
|
public void validateAll() { |
|
|
|
isDenoValid(selectedDeno); |
|
|
|
isSelectedCarrierTypeValid(selectedCarrierType); |
|
|
|
// isSelectedCarrierTypeValid(selectedCarrierType); |
|
|
|
} |
|
|
|
|
|
|
|
public void isSelectedCarrierTypeValid(CardInfoDTO carrierType) { |
|
|
|
this.selectedCarrierType = carrierType; |
|
|
|
if (selectedCarrierType != null && this.selectedDeno != null) { |
|
|
|
compareReuglarTopPrices(); |
|
|
|
} else |
|
|
|
view.enableRegularTopUpButton(false, getStringfromStringId(R.string.continue_text)); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public class FixedTopUpValidator { |
|
|
|