feat(pay): 在 YungouosMergePayOrderHandler 中提取并传递 key 参数

从支付渠道配置中提取 `key` 参数,并将其传递给 `MergePay.nativePay` 方法,以支持更灵活的支付配置。
This commit is contained in:
冷冷 committed 2025-03-08 16:19:32 +08:00
1 parent d0e54a7013
commit 4ea3b805fe
1 file changed
+6 -1
@@ -3,6 +3,8 @@ package com.pig4cloud.pigx.pay.handler.impl;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.extra.servlet.JakartaServletUtil;
import cn.hutool.extra.spring.SpringUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.pig4cloud.pigx.common.data.tenant.TenantContextHolder;
import com.pig4cloud.pigx.pay.entity.PayChannel;
@@ -93,10 +95,13 @@ public class YungouosMergePayOrderHandler extends AbstractPayOrderHandler {
// 判断是否是单体架构
Boolean isMicro = SpringUtil.getProperty("security.micro", Boolean.class, true);
JSONObject params = JSONUtil.parseObj(channel.getParam());
String key = params.getStr("key");
return MergePay.nativePay(String.valueOf(tradeOrder.getOrderId()), money, channel.getChannelMchId(),
tradeOrder.getBody(), "1", TenantContextHolder.getTenantId().toString(),
String.format("%s/api/%s/notify/merge/callbak", ChannelPayApiConfigKit.get().getNotifyUrl(), isMicro ? "pay" : "admin"),
ChannelPayApiConfigKit.get().getReturnUrl(), "", "", "", channel.getParam());
ChannelPayApiConfigKit.get().getReturnUrl(), "", "", "", key);
}
/**