fix 路径拼接错误和添加请求路径注解

This commit is contained in:
DaxPay
2024-10-12 11:05:06 +08:00
parent 0612a9dcbe
commit 1d6fbd959e
9 changed files with 23 additions and 11 deletions

View File

@@ -111,7 +111,7 @@ public class AliPayConfigService {
public String getReturnUrl() {
MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo();
var platformInfo = platformConfigService.getConfig();
return StrUtil.format("{}/unipay/return/{}/{}/alipay",platformInfo.getGatewayServiceUrl(), mchAppInfo.getAppId());
return StrUtil.format("{}/unipay/return/{}/alipay",platformInfo.getGatewayServiceUrl(), mchAppInfo.getAppId());
}
/**

View File

@@ -48,7 +48,7 @@ public class AliPayAuthService {
// 授权地址
String serverUrl = platformConfig.getGatewayMobileUrl();
String authUrl = StrUtil.format("{}/alipay/auth/{}/{}/{}/{}",
String authUrl = StrUtil.format("{}/alipay/auth/{}/{}/{}",
serverUrl, param.getAppId(),param.getChannel(),queryCode,aliPayConfig.getAliAppId());
return new AuthUrlResult().setAuthUrl(authUrl).setQueryCode(queryCode);

View File

@@ -140,7 +140,7 @@ public class UnionPayConfigService {
public String getReturnUrl() {
MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo();
var platformInfo = platformConfigService.getConfig();
return StrUtil.format("{}/unipay/return/{}/{}/union",platformInfo.getGatewayServiceUrl(),mchAppInfo.getAppId());
return StrUtil.format("{}/unipay/return/{}/union",platformInfo.getGatewayServiceUrl(),mchAppInfo.getAppId());
}
/**

View File

@@ -47,7 +47,7 @@ public class WechatAuthService {
PlatformConfig platformConfig = platformsConfigService.getConfig();
String queryCode = RandomUtil.randomString(10);
String serverUrl = platformConfig.getGatewayMobileUrl();
String redirectUrl = StrUtil.format("{}/wechat/auth/{}/{}/{}", serverUrl, param.getAppId(), param.getChannel(),queryCode);
String redirectUrl = StrUtil.format("{}/wechat/auth/{}/{}", serverUrl, param.getAppId(), param.getChannel(),queryCode);
String authUrl = wxMpService.getOAuth2Service().buildAuthorizationUrl(redirectUrl, WxConsts.OAuth2Scope.SNSAPI_BASE, "");
return new AuthUrlResult().setAuthUrl(authUrl).setQueryCode(queryCode);
}

View File

@@ -95,7 +95,7 @@ public class WechatPayConfigService {
public String getPayNotifyUrl() {
MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo();
var platformInfo = platformConfigService.getConfig();
return StrUtil.format("{}/unipay/callback/{}/{}/wechat/pay",platformInfo.getGatewayServiceUrl(),mchAppInfo.getAppId());
return StrUtil.format("{}/unipay/callback/{}/wechat/pay",platformInfo.getGatewayServiceUrl(),mchAppInfo.getAppId());
}
/**
@@ -104,7 +104,7 @@ public class WechatPayConfigService {
public String getRefundNotifyUrl() {
MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo();
var platformInfo = platformConfigService.getConfig();
return StrUtil.format("{}/unipay/callback/{}/{}/wechat/refund",platformInfo.getGatewayServiceUrl(), mchAppInfo.getAppId());
return StrUtil.format("{}/unipay/callback/{/wechat/refund",platformInfo.getGatewayServiceUrl(), mchAppInfo.getAppId());
}
/**
@@ -113,7 +113,7 @@ public class WechatPayConfigService {
public String getTransferNotifyUrl() {
MchAppLocal mchAppInfo = PaymentContextLocal.get().getMchAppInfo();
var platformInfo = platformConfigService.getConfig();
return StrUtil.format("{}/unipay/callback/{}/{}/wechat/transfer",platformInfo.getGatewayServiceUrl(), mchAppInfo.getAppId());
return StrUtil.format("{}/unipay/callback/{}/wechat/transfer",platformInfo.getGatewayServiceUrl(), mchAppInfo.getAppId());
}

View File

@@ -43,7 +43,7 @@ public class WechatPayCashierService {
WxMpService wxMpService = this.getWxMpService();
PlatformConfig platformConfig = platformConfigService.getConfig();
String serverUrl = platformConfig.getGatewayMobileUrl();
String redirectUrl = StrUtil.format("{}/wechat/cashier/{}/{}", serverUrl, param.getAppId());
String redirectUrl = StrUtil.format("{}/wechat/cashier/{}", serverUrl, param.getAppId());
return wxMpService.getOAuth2Service().buildAuthorizationUrl(redirectUrl, WxConsts.OAuth2Scope.SNSAPI_BASE, "");
}