微信 Wechatpay-Serial
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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("不支持的请求方法");
|
||||
|
||||
Reference in New Issue
Block a user