v3报错
This commit is contained in:
@@ -5,7 +5,6 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.czg.constants.ParamCodeCst;
|
||||
import com.czg.exception.CzgException;
|
||||
import com.czg.service.RedisService;
|
||||
import com.ijpay.core.IJPayHttpResponse;
|
||||
@@ -35,7 +34,6 @@ import java.security.cert.X509Certificate;
|
||||
import java.util.Base64;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 微信支付相关
|
||||
@@ -139,12 +137,13 @@ public abstract class BaseWx {
|
||||
JSONObject jsonObject = JSONObject.parseObject(body);
|
||||
String prepayId = jsonObject.getString("prepay_id");
|
||||
if (StrUtil.isBlank(prepayId)) {
|
||||
throw new RuntimeException(jsonObject.getString("message"));
|
||||
throw new CzgException(jsonObject.getString("message"));
|
||||
}
|
||||
return WxPayKit.jsApiCreateSign(config.appId, prepayId, config.privateKey);
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
log.error("微信V3原生支付失败", e);
|
||||
throw new CzgException("暂无法支付,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user