skip bsb check on sandbox mode

master
yixian 4 years ago
parent 2269b995fd
commit 023883c585

@ -798,7 +798,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
HttpRequestResult result = new HttpRequestGenerator(url, RequestMethod.GET).execute();
if (result.isSuccess()) {
banInfo = result.getResponseContentJSONObj();
if (!banInfo.getBoolean("valid")){
if (!banInfo.getBooleanValue("valid")){
throw new NotFoundException("BSB Number Not Found");
}
}

@ -82,7 +82,9 @@ public class ClientSettleConfig {
throw new BadRequestException("PARAM_ERROR:Invalid Account Name format");
}
if (!sandboxMode) {
if (sandboxMode) {
bankQueryInfo = new JSONObject();
} else {
bankQueryInfo = getBankInfo(bsbNo);
if (bankQueryInfo == null || bankQueryInfo.isEmpty() || !bankQueryInfo.getBooleanValue("valid")) {
throw new BadRequestException("PARAM_ERROR:BSB No is invalid");
@ -114,6 +116,8 @@ public class ClientSettleConfig {
HttpRequestResult result = new HttpRequestGenerator(url, RequestMethod.GET).execute();
if (result.isSuccess()) {
res = result.getResponseContentJSONObj();
} else {
logger.error("Request bsb info error {}-->{}", bsb_no, result.getResponseContentString());
}
} catch (IOException e) {
logger.error(e.getMessage(), e);

Loading…
Cancel
Save