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
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)
}