.paymentTransactionType(paymentTransactionType);
CreditCardDTO creditCardDTO = requestDTO.getCreditCard();
String transactionAmount = requestDTO.getTransactionTotal();
CreditCardValidator visaValidator = new CreditCardValidator(CreditCardValidator.VISA);
CreditCardValidator amexValidator = new CreditCardValidator(CreditCardValidator.AMEX);
CreditCardValidator mcValidator = new CreditCardValidator(CreditCardValidator.MASTERCARD);
CreditCardValidator discoverValidator = new CreditCardValidator(CreditCardValidator.DISCOVER);
if (StringUtils.isNotBlank(transactionAmount) &&
StringUtils.isNotBlank(creditCardDTO.getCreditCardNum()) &&
(StringUtils.isNotBlank(creditCardDTO.getCreditCardExpDate()) ||
(StringUtils.isNotBlank(creditCardDTO.getCreditCardExpMonth()) &&
StringUtils.isNotBlank(creditCardDTO.getCreditCardExpYear())))) {
boolean validCard = false;
if (visaValidator.isValid(creditCardDTO.getCreditCardNum())){
validCard = true;
} else if (amexValidator.isValid(creditCardDTO.getCreditCardNum())) {
validCard = true;
} else if (mcValidator.isValid(creditCardDTO.getCreditCardNum())) {
validCard = true;
} else if (discoverValidator.isValid(creditCardDTO.getCreditCardNum())) {
validCard = true;
}
boolean validDateFormat = false;
boolean validDate = false;