Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加服务商子商户处置记录回调解密 #412

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions wechat/v3/notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,29 @@ type V3DecryptPartnerPayResult struct {
PromotionDetail []*PromotionDetail `json:"promotion_detail"`
}

// V3DecryptViolationNotificationResult 服务商子商户处置记录回调通知
type V3DecryptViolationNotificationResult struct {
SubMchid string `json:"sub_mchid" dc:"子商户商户ID"`
CompanyName string `json:"company_name" dc:"子商户主体名称"`
RecordId string `json:"record_id" dc:"通知ID,可用于去重"`
PunishPlan string `json:"punish_plan" dc:"处罚方案"`
PunishTime string `json:"punish_time" dc:"处罚时间"`
PunishDescription string `json:"punish_description" dc:"处罚描述"`
RiskType string `json:"risk_type" dc:"风险类型"`
RiskDescription string `json:"risk_description" dc:"风险描述"`
}

// V3DecryptViolationNotification 服务商子商户处置记录回调解密
func V3DecryptViolationNotification(req *http.Request, apiV3Key string) (res *V3DecryptViolationNotificationResult, err error) {
notifyResult, err := V3ParseNotify(req)
if err != nil {
return
}
var result *V3DecryptViolationNotificationResult
err = notifyResult.DecryptCipherTextToStruct(apiV3Key, &result)
return result, err
}

// 退款通知 解密结果
type V3DecryptRefundResult struct {
Mchid string `json:"mchid"`
Expand Down