This commit is contained in:
2026-01-15 17:15:18 +08:00
parent 6850d499d6
commit 4d50612934
5 changed files with 26 additions and 15 deletions

View File

@@ -1,6 +1,9 @@
package service
import (
"bdqr-server/app/main/api/internal/config"
"bdqr-server/app/main/model"
"bdqr-server/pkg/lzkit/lzUtils"
"context"
"crypto/rand"
"encoding/hex"
@@ -9,9 +12,6 @@ import (
"strconv"
"sync/atomic"
"time"
"bdqr-server/app/main/api/internal/config"
"bdqr-server/app/main/model"
"bdqr-server/pkg/lzkit/lzUtils"
"github.com/smartwalle/alipay/v3"
)
@@ -217,12 +217,19 @@ func (a *AliPayService) AliTransfer(
// 构造转账请求
req := alipay.FundTransUniTransfer{
OutBizNo: outBizNo,
TransAmount: lzUtils.ToAlipayAmount(amount), // 金额格式转换
ProductCode: "TRANS_ACCOUNT_NO_PWD", // 单笔无密转账到支付宝账户
BizScene: "DIRECT_TRANSFER", // 单笔转账
OrderTitle: "账户提现", // 转账标题
Remark: remark,
OutBizNo: outBizNo,
TransAmount: lzUtils.ToAlipayAmount(amount), // 金额格式转换
ProductCode: "TRANS_ACCOUNT_NO_PWD", // 单笔无密转账到支付宝账户
BizScene: "DIRECT_TRANSFER", // 单笔转账
OrderTitle: "账户提现", // 转账标题
Remark: remark,
TransferSceneName: "佣金报酬",
TransferSceneReportInfo: []*alipay.TransferSceneReportInfo{
{
InfoType: "佣金报酬说明",
InfoContent: "推广佣金报酬",
},
},
PayeeInfo: &alipay.PayeeInfo{
Identity: payeeAccount,
IdentityType: "ALIPAY_LOGON_ID", // 根据账户类型选择: