四要素用户身份认证
This commit is contained in:
@@ -128,9 +128,11 @@ public class AliServiceImpl implements AliService {
|
|||||||
// {"error_code":0,"reason":"成功","result":{"respCode":"0","respMsg":"银行卡鉴权成功","bancardInfor":{"bankName":"招商银行","BankCode":"03080000","BankId":5,"type":"借记卡","cardname":"一卡通(银联卡)","tel":"95555","Icon":"2014121619271052743.gif"}},"sn":"010817431025283426800706871"}
|
// {"error_code":0,"reason":"成功","result":{"respCode":"0","respMsg":"银行卡鉴权成功","bancardInfor":{"bankName":"招商银行","BankCode":"03080000","BankId":5,"type":"借记卡","cardname":"一卡通(银联卡)","tel":"95555","Icon":"2014121619271052743.gif"}},"sn":"010817431025283426800706871"}
|
||||||
// {"error_code":10028,"reason":"成功","result":{"respCode":"6","respMsg":"身份证格式有误","bancardInfor":{"bankName":"招商银行","BankCode":"03080000","BankId":5,"type":"借记卡","cardname":"一卡通(银联卡)","tel":"95555","Icon":"2014121619271052743.gif"}},"sn":"010817575524183118006799233"}
|
// {"error_code":10028,"reason":"成功","result":{"respCode":"6","respMsg":"身份证格式有误","bancardInfor":{"bankName":"招商银行","BankCode":"03080000","BankId":5,"type":"借记卡","cardname":"一卡通(银联卡)","tel":"95555","Icon":"2014121619271052743.gif"}},"sn":"010817575524183118006799233"}
|
||||||
JSONObject ret = JSONUtil.parseObj(respBody);
|
JSONObject ret = JSONUtil.parseObj(respBody);
|
||||||
|
JSONObject result = ret.getJSONObject("result");
|
||||||
Integer errorCode = ret.getInt("error_code");
|
Integer errorCode = ret.getInt("error_code");
|
||||||
if (errorCode != 0) {
|
String respCode = result.getStr("respCode");
|
||||||
JSONObject result = ret.getJSONObject("result");
|
if (errorCode == 0 && "0".equals(respCode)) {
|
||||||
|
}else{
|
||||||
throw new SqxException(result.getStr("respMsg"));
|
throw new SqxException(result.getStr("respMsg"));
|
||||||
}
|
}
|
||||||
return respBody;
|
return respBody;
|
||||||
|
|||||||
Reference in New Issue
Block a user