Compare commits
3 Commits
d8d1a5c1d5
...
80a1229d0f
| Author | SHA1 | Date | |
|---|---|---|---|
| 80a1229d0f | |||
| e0906ab434 | |||
| 620620e138 |
@ -151,6 +151,9 @@ public class CardWaitingFragment extends DataBindingFragment implements DataBind
|
|||||||
}else if(sharedViewModel.getIsSeePhone().getValue() != null && sharedViewModel.getIsSeePhone().getValue()) {
|
}else if(sharedViewModel.getIsSeePhone().getValue() != null && sharedViewModel.getIsSeePhone().getValue()) {
|
||||||
cardReadViewModel.setCheckCardAlertMsg("Please Tap!",false);
|
cardReadViewModel.setCheckCardAlertMsg("Please Tap!",false);
|
||||||
setupCardReadProcess(true);
|
setupCardReadProcess(true);
|
||||||
|
} else if(sharedViewModel.getIsCardAppBlock().getValue() != null && sharedViewModel.getIsCardAppBlock().getValue()) {
|
||||||
|
cardReadViewModel.setCheckCardAlertMsg("Magstripe not allowed!",false);
|
||||||
|
setupCardReadProcess(true);
|
||||||
} else {
|
} else {
|
||||||
setupCardReadProcess(false);
|
setupCardReadProcess(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -249,7 +249,25 @@ public class EmvTransactionFragment extends DataBindingFragment {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case CARD_APP_BLOCKED:
|
||||||
|
if(cardReadViewModel.cardTypeData.getValue()!= null && cardReadViewModel.cardTypeData.getValue() == CardTypeX.IC.value) {
|
||||||
|
isCardInserted(new CardDetectCallback() {
|
||||||
|
@Override
|
||||||
|
public void onComplete() {
|
||||||
|
sharedViewModel.setIsCardAppBlock(true);
|
||||||
|
navigateToCheckCard();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if(cardReadViewModel.cardTypeData.getValue() != null && cardReadViewModel.cardTypeData.getValue() == CardTypeX.NFC.value) {
|
||||||
|
isCardTaped("Please try again",new CardDetectCallback() {
|
||||||
|
@Override
|
||||||
|
public void onComplete() {
|
||||||
|
sharedViewModel.setIsCardAppBlock(true);
|
||||||
|
navigateToCheckCard();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
// sharedViewModel.set_errorFragmentMsg("Interface not found!");
|
// sharedViewModel.set_errorFragmentMsg("Interface not found!");
|
||||||
// navigateToError();
|
// navigateToError();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -164,6 +164,9 @@ public class EmvTransactionProcessViewModel extends EmvBaseViewModel implements
|
|||||||
case EMV_TRY_AGAIN:
|
case EMV_TRY_AGAIN:
|
||||||
emvResultStatus.postValue(EmvResultStatus.READ_CARD_RETRY);
|
emvResultStatus.postValue(EmvResultStatus.READ_CARD_RETRY);
|
||||||
break;
|
break;
|
||||||
|
case EMV_CARD_APP_BLOCK:
|
||||||
|
emvResultStatus.postValue(EmvResultStatus.CARD_APP_BLOCKED);
|
||||||
|
break;
|
||||||
case EMV_CONFIRM_CODE_VERIFY:
|
case EMV_CONFIRM_CODE_VERIFY:
|
||||||
emvResultStatus.postValue(EmvResultStatus.CONFIRM_CODE_VERIFY);
|
emvResultStatus.postValue(EmvResultStatus.CONFIRM_CODE_VERIFY);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -164,6 +164,7 @@ public class SharedViewModel extends ViewModel {
|
|||||||
|
|
||||||
private SingleLiveEvent<Boolean> isFallback = new SingleLiveEvent<>();
|
private SingleLiveEvent<Boolean> isFallback = new SingleLiveEvent<>();
|
||||||
private SingleLiveEvent<Boolean> isSeePhone = new SingleLiveEvent<>();
|
private SingleLiveEvent<Boolean> isSeePhone = new SingleLiveEvent<>();
|
||||||
|
private SingleLiveEvent<Boolean> isCardAppBlock = new SingleLiveEvent<>();
|
||||||
|
|
||||||
private SingleLiveEvent<Boolean> _isCardDataExist = new SingleLiveEvent<>();
|
private SingleLiveEvent<Boolean> _isCardDataExist = new SingleLiveEvent<>();
|
||||||
|
|
||||||
@ -233,6 +234,10 @@ public class SharedViewModel extends ViewModel {
|
|||||||
|
|
||||||
public SingleLiveEvent<Boolean> getIsFallback() { return isFallback;}
|
public SingleLiveEvent<Boolean> getIsFallback() { return isFallback;}
|
||||||
|
|
||||||
|
public void setIsCardAppBlock(boolean status) { isCardAppBlock.setValue(status);}
|
||||||
|
|
||||||
|
public SingleLiveEvent<Boolean> getIsCardAppBlock() {return isCardAppBlock;}
|
||||||
|
|
||||||
public void setIsSeePhone(boolean status) { isSeePhone.setValue(status);}
|
public void setIsSeePhone(boolean status) { isSeePhone.setValue(status);}
|
||||||
|
|
||||||
public SingleLiveEvent<Boolean> getIsSeePhone() { return isSeePhone;}
|
public SingleLiveEvent<Boolean> getIsSeePhone() { return isSeePhone;}
|
||||||
|
|||||||
@ -30,5 +30,6 @@ public enum EmvResultStatus {
|
|||||||
CONFIRM_CODE_VERIFY,
|
CONFIRM_CODE_VERIFY,
|
||||||
MPU_CARD,
|
MPU_CARD,
|
||||||
SEE_PHONE,
|
SEE_PHONE,
|
||||||
OTHER_INTERFACE
|
OTHER_INTERFACE,
|
||||||
|
CARD_APP_BLOCKED
|
||||||
}
|
}
|
||||||
|
|||||||
@ -153,6 +153,8 @@ public abstract class EmvBaseViewModel extends BaseViewModel {
|
|||||||
protected static final int EMV_ONLINE_PROCESS = 11;
|
protected static final int EMV_ONLINE_PROCESS = 11;
|
||||||
protected static final int EMV_ERROR = 12;
|
protected static final int EMV_ERROR = 12;
|
||||||
protected static final int EMV_TRY_AGAIN = 13;
|
protected static final int EMV_TRY_AGAIN = 13;
|
||||||
|
|
||||||
|
protected static final int EMV_CARD_APP_BLOCK = 23;
|
||||||
protected static final int EMV_CTLS_TRY_AGAIN = 13;
|
protected static final int EMV_CTLS_TRY_AGAIN = 13;
|
||||||
|
|
||||||
protected static final int EMV_CONFIRM_CODE_VERIFY = 14;
|
protected static final int EMV_CONFIRM_CODE_VERIFY = 14;
|
||||||
@ -599,7 +601,7 @@ public abstract class EmvBaseViewModel extends BaseViewModel {
|
|||||||
// customPinPadKeyboard.setKeyBoard(ByteUtil.bytes2HexStr(number));
|
// customPinPadKeyboard.setKeyBoard(ByteUtil.bytes2HexStr(number));
|
||||||
|
|
||||||
LogUtil.d(TAG, "PinPad: " + ByteUtil.bytes2HexStr(number));
|
LogUtil.d(TAG, "PinPad: " + ByteUtil.bytes2HexStr(number));
|
||||||
int[] supperLen = new int[]{0x00, 0x04, 0x06};
|
int[] supperLen = new int[]{0x00, 0x04, 0x06,0x12};
|
||||||
|
|
||||||
|
|
||||||
pinPad.setPinKeyboardViewMode(PinKeyboardViewModeEnum.DEFAULT);
|
pinPad.setPinKeyboardViewMode(PinKeyboardViewModeEnum.DEFAULT);
|
||||||
@ -826,6 +828,11 @@ public abstract class EmvBaseViewModel extends BaseViewModel {
|
|||||||
//union pay online contactless--application should go online
|
//union pay online contactless--application should go online
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SdkResult.Emv_App_Block:
|
||||||
|
case SdkResult.Emv_Card_Block:
|
||||||
|
mHandler.sendEmptyMessage(EMV_CARD_APP_BLOCK);
|
||||||
|
break;
|
||||||
|
|
||||||
case SdkResult.Emv_Candidatelist_Empty:// Application have no aid list
|
case SdkResult.Emv_Candidatelist_Empty:// Application have no aid list
|
||||||
case SdkResult.Emv_FallBack:// FallBack ,chip card reset failed
|
case SdkResult.Emv_FallBack:// FallBack ,chip card reset failed
|
||||||
//fallback process
|
//fallback process
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user