update complaint
This commit is contained in:
@@ -5,6 +5,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.Random;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
@@ -71,19 +72,20 @@ public class Helper {
|
||||
BBPSMastersData merchantValidation = bbpsMasterDataRepo.findByMid(mid);
|
||||
|
||||
if (merchantValidation == null) {
|
||||
LOGGER.warn("Merchant not found for MID: {}", mid);
|
||||
throw new CustomException("Merchant not found by id", "FAILED", BBPSConstant.BADREQUEST, null);
|
||||
LOGGER.warn("Merchant not found for MID: {}", mid);
|
||||
throw new CustomException("Merchant not found by id", "FAILED", BBPSConstant.BADREQUEST, null);
|
||||
}
|
||||
|
||||
if (merchantValidation.getApiKey() == null && merchantValidation.getSecreteKey() == null) {
|
||||
LOGGER.warn("Merchant BBPS service is not active MID: {}", mid);
|
||||
throw new CustomException("Merchant BBPS Service is not active by mid", "FAILED", BBPSConstant.BADREQUEST,
|
||||
null);
|
||||
}
|
||||
if (StringUtils.isBlank(merchantValidation.getApiKey())
|
||||
&& StringUtils.isBlank(merchantValidation.getSecreteKey())) {
|
||||
|
||||
LOGGER.warn("Merchant BBPS service is not active MID: {}", mid);
|
||||
throw new CustomException("Merchant BBPS Service is not active by mid",
|
||||
"FAILED", BBPSConstant.BADREQUEST, null);
|
||||
}
|
||||
if (!Boolean.TRUE.equals(merchantValidation.getIsActive())) {
|
||||
LOGGER.warn("Merchant inactive for MID: {}", mid);
|
||||
throw new CustomException("Merchant is inactive", "FAILED", BBPSConstant.BADREQUEST, null);
|
||||
LOGGER.warn("Merchant inactive for MID: {}", mid);
|
||||
throw new CustomException("Merchant is inactive", "FAILED", BBPSConstant.BADREQUEST, null);
|
||||
}
|
||||
|
||||
LOGGER.info("Merchant is valid and active for MID: {}", mid);
|
||||
|
||||
Reference in New Issue
Block a user