This commit is contained in:
jiangyong27 2024-01-24 16:59:36 +08:00
parent 8b0bd95e05
commit b8c0098e5e
3 changed files with 4 additions and 9 deletions

View File

@ -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"`
}

View File

@ -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"

View File

@ -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,