友店过滤异常

This commit is contained in:
egzosn@gmail.com
2017-06-08 15:39:22 +08:00
parent 094c79fa7a
commit f9c818c6e1

View File

@@ -178,10 +178,17 @@ public class WxYouDianPayService extends BasePayService {
data.put("order_sn", id);
String sign = createSign(SignUtils.parameterText(data, "") + apbNonce, payConfigStorage.getInputCharset());
String queryParam = SignUtils.parameterText(data) + "&apb_nonce=" + apbNonce + "&sign=" + sign;
try {
JSONObject jsonObject = execute(getHttpsVerifyUrl() + "?" + queryParam, MethodType.GET, null);
JSONObject jsonObject = execute(getHttpsVerifyUrl() + "?" + queryParam, MethodType.GET, null);
return 0 == jsonObject.getIntValue("errorcode");
}catch (PayErrorException e){
if (Integer.parseInt(e.getPayError().getErrorCode()) >= 400){
throw e;
}
return false;
}
return 0 == jsonObject.getIntValue("errorcode");
}