From f12156cfedc46dbe0ba20c76353d1fcd0cafe6ae Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Wed, 24 Jan 2024 17:05:18 +0800 Subject: [PATCH] pay log3 --- server/controller/qyweixin.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/controller/qyweixin.go b/server/controller/qyweixin.go index 2227767..f508aa5 100644 --- a/server/controller/qyweixin.go +++ b/server/controller/qyweixin.go @@ -62,8 +62,8 @@ func (q *QyWeixin) Pay(ctx *gin.Context) { req.TotalAmount = amount qyPay := qyweixin.NewAppPay(&qyweixin.PayConfig{ Corpid: config.GetConfig().QyWeixin.Corpid, - Secret: config.GetConfig().QyWeixin.EnterpriseSecret, - Agent: config.GetConfig().QyWeixin.EnterpriseAgent, + Secret: config.GetConfig().QyWeixin.PaySecret, + Agent: config.GetConfig().QyWeixin.PayAgent, SerialNumber: config.GetConfig().WxPay.PaySerialNumber, ApiKey: config.GetConfig().WxPay.PayApiKeyV2, MchId: config.GetConfig().WxPay.PayMchId, @@ -71,8 +71,8 @@ func (q *QyWeixin) Pay(ctx *gin.Context) { KeyPem: config.GetConfig().WxPay.PayKeyPem, }) - if err := qyPay.PayMoney(&req); err != nil { - log.Errorf("pay error :%s", err.Error()) + if err = qyPay.PayMoney(&req); err != nil { + log.Errorf("pay req[%s] error :%s", goutil.EncodeJSON(req), err.Error()) panic(err) }