feat(main): fix url

This commit is contained in:
2025-02-18 15:23:26 +08:00
parent 761796bd35
commit 6a5eab11ea
12 changed files with 616 additions and 53 deletions

View File

@@ -61,10 +61,13 @@ func (a *AliPayService) CreateAlipayAppOrder(amount float64, subject string, out
// CreateAlipayH5Order 创建支付宝H5支付订单
func (a *AliPayService) CreateAlipayH5Order(amount float64, subject string, outTradeNo string, brand string) (string, error) {
var returnURL string
var notifyURL string
if brand == "tyc" {
returnURL = "https://www.tianyuancha.com/report"
notifyURL = "https://www.tianyuancha.com/api/v1/pay/wechat/callback"
} else {
returnURL = a.config.ReturnURL
notifyURL = a.config.NotifyUrl
}
client := a.AlipayClient
totalAmount := lzUtils.ToAlipayAmount(amount)
@@ -74,8 +77,8 @@ func (a *AliPayService) CreateAlipayH5Order(amount float64, subject string, outT
Subject: subject,
OutTradeNo: outTradeNo,
TotalAmount: totalAmount,
ProductCode: "QUICK_WAP_PAY", // H5支付专用产品码
NotifyURL: a.config.NotifyUrl, // 异步回调通知地址
ProductCode: "QUICK_WAP_PAY", // H5支付专用产品码
NotifyURL: notifyURL, // 异步回调通知地址
ReturnURL: returnURL,
},
}