微信 Wechatpay-Serial

This commit is contained in:
gong
2026-01-09 18:18:53 +08:00
parent 3a5bd9e994
commit 021a837c1b
3 changed files with 11 additions and 5 deletions

View File

@@ -370,10 +370,10 @@ public class EntryManager {
// uploadParamImage(merchantDto);
verifyEntryParam(merchantDto);
// uploadParamImage(merchantDto);
uploadParamImage(merchantDto);
// System.out.println(merchantDto);
// entryMerchant(merchantDto, PayCst.Platform.WECHAT);
entryMerchant(merchantDto, PayCst.Platform.ALIPAY);
entryMerchant(merchantDto, PayCst.Platform.WECHAT);
// entryMerchant(merchantDto, PayCst.Platform.ALIPAY);
// entryMerchant(merchantDto, PayCst.Platform.WECHAT, PayCst.Platform.ALIPAY);
}

View File

@@ -32,6 +32,9 @@ public class AlipayConfigDto {
*/
private String domain;
/**
* 第三方应用 签约当面付
*/
public static AlipayConfigDto getThirdDefaultConfig() {
return new AlipayConfigDto()
.setAppId("2021006121646825")
@@ -50,6 +53,9 @@ public class AlipayConfigDto {
// .setDomain("https://openapi.alipay.com/gateway.do");
}
/**
* 直付通商户配置
*/
public static AlipayConfigDto getDefaultConfig() {
// return new AlipayConfigDto()
// .setAppId("2021006121646825")

View File

@@ -56,14 +56,14 @@ public class WechatReqUtils {
HttpRequest request = switch (method) {
case "POST" -> HttpUtil.createPost(configDto.getDomain() + url)
.header("Authorization", authorization)
.header("Wechatpay-Serial", configDto.getSerialNumber())
.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.getSerialNumber())
.header("Wechatpay-Serial", configDto.getPublicKeyId())
.charset(StandardCharsets.UTF_8)
.contentType("application/json");
default -> throw new CzgException("不支持的请求方法");