This commit is contained in:
jiangyong27 2024-01-24 17:05:18 +08:00
parent b8c0098e5e
commit f12156cfed
1 changed files with 4 additions and 4 deletions

View File

@ -62,8 +62,8 @@ func (q *QyWeixin) Pay(ctx *gin.Context) {
req.TotalAmount = amount req.TotalAmount = amount
qyPay := qyweixin.NewAppPay(&qyweixin.PayConfig{ qyPay := qyweixin.NewAppPay(&qyweixin.PayConfig{
Corpid: config.GetConfig().QyWeixin.Corpid, Corpid: config.GetConfig().QyWeixin.Corpid,
Secret: config.GetConfig().QyWeixin.EnterpriseSecret, Secret: config.GetConfig().QyWeixin.PaySecret,
Agent: config.GetConfig().QyWeixin.EnterpriseAgent, Agent: config.GetConfig().QyWeixin.PayAgent,
SerialNumber: config.GetConfig().WxPay.PaySerialNumber, SerialNumber: config.GetConfig().WxPay.PaySerialNumber,
ApiKey: config.GetConfig().WxPay.PayApiKeyV2, ApiKey: config.GetConfig().WxPay.PayApiKeyV2,
MchId: config.GetConfig().WxPay.PayMchId, MchId: config.GetConfig().WxPay.PayMchId,
@ -71,8 +71,8 @@ func (q *QyWeixin) Pay(ctx *gin.Context) {
KeyPem: config.GetConfig().WxPay.PayKeyPem, KeyPem: config.GetConfig().WxPay.PayKeyPem,
}) })
if err := qyPay.PayMoney(&req); err != nil { if err = qyPay.PayMoney(&req); err != nil {
log.Errorf("pay error :%s", err.Error()) log.Errorf("pay req[%s] error :%s", goutil.EncodeJSON(req), err.Error())
panic(err) panic(err)
} }