微信请求 header 添加 Wechatpay-Serial
This commit is contained in:
@@ -54,12 +54,14 @@ public class WechatReqUtils {
|
||||
HttpRequest request = switch (method) {
|
||||
case "POST" -> HttpUtil.createPost(configDto.getDomain() + url)
|
||||
.header("Authorization", authorization)
|
||||
.header("Wechatpay-Serial", configDto.getPublicKeyId())
|
||||
.charset(StandardCharsets.UTF_8)
|
||||
.contentType("application/json")
|
||||
.body(body );
|
||||
|
||||
case "GET" -> HttpUtil.createGet(configDto.getDomain() + url)
|
||||
.header("Authorization", authorization)
|
||||
.header("Wechatpay-Serial", configDto.getPublicKeyId())
|
||||
.charset(StandardCharsets.UTF_8)
|
||||
.contentType("application/json");
|
||||
default -> throw new CzgException("不支持的请求方法");
|
||||
|
||||
Reference in New Issue
Block a user