mirror of
https://gitee.com/dromara/dax-pay
synced 2026-08-08 22:25:32 +08:00
feat(alipay-isv): 新增代运营授权回调地址查询端点
This commit is contained in:
@@ -64,4 +64,11 @@ public class AlipayIsvChannelMerchantController {
|
||||
public Result<AlipayIsvAuthUrlResult> genAuthUrl(@RequestBody @Validated AlipayIsvAuthParam param) {
|
||||
return Res.ok(alipayIsvAuthService.genAuthUrl(param));
|
||||
}
|
||||
|
||||
@PermCode(code = "view", nameCn = "通道商户查看", nameEn = "Channel Merchant View")
|
||||
@Operation(summary = "获取代运营授权回调地址")
|
||||
@GetMapping("/auth-callback-url")
|
||||
public Result<String> getAuthCallbackUrl() {
|
||||
return Res.ok(alipayIsvAuthService.getAuthCallbackUrl());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +83,16 @@ public class AlipayIsvAuthService {
|
||||
return new AlipayIsvAuthUrlResult().setAuthUrl(authUrl);
|
||||
}
|
||||
|
||||
/// 获取代运营授权回调地址(用于支付宝开放平台配置)
|
||||
public String getAuthCallbackUrl() {
|
||||
String gatewayBase = platformUrlConfigService.getUrlConfig().getPaymentGatewayBaseUrl();
|
||||
if (StrUtil.isBlank(gatewayBase)) {
|
||||
throw new BizInfoException(DaxPayErrorCode.OPERATION_FAIL,
|
||||
"error.channel.alipay.paymentGatewayUrlRequired");
|
||||
}
|
||||
return gatewayBase + "/isv-auth/alipay";
|
||||
}
|
||||
|
||||
/// H5 回调: 授权码换 token + 绑定校验 + 写回通道商户
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void auth(AlipayIsvAuthParam param) {
|
||||
|
||||
Reference in New Issue
Block a user