From 023883c58581bc348d6d868ad99bab1f6745fd61 Mon Sep 17 00:00:00 2001 From: yixian Date: Thu, 8 Jul 2021 14:30:27 +0800 Subject: [PATCH] skip bsb check on sandbox mode --- .../core/impls/SimpleClientApplyServiceImpl.java | 2 +- .../payment/manage/gateway/beans/ClientSettleConfig.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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);