fix bsb number api

master
eason 7 years ago
parent 5f88caca01
commit f11a3a408b

@ -18,6 +18,7 @@ import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import au.com.royalpay.payment.tools.locale.LocaleSupport;
import au.com.royalpay.payment.tools.mail.SendMail;
@ -413,8 +414,12 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
HttpRequestResult result = new HttpRequestGenerator(url, RequestMethod.GET).execute();
if (result.isSuccess()) {
banInfo = result.getResponseContentJSONObj();
if (!banInfo.getBoolean("valid")){
throw new NotFoundException("BSB Number Not Found");
}
}
} catch (URISyntaxException | IOException e) {
throw new ServerErrorException();
}
return banInfo;
}

Loading…
Cancel
Save