diff --git a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java index 357d06bb9..034a95dd0 100644 --- a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java @@ -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"); } } diff --git a/src/main/java/au/com/royalpay/payment/manage/gateway/beans/ClientSettleConfig.java b/src/main/java/au/com/royalpay/payment/manage/gateway/beans/ClientSettleConfig.java index d7c0245cd..35a832bb4 100644 --- a/src/main/java/au/com/royalpay/payment/manage/gateway/beans/ClientSettleConfig.java +++ b/src/main/java/au/com/royalpay/payment/manage/gateway/beans/ClientSettleConfig.java @@ -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);