微信 Wechatpay-Serial
This commit is contained in:
@@ -370,10 +370,10 @@ public class EntryManager {
|
|||||||
// uploadParamImage(merchantDto);
|
// uploadParamImage(merchantDto);
|
||||||
|
|
||||||
verifyEntryParam(merchantDto);
|
verifyEntryParam(merchantDto);
|
||||||
// uploadParamImage(merchantDto);
|
uploadParamImage(merchantDto);
|
||||||
// System.out.println(merchantDto);
|
// System.out.println(merchantDto);
|
||||||
// entryMerchant(merchantDto, PayCst.Platform.WECHAT);
|
entryMerchant(merchantDto, PayCst.Platform.WECHAT);
|
||||||
entryMerchant(merchantDto, PayCst.Platform.ALIPAY);
|
// entryMerchant(merchantDto, PayCst.Platform.ALIPAY);
|
||||||
// entryMerchant(merchantDto, PayCst.Platform.WECHAT, PayCst.Platform.ALIPAY);
|
// entryMerchant(merchantDto, PayCst.Platform.WECHAT, PayCst.Platform.ALIPAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ public class AlipayConfigDto {
|
|||||||
*/
|
*/
|
||||||
private String domain;
|
private String domain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第三方应用 签约当面付
|
||||||
|
*/
|
||||||
public static AlipayConfigDto getThirdDefaultConfig() {
|
public static AlipayConfigDto getThirdDefaultConfig() {
|
||||||
return new AlipayConfigDto()
|
return new AlipayConfigDto()
|
||||||
.setAppId("2021006121646825")
|
.setAppId("2021006121646825")
|
||||||
@@ -50,6 +53,9 @@ public class AlipayConfigDto {
|
|||||||
// .setDomain("https://openapi.alipay.com/gateway.do");
|
// .setDomain("https://openapi.alipay.com/gateway.do");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直付通商户配置
|
||||||
|
*/
|
||||||
public static AlipayConfigDto getDefaultConfig() {
|
public static AlipayConfigDto getDefaultConfig() {
|
||||||
// return new AlipayConfigDto()
|
// return new AlipayConfigDto()
|
||||||
// .setAppId("2021006121646825")
|
// .setAppId("2021006121646825")
|
||||||
|
|||||||
@@ -56,14 +56,14 @@ public class WechatReqUtils {
|
|||||||
HttpRequest request = switch (method) {
|
HttpRequest request = switch (method) {
|
||||||
case "POST" -> HttpUtil.createPost(configDto.getDomain() + url)
|
case "POST" -> HttpUtil.createPost(configDto.getDomain() + url)
|
||||||
.header("Authorization", authorization)
|
.header("Authorization", authorization)
|
||||||
.header("Wechatpay-Serial", configDto.getSerialNumber())
|
.header("Wechatpay-Serial", configDto.getPublicKeyId())
|
||||||
.charset(StandardCharsets.UTF_8)
|
.charset(StandardCharsets.UTF_8)
|
||||||
.contentType("application/json")
|
.contentType("application/json")
|
||||||
.body(body );
|
.body(body );
|
||||||
|
|
||||||
case "GET" -> HttpUtil.createGet(configDto.getDomain() + url)
|
case "GET" -> HttpUtil.createGet(configDto.getDomain() + url)
|
||||||
.header("Authorization", authorization)
|
.header("Authorization", authorization)
|
||||||
.header("Wechatpay-Serial", configDto.getSerialNumber())
|
.header("Wechatpay-Serial", configDto.getPublicKeyId())
|
||||||
.charset(StandardCharsets.UTF_8)
|
.charset(StandardCharsets.UTF_8)
|
||||||
.contentType("application/json");
|
.contentType("application/json");
|
||||||
default -> throw new CzgException("不支持的请求方法");
|
default -> throw new CzgException("不支持的请求方法");
|
||||||
|
|||||||
Reference in New Issue
Block a user