| @@ -166,9 +166,9 @@ public class DouYinPayHelper { | |||||
| log.info("查询订单结果 request:"+map.toString()+" response:"+response); | log.info("查询订单结果 request:"+map.toString()+" response:"+response); | ||||
| JSONObject jsonObject = JSON.parseObject(response); | JSONObject jsonObject = JSON.parseObject(response); | ||||
| Integer code = jsonObject.getInteger("err_no"); | Integer code = jsonObject.getInteger("err_no"); | ||||
| OrderQueryResult result = new OrderQueryResult(); | |||||
| if (null != code && code.intValue() == 0 ) { | if (null != code && code.intValue() == 0 ) { | ||||
| JSONObject info = jsonObject.getJSONObject("payment_info"); | JSONObject info = jsonObject.getJSONObject("payment_info"); | ||||
| OrderQueryResult result = new OrderQueryResult(); | |||||
| result.setChannelGatewayNo(info.getString("channel_gateway_no")); | result.setChannelGatewayNo(info.getString("channel_gateway_no")); | ||||
| result.setChannelNo(info.getString("channel_no")); | result.setChannelNo(info.getString("channel_no")); | ||||
| result.setWay(info.getInteger("way")); | result.setWay(info.getInteger("way")); | ||||
| @@ -180,9 +180,9 @@ public class DouYinPayHelper { | |||||
| log.info("orderQuery reponse error. request: "+JSON.toJSONString(map)+" response:"+response); | log.info("orderQuery reponse error. request: "+JSON.toJSONString(map)+" response:"+response); | ||||
| String errTips = jsonObject.getString("err_tips"); | String errTips = jsonObject.getString("err_tips"); | ||||
| if(code != null && code.intValue() == 2000 && "单号记录不存在".equals(errTips)){ | if(code != null && code.intValue() == 2000 && "单号记录不存在".equals(errTips)){ | ||||
| return null; | |||||
| return result; | |||||
| }else if(code != null && code.intValue() == 3100 && "未找到相应支付单".equals(errTips)){ | }else if(code != null && code.intValue() == 3100 && "未找到相应支付单".equals(errTips)){ | ||||
| return null; | |||||
| return result; | |||||
| }else{ | }else{ | ||||
| throw new MallinkException(ErrorCode.PAY_ORDER_ERROR.getCode(), "订单查询状态非法异常"); | throw new MallinkException(ErrorCode.PAY_ORDER_ERROR.getCode(), "订单查询状态非法异常"); | ||||
| } | } | ||||