From b8c0098e5eaaf1a47fd670823a7c4ced059b9af1 Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Wed, 24 Jan 2024 16:59:36 +0800 Subject: [PATCH] pay log2 --- common/config/config.go | 2 ++ conf/server.conf.prod | 7 ------- server/service/qyweixin_approve.go | 4 ++-- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/common/config/config.go b/common/config/config.go index 384b6f8..d4655ea 100644 --- a/common/config/config.go +++ b/common/config/config.go @@ -39,6 +39,8 @@ type QyWeixin struct { Corpid string `toml:"corpid"` EnterpriseAgent string `toml:"enterprise_agent"` EnterpriseSecret string `toml:"enterprise_secret"` + PaySecret string `toml:"pay_secret"` + PayAgent string `toml:"pay_agent"` ApproveAgent string `toml:"approve_agent"` ApproveSecret string `toml:"approve_secret"` } diff --git a/conf/server.conf.prod b/conf/server.conf.prod index 9285dd1..ae2d38f 100644 --- a/conf/server.conf.prod +++ b/conf/server.conf.prod @@ -17,17 +17,10 @@ password="" [qyweixin] corpid = "ww43c49db2e88a17f8" -hr_agent = "3010185" -hr_secret = "Ko2UQWZPbdM9N1snukp_1CT_3J7CcReyPAzl3ww2xoo" enterprise_agent = "1000009" enterprise_secret = "oMB24UhKe50-XPTg7vhnwoTuhEXaq5XeiHPAUtF4hOs" approve_agent = "3010040" approve_secret = "xJOClC5V2pPon1azgrAzf5kq1TB72xZ3ScR7O5G3lQo" -checkin_agent = "3010011" -checkin_secret = "6ljYNGt4DonZLmr9SCtgkTlOvtqmsOchBrTWwGl_GpU" -checkin_group = "1,2" -checkin_pay_thresold = 11 -checkin_onduty_pay_day = "" pay_secret = "JCGsxntR4E7wrEEQvWGr8_wdKtRlw48n-W6zd8lbwc4" pay_agent = "3010046" diff --git a/server/service/qyweixin_approve.go b/server/service/qyweixin_approve.go index 30e9fbe..f0c28bb 100644 --- a/server/service/qyweixin_approve.go +++ b/server/service/qyweixin_approve.go @@ -162,8 +162,8 @@ func (a *Approve) handleRefund(detail *qyweixin.ApproveDetail) { req.TotalAmount = int64(100 * newData.RefundAmount) 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,