wechat

package
v1.5.100 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 32 Imported by: 25

Documentation

Index

Constants

View Source
const (
	Success     = 0
	SignTypeRSA = "RSA"
	SignTypeSM2 = "SM2"

	CertTypeALL CertType = "ALL"
	CertTypeRSA CertType = "RSA"
	CertTypeSM2 CertType = "SM2"

	MethodGet           = "GET"
	MethodPost          = "POST"
	MethodPut           = "PUT"
	MethodDelete        = "DELETE"
	MethodPATCH         = "PATCH"
	HeaderAuthorization = "Authorization"
	HeaderRequestID     = "Request-ID"

	HeaderTimestamp = "Wechatpay-Timestamp"
	HeaderNonce     = "Wechatpay-Nonce"
	HeaderSignature = "Wechatpay-Signature"
	HeaderSerial    = "Wechatpay-Serial"

	Authorization = "WECHATPAY2-SHA256-RSA2048"

	// 特约商户进件申请单状态
	ApplyStateEditing       = "APPLYMENT_STATE_EDITTING"        // 编辑中
	ApplyStateAuditing      = "APPLYMENT_STATE_AUDITING"        // 审核中
	ApplyStateRejected      = "APPLYMENT_STATE_REJECTED"        // 已驳回
	ApplyStateToBeConfirmed = "APPLYMENT_STATE_TO_BE_CONFIRMED" // 待账户验证
	ApplyStateSigning       = "APPLYMENT_STATE_SIGNING"         // 开通权限中
	ApplyStateFinished      = "APPLYMENT_STATE_FINISHED"        // 已完成
	ApplyStateCanceled      = "APPLYMENT_STATE_CANCELED"        // 已作废

	// 特约商户结算账号类型
	ApplySettlementAccountTypeBusiness = "ACCOUNT_TYPE_BUSINESS" // 对公银行账户
	ApplySettlementAccountTypePrivate  = "ACCOUNT_TYPE_PRIVATE"  // 经营者个人银行卡

	//结算账号修改模式
	ApplySettlementModifyModeAsync = "MODIFY_MODE_ASYNC" //受理模式

	// 特约商户结算账号汇款验证结果
	ApplySettlementVerifying     = "VERIFYING"      // 系统汇款验证中,商户可发起提现尝试
	ApplySettlementVerifySuccess = "VERIFY_SUCCESS" // 系统成功汇款,该账户可正常发起提现
	ApplySettlementVerifyFail    = "VERIFY_FAIL"    // 系统汇款失败,该账户无法发起提现,请检查修改

	// 订单号类型,1-微信订单号,2-商户订单号,3-微信侧回跳到商户前端时用于查单的单据查询id(查询支付分订单中会使用)
	TransactionId OrderNoType = 1
	OutTradeNo    OrderNoType = 2
	QueryId       OrderNoType = 3

	// v3 异步通知订单状态
	TradeStateSuccess  = "SUCCESS"    // 支付成功
	TradeStateRefund   = "REFUND"     // 转入退款
	TradeStateNoPay    = "NOTPAY"     // 未支付
	TradeStateClosed   = "CLOSED"     // 已关闭
	TradeStateRevoked  = "REVOKED"    // 已撤销(付款码支付)
	TradeStatePaying   = "USERPAYING" // 用户支付中(付款码支付)
	TradeStatePayError = "PAYERROR"   // 支付失败(其他原因,如银行返回失败)
)

Variables

This section is empty.

Functions

func V3DecryptNotifyCipherTextToBytes added in v1.5.87

func V3DecryptNotifyCipherTextToBytes(ciphertext, nonce, additional, apiV3Key string) (decrypt []byte, err error)

解密 通用方法ToBytes对象

func V3DecryptText added in v1.5.46

func V3DecryptText(cipherText string, privateKeyContent []byte) (text string, err error)

敏感参数信息解密 privateKeyContent:私钥 apiclient_key.pem 读取后的字符串内容

func V3EncryptText added in v1.5.46

func V3EncryptText(text string, wxPublicKeyContent []byte) (cipherText string, err error)

敏感参数信息加密 wxPublicKeyContent:微信平台证书内容

func V3ParseNotifyToBodyMap

func V3ParseNotifyToBodyMap(req *http.Request) (bm gopay.BodyMap, err error)

Deprecated 暂时不推荐此方法,请使用 wechat.V3ParseNotify() 解析微信回调请求的参数到 gopay.BodyMap

func V3VerifySign

func V3VerifySign(timestamp, nonce, signBody, sign, wxPubKeyContent string) (err error)

Deprecated 推荐使用 wechat.V3VerifySignByPK()

func V3VerifySignByPK added in v1.5.62

func V3VerifySignByPK(timestamp, nonce, signBody, sign string, wxPublicKey *rsa.PublicKey) (err error)

推荐直接开启自动同步验签功能 微信V3 版本验签(同步) wxPublicKey:微信平台证书公钥内容,通过 client.WxPublicKeyMap() 获取,然后根据 signInfo.HeaderSerial 获取相应的公钥

Types

type APPScoreQuery added in v1.5.97

type APPScoreQuery struct {
	MchId     string `json:"mch_id"`
	Package   string `json:"package"`
	TimeStamp string `json:"timestamp"`
	NonceStr  string `json:"nonce_str"`
	SignType  string `json:"sign_type"`
	Sign      string `json:"sign"`
}

type AccountValidation added in v1.5.65

type AccountValidation struct {
	AccountName              string `json:"account_name"`
	AccountNo                string `json:"account_no,omitempty"`
	PayAmount                int    `json:"pay_amount"`
	DestinationAccountNumber string `json:"destination_account_number"`
	DestinationAccountName   string `json:"destination_account_name"`
	DestinationAccountBank   string `json:"destination_account_bank"`
	City                     string `json:"city"`
	Remark                   string `json:"remark"`
	Deadline                 string `json:"deadline"`
}

type AdditionalInfo added in v1.5.92

type AdditionalInfo struct {
	Type           string          `json:"type"`
	SharePowerInfo *SharePowerInfo `json:"share_power_info"`
}

type Amount

type Amount struct {
	Total         int    `json:"total,omitempty"`          // 订单总金额,单位为分
	PayerTotal    int    `json:"payer_total,omitempty"`    // 用户支付金额,单位为分
	DiscountTotal int    `json:"discount_total,omitempty"` // 订单折扣
	Currency      string `json:"currency,omitempty"`       // CNY:人民币,境内商户号仅支持人民币
	PayerCurrency string `json:"payer_currency,omitempty"` // 用户支付币种
}

type AppPayParams

type AppPayParams struct {
	Appid     string `json:"appid"`
	Partnerid string `json:"partnerid"`
	Prepayid  string `json:"prepayid"`
	Package   string `json:"package"`
	Noncestr  string `json:"noncestr"`
	Timestamp string `json:"timestamp"`
	Sign      string `json:"sign"`
}

type AppletParams

type AppletParams struct {
	AppId     string `json:"appId"`
	TimeStamp string `json:"timeStamp"`
	NonceStr  string `json:"nonceStr"`
	Package   string `json:"package"`
	SignType  string `json:"signType"`
	PaySign   string `json:"paySign"`
}

type AppletScoreExtraData added in v1.5.87

type AppletScoreExtraData struct {
	MchId     string `json:"mch_id"`
	Package   string `json:"package"`
	TimeStamp string `json:"timestamp"`
	NonceStr  string `json:"nonce_str"`
	SignType  string `json:"sign_type"`
	Sign      string `json:"sign"`
}

type AppletScorePartnerExtraData added in v1.5.100

type AppletScorePartnerExtraData struct {
	Package string `json:"package"`
}

type Apply4SubModifySettlement added in v1.5.93

type Apply4SubModifySettlement struct {
	ApplicationNo string `json:"application_no"` //修改结算账户申请单号 提交二级商户修改结算账户申请后,由微信支付返回的单号,作为查询申请状态的唯一标识。
}

type Apply4SubModifySettlementRsp added in v1.5.93

type Apply4SubModifySettlementRsp struct {
	Code     int                        `json:"-"`
	SignInfo *SignInfo                  `json:"-"`
	Response *Apply4SubModifySettlement `json:"response,omitempty"`
	Error    string                     `json:"-"`
}

特约商户/二级商户修改结算账号 Rsp

type Apply4SubQuery added in v1.5.51

type Apply4SubQuery struct {
	BusinessCode      string                      `json:"business_code"`       // 业务申请编号
	ApplymentId       int64                       `json:"applyment_id"`        // 微信支付申请单号
	SubMchid          string                      `json:"sub_mchid"`           // 特约商户号
	SignUrl           string                      `json:"sign_url"`            // 超级管理员签约链接
	ApplymentState    string                      `json:"applyment_state"`     // 申请单状态
	ApplymentStateMsg string                      `json:"applyment_state_msg"` // 申请状态描述
	AuditDetail       []*Applyment4SubAuditDetail `json:"audit_detail"`        // 驳回原因详情
}

type Apply4SubQueryRsp added in v1.5.51

type Apply4SubQueryRsp struct {
	Code     int             `json:"-"`
	SignInfo *SignInfo       `json:"-"`
	Response *Apply4SubQuery `json:"response,omitempty"`
	Error    string          `json:"-"`
}

特约商户进件申请单查询 Rsp

type Apply4SubQuerySettlement added in v1.5.51

type Apply4SubQuerySettlement struct {
	AccountType      string `json:"account_type"`       // 账户类型
	AccountBank      string `json:"account_bank"`       // 开户银行
	BankName         string `json:"bank_name"`          // 开户银行全称(含支行)
	BankBranchId     string `json:"bank_branch_id"`     // 开户银行联行号
	AccountNumber    string `json:"account_number"`     // 银行账号
	VerifyResult     string `json:"verify_result"`      // 汇款验证结果
	VerifyFailReason string `json:"verify_fail_reason"` // 汇款验证失败原因
}

type Apply4SubQuerySettlementRsp added in v1.5.51

type Apply4SubQuerySettlementRsp struct {
	Code     int                       `json:"-"`
	SignInfo *SignInfo                 `json:"-"`
	Response *Apply4SubQuerySettlement `json:"response,omitempty"`
	Error    string                    `json:"-"`
}

特约商户查询结算账号 Rsp

type Apply4SubSubmit added in v1.5.51

type Apply4SubSubmit struct {
	ApplymentId int64 `json:"applyment_id"` // 微信支付申请单号
}

type Apply4SubSubmitRsp added in v1.5.51

type Apply4SubSubmitRsp struct {
	Code     int              `json:"-"`
	SignInfo *SignInfo        `json:"-"`
	Response *Apply4SubSubmit `json:"response,omitempty"`
	Error    string           `json:"-"`
}

特约商户进件提交申请单 Rsp

type Applyment4SubAuditDetail added in v1.5.51

type Applyment4SubAuditDetail struct {
	Field        string `json:"field"`         // 字段名
	FieldName    string `json:"field_name"`    // 字段名称
	RejectReason string `json:"reject_reason"` // 驳回原因
}

type AuditDetail added in v1.5.65

type AuditDetail struct {
	ParamName    string `json:"param_name"`
	RejectReason string `json:"reject_reason"`
}

type AuthorizedData added in v1.5.58

type AuthorizedData struct {
	BusinessType string   `json:"business_type"` // 授权业务类别
	Scenarios    []string `json:"scenarios"`     // 授权场景
	StockId      string   `json:"stock_id"`      // 授权批次Id
}

type AvailableTime added in v1.5.55

type AvailableTime struct {
	BeginTime int `json:"begin_time"` // 开始时间
	EndTime   int `json:"end_time"`   // 结束时间
}

type AvailableWeek added in v1.5.55

type AvailableWeek struct {
	WeekDay          []int            `json:"week_day"` // 可用星期数,0代表周日,1代表周一,以此类推
	AvailableDayTime []*AvailableTime `json:"available_day_time"`
}

type BankBranchInfo added in v1.5.71

type BankBranchInfo struct {
	BankBranchName string `json:"bank_branch_name"` // 开户银行支行名称
	BankBranchId   string `json:"bank_branch_id"`   // 开户银行支行联行号
}

type BankInfo added in v1.5.71

type BankInfo struct {
	BankAlias       string `json:"bank_alias"`        // 银行别名
	BankAliasCode   string `json:"bank_alias_code"`   // 银行别名编码
	AccountBank     string `json:"account_bank"`      // 开户银行
	AccountBankCode int    `json:"account_bank_code"` // 开户银行编码
	NeedBankBranch  bool   `json:"need_bank_branch"`  // 是否需要填写支行
}

type BankSearchBank added in v1.5.71

type BankSearchBank struct {
	TotalCount int         `json:"total_count"`    // 查询数据总条数
	Data       []*BankInfo `json:"data,omitempty"` // 银行列表
}

type BankSearchBankRsp added in v1.5.71

type BankSearchBankRsp struct {
	Code     int             `json:"-"`
	SignInfo *SignInfo       `json:"-"`
	Response *BankSearchBank `json:"response,omitempty"`
	Error    string          `json:"-"`
}

获取对私银行卡号开户银行 Rsp

type BankSearchBranch added in v1.5.71

type BankSearchBranch struct {
	TotalCount      int               `json:"total_count"`       // 查询数据总条数
	Count           int               `json:"count"`             // 本次查询数据条数
	Offset          int               `json:"offset"`            // 本次查询偏移量
	BankAlias       string            `json:"bank_alias"`        // 银行别名
	BankAliasCode   string            `json:"bank_alias_code"`   // 银行别名编码
	AccountBank     string            `json:"account_bank"`      // 开户银行
	AccountBankCode int               `json:"account_bank_code"` // 开户银行编码
	Data            []*BankBranchInfo `json:"data,omitempty"`    // 支行列表
	Links           *Link             `json:"links"`             // 分页链接
}

type BankSearchBranchListRsp added in v1.5.71

type BankSearchBranchListRsp struct {
	Code     int               `json:"-"`
	SignInfo *SignInfo         `json:"-"`
	Response *BankSearchBranch `json:"response,omitempty"`
	Error    string            `json:"-"`
}

查询支行列表 Rsp

type BankSearchCity added in v1.5.71

type BankSearchCity struct {
	TotalCount int         `json:"total_count"`    // 查询数据总条数
	Data       []*CityInfo `json:"data,omitempty"` // 城市列表
}

type BankSearchCityListRsp added in v1.5.71

type BankSearchCityListRsp struct {
	Code     int             `json:"-"`
	SignInfo *SignInfo       `json:"-"`
	Response *BankSearchCity `json:"response,omitempty"`
	Error    string          `json:"-"`
}

查询城市列表 Rsp

type BankSearchCorporateListRsp added in v1.5.71

type BankSearchCorporateListRsp struct {
	Code     int             `json:"-"`
	SignInfo *SignInfo       `json:"-"`
	Response *BankSearchList `json:"response,omitempty"`
	Error    string          `json:"-"`
}

查询支持对公业务的银行列表 Rsp

type BankSearchList added in v1.5.71

type BankSearchList struct {
	TotalCount int         `json:"total_count"`    // 查询数据总条数
	Count      int         `json:"count"`          // 本次查询数据条数
	Offset     int         `json:"offset"`         // 本次查询偏移量
	Data       []*BankInfo `json:"data,omitempty"` // 银行列表
	Links      *Link       `json:"links"`          // 分页链接
}

type BankSearchPersonalListRsp added in v1.5.71

type BankSearchPersonalListRsp struct {
	Code     int             `json:"-"`
	SignInfo *SignInfo       `json:"-"`
	Response *BankSearchList `json:"response,omitempty"`
	Error    string          `json:"-"`
}

查询支持个人业务的银行列表 Rsp

type BankSearchProvince added in v1.5.71

type BankSearchProvince struct {
	TotalCount int             `json:"total_count"`    // 查询数据总条数
	Data       []*ProvinceInfo `json:"data,omitempty"` // 省份列表
}

type BankSearchProvinceListRsp added in v1.5.71

type BankSearchProvinceListRsp struct {
	Code     int                 `json:"-"`
	SignInfo *SignInfo           `json:"-"`
	Response *BankSearchProvince `json:"response,omitempty"`
	Error    string              `json:"-"`
}

查询省份列表 Rsp

type BillDetail

type BillDetail struct {
	BillSequence int    `json:"bill_sequence"` // 商户将多个文件按账单文件序号的顺序合并为完整的资金账单文件,起始值为1
	HashType     string `json:"hash_type"`
	HashValue    string `json:"hash_value"`
	DownloadUrl  string `json:"download_url"`
	EncryptKey   string `json:"encrypt_key"` // 加密账单文件使用的加密密钥。密钥用商户证书的公钥进行加密,然后进行Base64编码
	Nonce        string `json:"nonce"`       // 加密账单文件使用的随机字符串
}

type BillRsp

type BillRsp struct {
	Code     int        `json:"-"`
	SignInfo *SignInfo  `json:"-"`
	Response *TradeBill `json:"response,omitempty"`
	Error    string     `json:"-"`
}

交易、资金账单 Rsp

type BusiFavorAssociate added in v1.5.55

type BusiFavorAssociate struct {
	WechatpayAssociateTime string `json:"wechatpay_associate_time"` // 关联成功时间
}

type BusiFavorAssociateRsp added in v1.5.55

type BusiFavorAssociateRsp struct {
	Code     int                 `json:"-"`
	SignInfo *SignInfo           `json:"-"`
	Response *BusiFavorAssociate `json:"response,omitempty"`
	Error    string              `json:"-"`
}

关联订单信息 Rsp

type BusiFavorBatchDetail added in v1.5.55

type BusiFavorBatchDetail struct {
	StockId              string                `json:"stock_id"`                         // 批次号
	StockName            string                `json:"stock_name"`                       // 商家券批次名称
	BelongMerchant       string                `json:"belong_merchant"`                  // 批次归属商户号
	Comment              string                `json:"comment"`                          // 批次备注
	GoodsName            string                `json:"goods_name"`                       // 适用商品范围
	StockType            string                `json:"stock_type"`                       // 批次类型
	StockState           string                `json:"stock_state"`                      // 批次状态
	CouponUseRule        *CouponUseRule        `json:"coupon_use_rule"`                  // 券核销相关规则
	StockSendRule        *StockSendRule        `json:"stock_send_rule"`                  // 券发放相关规则
	CustomEntrance       *CustomEntrance       `json:"custom_entrance,omitempty"`        // 自定义入口
	DisplayPatternInfo   *DisplayPatternInfo   `json:"display_pattern_info,omitempty"`   // 创建批次时的样式信息
	CouponCodeMode       string                `json:"coupon_code_mode"`                 // 券code模式
	CouponCodeCount      *CouponCodeCount      `json:"coupon_code_count,omitempty"`      // 券code数量
	NotifyConfig         *NotifyConfig         `json:"notify_config,omitempty"`          // 事件通知配置
	SendCountInformation *SendCountInformation `json:"send_count_information,omitempty"` // 批次发放情况
}

type BusiFavorBatchDetailRsp added in v1.5.55

type BusiFavorBatchDetailRsp struct {
	Code     int                   `json:"-"`
	SignInfo *SignInfo             `json:"-"`
	Response *BusiFavorBatchDetail `json:"response,omitempty"`
	Error    string                `json:"-"`
}

查询商家券详情 Rsp

type BusiFavorBatchUpdate added in v1.5.55

type BusiFavorBatchUpdate struct {
	MaxCoupons      int `json:"max_coupons"`        // 批次当前最大发放个数
	MaxCouponsByDay int `json:"max_coupons_by_day"` // 当前单天发放上限个数
}

type BusiFavorBatchUpdateRsp added in v1.5.55

type BusiFavorBatchUpdateRsp struct {
	Code     int                   `json:"-"`
	SignInfo *SignInfo             `json:"-"`
	Response *BusiFavorBatchUpdate `json:"response,omitempty"`
	Error    string                `json:"-"`
}

修改批次预算 Rsp

type BusiFavorCallbackUrl added in v1.5.55

type BusiFavorCallbackUrl struct {
	NotifyUrl string `json:"notify_url"` // 通知URL地址
	Mchid     string `json:"mchid"`      // 商户号
}

type BusiFavorCallbackUrlRsp added in v1.5.55

type BusiFavorCallbackUrlRsp struct {
	Code     int                   `json:"-"`
	SignInfo *SignInfo             `json:"-"`
	Response *BusiFavorCallbackUrl `json:"response,omitempty"`
	Error    string                `json:"-"`
}

查询商家券事件通知地址 Rsp

type BusiFavorCallbackUrlSet added in v1.5.55

type BusiFavorCallbackUrlSet struct {
	UpdateTime string `json:"update_time"` // 修改时间
	NotifyUrl  string `json:"notify_url"`  // 通知URL地址
	Mchid      string `json:"mchid"`       // 商户号
}

type BusiFavorCallbackUrlSetRsp added in v1.5.55

type BusiFavorCallbackUrlSetRsp struct {
	Code     int                      `json:"-"`
	SignInfo *SignInfo                `json:"-"`
	Response *BusiFavorCallbackUrlSet `json:"response,omitempty"`
	Error    string                   `json:"-"`
}

设置商家券事件通知地址 Rsp

type BusiFavorCodeUpload added in v1.5.55

type BusiFavorCodeUpload struct {
	StockId        string      `json:"stock_id"`        // 批次号
	TotalCount     int         `json:"total_count"`     // 去重后上传code总数
	SuccessCount   int         `json:"success_count"`   // 上传成功code个数
	SuccessCodes   []string    `json:"success_codes"`   // 上传成功的code列表
	SuccessTime    string      `json:"success_time"`    // 上传成功时间
	FailCount      int         `json:"fail_count"`      // 上传失败code个数
	FailCodes      []*FailCode `json:"fail_codes"`      // 上传失败的code及原因
	ExistCodes     []string    `json:"exist_codes"`     // 已存在的code列表
	DuplicateCodes []string    `json:"duplicate_codes"` // 本次请求中重复的code列表
}

type BusiFavorCodeUploadRsp added in v1.5.55

type BusiFavorCodeUploadRsp struct {
	Code     int                  `json:"-"`
	SignInfo *SignInfo            `json:"-"`
	Response *BusiFavorCodeUpload `json:"response,omitempty"`
	Error    string               `json:"-"`
}

上传预存code Rsp

type BusiFavorCreateRsp added in v1.5.55

type BusiFavorCreateRsp struct {
	Code     int               `json:"-"`
	SignInfo *SignInfo         `json:"-"`
	Response *FavorBatchCreate `json:"response,omitempty"`
	Error    string            `json:"-"`
}

创建商家券 Rsp

type BusiFavorDeactivate added in v1.5.55

type BusiFavorDeactivate struct {
	WechatpayDeactivateTime string `json:"wechatpay_deactivate_time"` // 券成功失效的时间
}

type BusiFavorDeactivateRsp added in v1.5.55

type BusiFavorDeactivateRsp struct {
	Code     int                  `json:"-"`
	SignInfo *SignInfo            `json:"-"`
	Response *BusiFavorDeactivate `json:"response,omitempty"`
	Error    string               `json:"-"`
}

使券失效 Rsp

type BusiFavorDisassociate added in v1.5.55

type BusiFavorDisassociate struct {
	WechatpayDisassociateTime string `json:"wechatpay_disassociate_time"` // 取消关联成功时间
}

type BusiFavorDisassociateRsp added in v1.5.55

type BusiFavorDisassociateRsp struct {
	Code     int                    `json:"-"`
	SignInfo *SignInfo              `json:"-"`
	Response *BusiFavorDisassociate `json:"response,omitempty"`
	Error    string                 `json:"-"`
}

取消关联订单信息 Rsp

type BusiFavorReturn added in v1.5.55

type BusiFavorReturn struct {
	WechatpayReturnTime string `json:"wechatpay_return_time"` // 微信退券成功的时间
}

type BusiFavorReturnRsp added in v1.5.55

type BusiFavorReturnRsp struct {
	Code     int              `json:"-"`
	SignInfo *SignInfo        `json:"-"`
	Response *BusiFavorReturn `json:"response,omitempty"`
	Error    string           `json:"-"`
}

申请退券 Rsp

type BusiFavorSend added in v1.5.58

type BusiFavorSend struct {
	CardCode string `json:"card_code"` // 消费卡code
}

type BusiFavorSendRsp added in v1.5.58

type BusiFavorSendRsp struct {
	Code     int            `json:"-"`
	SignInfo *SignInfo      `json:"-"`
	Response *BusiFavorSend `json:"response,omitempty"`
	Error    string         `json:"-"`
}

发放消费卡 Rsp

type BusiFavorSubsidyPay added in v1.5.55

type BusiFavorSubsidyPay struct {
	SubsidyReceiptId string `json:"subsidy_receipt_id"` // 补差付款单号
	StockId          string `json:"stock_id"`           // 商家券批次号
	CouponCode       string `json:"coupon_code"`        // 券的唯一标识
	TransactionId    string `json:"transaction_id"`     // 微信支付系统生成的订单号
	PayerMerchant    string `json:"payer_merchant"`     // 营销补差扣款商户号
	PayeeMerchant    string `json:"payee_merchant"`     // 营销补差入账商户号
	Amount           int    `json:"amount"`             // 补差付款金额
	Description      string `json:"description"`        // 补差付款描述
	Status           string `json:"status"`             // 补差付款单据状态
	FailReason       string `json:"fail_reason"`        // 补差付款失败原因
	SuccessTime      string `json:"success_time"`       // 补差付款完成时间
	OutSubsidyNo     string `json:"out_subsidy_no"`     // 业务请求唯一单号
	CreateTime       string `json:"create_time"`        // 补差付款发起时间
}

type BusiFavorSubsidyPayDetailRsp added in v1.5.55

type BusiFavorSubsidyPayDetailRsp struct {
	Code     int                  `json:"-"`
	SignInfo *SignInfo            `json:"-"`
	Response *BusiFavorSubsidyPay `json:"response,omitempty"`
	Error    string               `json:"-"`
}

查询营销补差付款单详情 Rsp

type BusiFavorSubsidyPayRsp added in v1.5.55

type BusiFavorSubsidyPayRsp struct {
	Code     int                  `json:"-"`
	SignInfo *SignInfo            `json:"-"`
	Response *BusiFavorSubsidyPay `json:"response,omitempty"`
	Error    string               `json:"-"`
}

营销补差付款 Rsp

type BusiFavorUse added in v1.5.55

type BusiFavorUse struct {
	StockId          string `json:"stock_id"`           // 批次号
	Openid           string `json:"openid"`             // 用户在公众号内的唯一身份标识
	WechatpayUseTime string `json:"wechatpay_use_time"` // 系统成功核销券的时间,遵循rfc3339标准
}

type BusiFavorUseRsp added in v1.5.55

type BusiFavorUseRsp struct {
	Code     int           `json:"-"`
	SignInfo *SignInfo     `json:"-"`
	Response *BusiFavorUse `json:"response,omitempty"`
	Error    string        `json:"-"`
}

核销用户券 Rsp

type BusiFavorUserCouponDetailRsp added in v1.5.55

type BusiFavorUserCouponDetailRsp struct {
	Code     int             `json:"-"`
	SignInfo *SignInfo       `json:"-"`
	Response *BusiUserCoupon `json:"response,omitempty"`
	Error    string          `json:"-"`
}

查询用户单张券详情 Rsp

type BusiFavorUserCoupons added in v1.5.55

type BusiFavorUserCoupons struct {
	Data       []*BusiUserCoupon `json:"data,omitempty"` // 结果集
	TotalCount int               `json:"total_count"`    // 批次总数
	Offset     int               `json:"offset"`         // 分页页码
	Limit      int               `json:"limit"`          // 分页大小
}

type BusiFavorUserCouponsRsp added in v1.5.55

type BusiFavorUserCouponsRsp struct {
	Code     int                   `json:"-"`
	SignInfo *SignInfo             `json:"-"`
	Response *BusiFavorUserCoupons `json:"response,omitempty"`
	Error    string                `json:"-"`
}

核销用户券 Rsp

type BusiUserCoupon added in v1.5.55

type BusiUserCoupon struct {
	BelongMerchant     string              `json:"belong_merchant"`                // 批次归属商户号
	StockName          string              `json:"stock_name"`                     // 批次名称
	Comment            string              `json:"comment"`                        // 批次备注
	GoodsName          string              `json:"goods_name"`                     // 适用商品范围
	StockType          string              `json:"stock_type"`                     // 批次类型
	Transferable       bool                `json:"transferable"`                   // 是否允许转赠
	Shareable          bool                `json:"shareable"`                      // 是否允许分享链接
	CouponState        string              `json:"coupon_state"`                   // 商家券状态
	DisplayPatternInfo *DisplayPatternInfo `json:"display_pattern_info,omitempty"` // 创建批次时的样式信息
	CouponUseRule      *CouponUseRule      `json:"coupon_use_rule"`                // 券核销相关规则
	CustomEntrance     *CustomEntrance     `json:"custom_entrance,omitempty"`      // 自定义入口
	CouponCode         string              `json:"coupon_code"`                    // 券的唯一标识
	StockId            string              `json:"stock_id"`                       // 批次号
	AvailableStartTime string              `json:"available_start_time"`           // 券可使用开始时间
	ExpireTime         string              `json:"expire_time"`                    // 券过期时间
	ReceiveTime        string              `json:"receive_time"`                   // 券领券时间
	SendRequestNo      string              `json:"send_request_no"`                // 发券请求单号
	UseRequestNo       string              `json:"use_request_no"`                 // 核销请求单号
	UseTime            string              `json:"use_time"`                       // 券核销时间
}

type BusifavorAttachInfo added in v1.5.71

type BusifavorAttachInfo struct {
	TransactionId   string `json:"transaction_id"`     // 交易订单编号
	ActCode         string `json:"act_code"`           // 支付有礼活动编号/营销馆活动ID
	HallCode        string `json:"hall_code"`          // 营销馆ID
	HallBelongMchID int    `json:"hall_belong_mch_id"` // 营销馆所属商户号
	CardID          string `json:"card_id"`            // 会员卡ID
	Code            string `json:"code"`               // 会员卡code
	ActivityID      string `json:"activity_id"`        // 会员活动ID
}

type BusinessAuthPointsQuery added in v1.5.46

type BusinessAuthPointsQuery struct {
	Openid          string `json:"openid"`                     // 顾客授权时使用的小程序上的openid
	AuthorizeState  string `json:"authorize_state"`            // 顾客授权商圈积分结果:UNAUTHORIZED:未授权,AUTHORIZED:已授权,DEAUTHORIZED:已取消授权
	AuthorizeTime   string `json:"authorize_time,omitempty"`   // 顾客成功授权商圈积分的时间
	DeauthorizeTime string `json:"deauthorize_time,omitempty"` // 顾客关闭授权商圈积分的时间
}

type BusinessAuthPointsQueryRsp added in v1.5.46

type BusinessAuthPointsQueryRsp struct {
	Code     int                      `json:"-"`
	SignInfo *SignInfo                `json:"-"`
	Response *BusinessAuthPointsQuery `json:"response,omitempty"`
	Error    string                   `json:"-"`
}

商圈积分授权查询 Rsp

type BusinessPointsStatusQuery added in v1.5.90

type BusinessPointsStatusQuery struct {
	PointsCommitStatus string `json:"points_commit_status"` // 顾客关闭授权商圈积分的时间
}

type BusinessPointsStatusQueryRsp added in v1.5.90

type BusinessPointsStatusQueryRsp struct {
	Code     int                        `json:"-"`
	SignInfo *SignInfo                  `json:"-"`
	Response *BusinessPointsStatusQuery `json:"response,omitempty"`
	Error    string                     `json:"-"`
}

商圈会员待积分状态查询 Rsp

type CertData added in v1.5.92

type CertData struct {
	EffectiveTime      string       `json:"effective_time"`
	EncryptCertificate *EncryptCert `json:"encrypt_certificate"`
	ExpireTime         string       `json:"expire_time"`
	SerialNo           string       `json:"serial_no"`
}

type CertType added in v1.5.90

type CertType string

微信证书类型:RSA、SM2

type CityInfo added in v1.5.71

type CityInfo struct {
	CityName string `json:"city_name"` // 城市名称
	CityCode int    `json:"city_code"` // 城市编码
}

type ClientV3

type ClientV3 struct {
	Mchid      string
	ApiV3Key   []byte
	SerialNo   string
	WxSerialNo string

	DebugSwitch gopay.DebugSwitch
	SnCertMap   map[string]*rsa.PublicKey // key: serial_no
	// contains filtered or unexported fields
}

ClientV3 微信支付 V3

func NewClientV3

func NewClientV3(mchid, serialNo, apiV3Key, privateKey string) (client *ClientV3, err error)

NewClientV3 初始化微信客户端 V3 mchid:商户ID 或者服务商模式的 sp_mchid serialNo:商户API证书的证书序列号 apiV3Key:APIv3Key,商户平台获取 privateKey:商户API证书下载后,私钥 apiclient_key.pem 读取后的字符串内容

func (*ClientV3) AutoVerifySign

func (c *ClientV3) AutoVerifySign(autoRefresh ...bool) (err error)

AutoVerifySign 开启请求完自动验签功能(默认不开启,推荐开启) 开启自动验签,自动开启每12小时一次轮询,请求最新证书操作

func (*ClientV3) GetAndSelectNewestCert added in v1.5.60

func (c *ClientV3) GetAndSelectNewestCert(certType ...CertType) (serialNo string, snCertMap map[string]string, err error)

获取证书Map集并选择最新的有效证书序列号(默认RSA证书) 文档说明:https://pay.weixin.qq.com/docs/merchant/apis/platform-certificate/api-v3-get-certificates/get.html

func (*ClientV3) GetAndSelectNewestCertALL added in v1.5.90

func (c *ClientV3) GetAndSelectNewestCertALL() (serialNo string, snCertMap map[string]string, err error)

获取证书Map集并选择最新的有效RSA+SM2证书序列号

func (*ClientV3) GetAndSelectNewestCertRSA added in v1.5.90

func (c *ClientV3) GetAndSelectNewestCertRSA() (serialNo string, snCertMap map[string]string, err error)

获取证书Map集并选择最新的有效RSA证书序列号

func (*ClientV3) GetAndSelectNewestCertSM2 added in v1.5.90

func (c *ClientV3) GetAndSelectNewestCertSM2() (serialNo string, snCertMap map[string]string, err error)

获取证书Map集并选择最新的有效SM2证书序列号 文档:https://pay.weixin.qq.com/docs/merchant/development/shangmi/key-and-certificate.html

func (*ClientV3) PaySignOfApp

func (c *ClientV3) PaySignOfApp(appid, prepayid string) (app *AppPayParams, err error)

PaySignOfApp 获取 App 支付所需要的参数 文档:https://pay.weixin.qq.com/docs/merchant/apis/in-app-payment/app-transfer-payment.html

func (*ClientV3) PaySignOfAppScore added in v1.5.97

func (c *ClientV3) PaySignOfAppScore(mchId, pkg string) (query *APPScoreQuery, err error)

PaySignOfAppScore 获取 APP调起支付分 接口,query属性中的sign 文档:https://pay.weixin.qq.com/docs/merchant/apis/weixin-pay-score/app-confirm.html

func (*ClientV3) PaySignOfApplet

func (c *ClientV3) PaySignOfApplet(appid, prepayid string) (applet *AppletParams, err error)

PaySignOfApplet 获取 小程序 支付所需要的参数 文档:https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/mini-transfer-payment.html

func (*ClientV3) PaySignOfAppletScore added in v1.5.87

func (c *ClientV3) PaySignOfAppletScore(mchId, pkg string) (extraData *AppletScoreExtraData, err error)

PaySignOfAppletScore 获取 小程序调起支付分 接口,extraData属性中的sign 文档:https://pay.weixin.qq.com/docs/merchant/apis/weixin-pay-score/applets-confirm.html

func (*ClientV3) PaySignOfJSAPI

func (c *ClientV3) PaySignOfJSAPI(appid, prepayid string) (jsapi *JSAPIPayParams, err error)

PaySignOfJSAPI 获取 JSAPI 支付所需要的参数 文档:https://pay.weixin.qq.com/docs/merchant/apis/jsapi-payment/jsapi-transfer-payment.html

func (*ClientV3) PaySignOfJSAPIScore added in v1.5.97

func (c *ClientV3) PaySignOfJSAPIScore(mchId, pkg string) (queryString *JSAPIScoreQuery, err error)

PaySignOfJSAPIScore 获取 JSAPI调起支付分 接口,queryString属性中的sign 文档:https://pay.weixin.qq.com/docs/merchant/apis/weixin-pay-score/jsapi-confirm.html

func (*ClientV3) SetBodySize added in v1.5.82

func (c *ClientV3) SetBodySize(sizeMB int)

SetBodySize 设置http response body size(MB)

func (*ClientV3) SetPlatformCert added in v1.5.48

func (c *ClientV3) SetPlatformCert(wxPublicKeyContent []byte, wxSerialNo string) (client *ClientV3)

设置 微信支付平台证书 和 证书序列号 注意1:如已开启自动验签功能 client.AutoVerifySign(),无需再调用此方法设置 注意2:请预先通过 wechat.GetPlatformCerts() 获取 微信平台公钥证书 和 证书序列号 部分接口请求参数中敏感信息加密,使用此 微信支付平台公钥 和 证书序列号

func (*ClientV3) V3Apply4SubMerchantsApplication added in v1.5.93

func (c *ClientV3) V3Apply4SubMerchantsApplication(ctx context.Context, subMchId, applicationNo string) (*V3Apply4SubMerchantsApplicationRsp, error)

查询结算账户修改申请状态 API Code = 0 is success

func (*ClientV3) V3Apply4SubModifySettlement added in v1.5.51

func (c *ClientV3) V3Apply4SubModifySettlement(ctx context.Context, bm gopay.BodyMap) (*EmptyRsp, error)

修改结算账号 API Code = 0 is success

func (*ClientV3) V3Apply4SubQueryByApplyId added in v1.5.51

func (c *ClientV3) V3Apply4SubQueryByApplyId(ctx context.Context, applyId string) (*Apply4SubQueryRsp, error)

通过申请单号查询申请状态API Code = 0 is success

func (*ClientV3) V3Apply4SubQueryByBusinessCode added in v1.5.51

func (c *ClientV3) V3Apply4SubQueryByBusinessCode(ctx context.Context, businessCode string) (*Apply4SubQueryRsp, error)

通过业务申请编号查询申请状态API Code = 0 is success

func (*ClientV3) V3Apply4SubQuerySettlement added in v1.5.51

func (c *ClientV3) V3Apply4SubQuerySettlement(ctx context.Context, subMchId string) (*Apply4SubQuerySettlementRsp, error)

查询结算账户 API Code = 0 is success

func (*ClientV3) V3Apply4SubSubmit added in v1.5.51

func (c *ClientV3) V3Apply4SubSubmit(ctx context.Context, bm gopay.BodyMap) (*Apply4SubSubmitRsp, error)

提交申请单API 注意:本接口会提交一些敏感信息,需调用 client.V3EncryptText() 进行加密 Code = 0 is success

func (*ClientV3) V3AsyncApply4SubModifySettlement added in v1.5.93

func (c *ClientV3) V3AsyncApply4SubModifySettlement(ctx context.Context, bm gopay.BodyMap) (*Apply4SubModifySettlementRsp, error)

(新)修改结算账户 API (2023年4月17日之后生效) Code = 0 is success

func (*ClientV3) V3BankSearchBank added in v1.5.71

func (c *ClientV3) V3BankSearchBank(ctx context.Context, accountNo string) (wxRsp *BankSearchBankRsp, err error)

获取对私银行卡号开户银行 注意:accountNo 需此方法加密:client.V3EncryptText() Code = 0 is success

func (*ClientV3) V3BankSearchBranchList added in v1.5.71

func (c *ClientV3) V3BankSearchBranchList(ctx context.Context, bankAliasCode string, cityCode, limit, offset int) (wxRsp *BankSearchBranchListRsp, err error)

查询支行列表 Code = 0 is success

func (*ClientV3) V3BankSearchCityList added in v1.5.71

func (c *ClientV3) V3BankSearchCityList(ctx context.Context, provinceCode int) (wxRsp *BankSearchCityListRsp, err error)

查询城市列表 Code = 0 is success

func (*ClientV3) V3BankSearchCorporateList added in v1.5.71

func (c *ClientV3) V3BankSearchCorporateList(ctx context.Context, limit, offset int) (wxRsp *BankSearchCorporateListRsp, err error)

查询支持对公业务的银行列表 Code = 0 is success

func (*ClientV3) V3BankSearchPersonalList added in v1.5.71

func (c *ClientV3) V3BankSearchPersonalList(ctx context.Context, limit, offset int) (wxRsp *BankSearchPersonalListRsp, err error)

查询支持个人业务的银行列表 Code = 0 is success

func (*ClientV3) V3BankSearchProvinceList added in v1.5.71

func (c *ClientV3) V3BankSearchProvinceList(ctx context.Context) (wxRsp *BankSearchProvinceListRsp, err error)

查询省份列表 Code = 0 is success

func (*ClientV3) V3BillDownLoadBill

func (c *ClientV3) V3BillDownLoadBill(ctx context.Context, downloadUrl string) (fileBytes []byte, err error)

下载账单API Code = 0 is success

func (*ClientV3) V3BillEcommerceFundFlowBill added in v1.5.58

func (c *ClientV3) V3BillEcommerceFundFlowBill(ctx context.Context, bm gopay.BodyMap) (wxRsp *EcommerceFundFlowBillRsp, err error)

申请特约商户资金账单API 注意:如 bill_date 为空,默认查前一天的 Code = 0 is success

func (*ClientV3) V3BillFundFlowBill

func (c *ClientV3) V3BillFundFlowBill(ctx context.Context, bm gopay.BodyMap) (wxRsp *BillRsp, err error)

申请资金账单API 注意:如 bill_date 为空,默认查前一天的 Code = 0 is success

func (*ClientV3) V3BillSubFundFlowBill added in v1.5.58

func (c *ClientV3) V3BillSubFundFlowBill(ctx context.Context, bm gopay.BodyMap) (wxRsp *BillRsp, err error)

申请单个子商户资金账单API 注意:如 bill_date 为空,默认查前一天的 Code = 0 is success

func (*ClientV3) V3BillTradeBill

func (c *ClientV3) V3BillTradeBill(ctx context.Context, bm gopay.BodyMap) (wxRsp *BillRsp, err error)

申请交易账单API 注意:如 bill_date 为空,默认查前一天的 Code = 0 is success

func (*ClientV3) V3BusiFavorAssociate added in v1.5.55

func (c *ClientV3) V3BusiFavorAssociate(ctx context.Context, bm gopay.BodyMap) (wxRsp *BusiFavorAssociateRsp, err error)

关联订单信息 Code = 0 is success

func (*ClientV3) V3BusiFavorBatchCreate added in v1.5.55

func (c *ClientV3) V3BusiFavorBatchCreate(ctx context.Context, bm gopay.BodyMap) (wxRsp *BusiFavorCreateRsp, err error)

创建商家券 Code = 0 is success

func (*ClientV3) V3BusiFavorBatchDetail added in v1.5.55

func (c *ClientV3) V3BusiFavorBatchDetail(ctx context.Context, stockId string) (wxRsp *BusiFavorBatchDetailRsp, err error)

查询商家券详情 Code = 0 is success

func (*ClientV3) V3BusiFavorBatchUpdate added in v1.5.55

func (c *ClientV3) V3BusiFavorBatchUpdate(ctx context.Context, stockId string, bm gopay.BodyMap) (wxRsp *BusiFavorBatchUpdateRsp, err error)

修改批次预算 Code = 0 is success

func (*ClientV3) V3BusiFavorCallbackUrl added in v1.5.55

func (c *ClientV3) V3BusiFavorCallbackUrl(ctx context.Context, mchid string) (wxRsp *BusiFavorCallbackUrlRsp, err error)

查询商家券事件通知地址 Code = 0 is success

func (*ClientV3) V3BusiFavorCallbackUrlSet added in v1.5.55

func (c *ClientV3) V3BusiFavorCallbackUrlSet(ctx context.Context, bm gopay.BodyMap) (wxRsp *BusiFavorCallbackUrlSetRsp, err error)

设置商家券事件通知地址 Code = 0 is success

func (*ClientV3) V3BusiFavorCodeUpload added in v1.5.55

func (c *ClientV3) V3BusiFavorCodeUpload(ctx context.Context, stockId string, bm gopay.BodyMap) (wxRsp *BusiFavorCodeUploadRsp, err error)

上传预存code Code = 0 is success

func (*ClientV3) V3BusiFavorDeactivate added in v1.5.55

func (c *ClientV3) V3BusiFavorDeactivate(ctx context.Context, bm gopay.BodyMap) (wxRsp *BusiFavorDeactivateRsp, err error)

使券失效 Code = 0 is success

func (*ClientV3) V3BusiFavorDisassociate added in v1.5.55

func (c *ClientV3) V3BusiFavorDisassociate(ctx context.Context, bm gopay.BodyMap) (wxRsp *BusiFavorDisassociateRsp, err error)

取消关联订单信息 Code = 0 is success

func (*ClientV3) V3BusiFavorInfoUpdate added in v1.5.55

func (c *ClientV3) V3BusiFavorInfoUpdate(ctx context.Context, stockId string, bm gopay.BodyMap) (wxRsp *EmptyRsp, err error)

修改商家券基本信息 Code = 0 is success

func (*ClientV3) V3BusiFavorReturn added in v1.5.55

func (c *ClientV3) V3BusiFavorReturn(ctx context.Context, bm gopay.BodyMap) (wxRsp *BusiFavorReturnRsp, err error)

申请退券 Code = 0 is success

func (*ClientV3) V3BusiFavorSend added in v1.5.58

func (c *ClientV3) V3BusiFavorSend(ctx context.Context, cardId string, bm gopay.BodyMap) (wxRsp *BusiFavorSendRsp, err error)

发放消费卡 Code = 0 is success

func (*ClientV3) V3BusiFavorSubsidyPay added in v1.5.55

func (c *ClientV3) V3BusiFavorSubsidyPay(ctx context.Context, bm gopay.BodyMap) (wxRsp *BusiFavorSubsidyPayRsp, err error)

营销补差付款 Code = 0 is success

func (*ClientV3) V3BusiFavorSubsidyPayDetail added in v1.5.55

func (c *ClientV3) V3BusiFavorSubsidyPayDetail(ctx context.Context, subsidyReceiptId string) (wxRsp *BusiFavorSubsidyPayDetailRsp, err error)

查询营销补差付款单详情 Code = 0 is success

func (*ClientV3) V3BusiFavorUse added in v1.5.55

func (c *ClientV3) V3BusiFavorUse(ctx context.Context, bm gopay.BodyMap) (wxRsp *BusiFavorUseRsp, err error)

核销用户券 Code = 0 is success

func (*ClientV3) V3BusiFavorUserCouponDetail added in v1.5.55

func (c *ClientV3) V3BusiFavorUserCouponDetail(ctx context.Context, openid, couponCode, appid string) (wxRsp *BusiFavorUserCouponDetailRsp, err error)

查询用户单张券详情 Code = 0 is success

func (*ClientV3) V3BusiFavorUserCoupons added in v1.5.55

func (c *ClientV3) V3BusiFavorUserCoupons(ctx context.Context, openid string, bm gopay.BodyMap) (wxRsp *BusiFavorUserCouponsRsp, err error)

根据过滤条件查询用户券 Code = 0 is success

func (*ClientV3) V3BusinessAuthPointsQuery added in v1.5.46

func (c *ClientV3) V3BusinessAuthPointsQuery(ctx context.Context, openid string, bm gopay.BodyMap) (*BusinessAuthPointsQueryRsp, error)

商圈积分授权查询 Code = 0 is success openid:path 参数 bm:query 参数

func (*ClientV3) V3BusinessParkingSync added in v1.5.90

func (c *ClientV3) V3BusinessParkingSync(ctx context.Context, bm gopay.BodyMap) (wxRsp *EmptyRsp, err error)

商圈会员停车状态同步 Code = 0 is success

func (*ClientV3) V3BusinessPointsStatusQuery added in v1.5.90

func (c *ClientV3) V3BusinessPointsStatusQuery(ctx context.Context, openid string, bm gopay.BodyMap) (*BusinessPointsStatusQueryRsp, error)

商圈会员待积分状态查询 Code = 0 is success openid:path 参数 bm:query 参数

func (*ClientV3) V3BusinessPointsSync added in v1.5.46

func (c *ClientV3) V3BusinessPointsSync(ctx context.Context, bm gopay.BodyMap) (wxRsp *EmptyRsp, err error)

商圈积分同步 Code = 0 is success

func (*ClientV3) V3CombineCloseOrder

func (c *ClientV3) V3CombineCloseOrder(ctx context.Context, tradeNo string, bm gopay.BodyMap) (wxRsp *CloseOrderRsp, err error)

合单关闭订单API Code = 0 is success

func (*ClientV3) V3CombineQueryOrder

func (c *ClientV3) V3CombineQueryOrder(ctx context.Context, traderNo string) (wxRsp *CombineQueryOrderRsp, err error)

合单查询订单API Code = 0 is success

func (*ClientV3) V3CombineTransactionApp

func (c *ClientV3) V3CombineTransactionApp(ctx context.Context, bm gopay.BodyMap) (wxRsp *PrepayRsp, err error)

合单APP下单API Code = 0 is success

func (*ClientV3) V3CombineTransactionH5

func (c *ClientV3) V3CombineTransactionH5(ctx context.Context, bm gopay.BodyMap) (wxRsp *H5Rsp, err error)

合单H5下单API Code = 0 is success

func (*ClientV3) V3CombineTransactionJsapi

func (c *ClientV3) V3CombineTransactionJsapi(ctx context.Context, bm gopay.BodyMap) (wxRsp *PrepayRsp, err error)

合单JSAPI/小程序下单API Code = 0 is success

func (*ClientV3) V3CombineTransactionNative

func (c *ClientV3) V3CombineTransactionNative(ctx context.Context, bm gopay.BodyMap) (wxRsp *NativeRsp, err error)

合单Native下单API Code = 0 is success

func (*ClientV3) V3ComplaintComplete

func (c *ClientV3) V3ComplaintComplete(ctx context.Context, complaintId string, bm gopay.BodyMap) (wxRsp *EmptyRsp, err error)

反馈处理完成API Code = 0 is success

func (*ClientV3) V3ComplaintDetail

func (c *ClientV3) V3ComplaintDetail(ctx context.Context, complaintId string) (wxRsp *ComplaintDetailRsp, err error)

查询投诉单详情API Code = 0 is success

func (*ClientV3) V3ComplaintList

func (c *ClientV3) V3ComplaintList(ctx context.Context, bm gopay.BodyMap) (wxRsp *ComplaintListRsp, err error)

查询投诉单列表API Code = 0 is success

func (*ClientV3) V3ComplaintNegotiationHistory

func (c *ClientV3) V3ComplaintNegotiationHistory(ctx context.Context, complaintId string, bm gopay.BodyMap) (wxRsp *ComplaintNegotiationHistoryRsp, err error)

查询投诉协商历史API Code = 0 is success

func (*ClientV3) V3ComplaintNotifyUrlCreate

func (c *ClientV3) V3ComplaintNotifyUrlCreate(ctx context.Context, url string) (wxRsp *ComplaintNotifyUrlRsp, err error)

创建投诉通知回调地址API Code = 0 is success

func (*ClientV3) V3ComplaintNotifyUrlDelete

func (c *ClientV3) V3ComplaintNotifyUrlDelete(ctx context.Context) (wxRsp *EmptyRsp, err error)

删除投诉通知回调地址API Code = 0 is success

func (*ClientV3) V3ComplaintNotifyUrlQuery

func (c *ClientV3) V3ComplaintNotifyUrlQuery(ctx context.Context) (wxRsp *ComplaintNotifyUrlRsp, err error)

查询投诉通知回调地址API Code = 0 is success

func (*ClientV3) V3ComplaintNotifyUrlUpdate

func (c *ClientV3) V3ComplaintNotifyUrlUpdate(ctx context.Context, url string) (wxRsp *ComplaintNotifyUrlRsp, err error)

更新投诉通知回调地址API Code = 0 is success

func (*ClientV3) V3ComplaintResponse

func (c *ClientV3) V3ComplaintResponse(ctx context.Context, complaintId string, bm gopay.BodyMap) (wxRsp *EmptyRsp, err error)

回复用户API Code = 0 is success

func (*ClientV3) V3ComplaintUpdateRefundProgress added in v1.5.92

func (c *ClientV3) V3ComplaintUpdateRefundProgress(ctx context.Context, complaintId string, bm gopay.BodyMap) (wxRsp *EmptyRsp, err error)

更新退款审批结果 Code = 0 is success

func (*ClientV3) V3ComplaintUploadImage

func (c *ClientV3) V3ComplaintUploadImage(ctx context.Context, fileName, fileSha256 string, img *gopay.File) (wxRsp *MediaUploadRsp, err error)

商户上传反馈图片API 注意:图片不能超过2MB Code = 0 is success

func (*ClientV3) V3DecryptText added in v1.5.48

func (c *ClientV3) V3DecryptText(cipherText string) (text string, err error)

敏感信息解密

func (*ClientV3) V3DiscountCardAddUser added in v1.5.46

func (c *ClientV3) V3DiscountCardAddUser(ctx context.Context, bm gopay.BodyMap) (wxRsp *EmptyRsp, err error)

增加用户记录API Code = 0 is success

func (*ClientV3) V3DiscountCardApply added in v1.5.46

func (c *ClientV3) V3DiscountCardApply(ctx context.Context, bm gopay.BodyMap) (wxRsp *DiscountCardApplyRsp, err error)

预受理领卡请求API Code = 0 is success

func (*ClientV3) V3DiscountCardQuery added in v1.5.46

func (c *ClientV3) V3DiscountCardQuery(ctx context.Context, outCardCode string) (wxRsp *DiscountCardQueryRsp, err error)

查询先享卡订单API Code = 0 is success

func (*ClientV3) V3EcommerceApply added in v1.5.65

func (c *ClientV3) V3EcommerceApply(ctx context.Context, bm gopay.BodyMap) (*EcommerceApplyRsp, error)

二级商户进件API 注意:本接口会提交一些敏感信息,需调用 client.V3EncryptText() 进行加密。部分图片参数,请先调用 client.V3MediaUploadImage() 上传,获取MediaId Code = 0 is success

func (*ClientV3) V3EcommerceApplyStatus added in v1.5.65

func (c *ClientV3) V3EcommerceApplyStatus(ctx context.Context, applyId int64, outRequestNo string) (*EcommerceApplyStatusRsp, error)

查询申请状态API 注意:applyId 和 outRequestNo 二选一 Code = 0 is success

func (*ClientV3) V3EcommerceBalance added in v1.5.58

func (c *ClientV3) V3EcommerceBalance(ctx context.Context, subMchid string, bm gopay.BodyMap) (*EcommerceBalanceRsp, error)

查询特约商户账户实时余额、查询二级商户账户实时余额 Code = 0 is success 注意:服务商时,bm参数传 nil

func (*ClientV3) V3EcommerceDayBalance added in v1.5.78

func (c *ClientV3) V3EcommerceDayBalance(ctx context.Context, subMchid, date string) (*EcommerceBalanceRsp, error)

查询二级商户账户日终余额 date示例值:2019-08-17 Code = 0 is success

func (*ClientV3) V3EcommerceIncomeRecord added in v1.5.58

func (c *ClientV3) V3EcommerceIncomeRecord(ctx context.Context, bm gopay.BodyMap) (*PartnerIncomeRecordRsp, error)

特约商户银行来账查询API Code = 0 is success

func (*ClientV3) V3EcommerceProfitShare added in v1.5.68

func (c *ClientV3) V3EcommerceProfitShare(ctx context.Context, bm gopay.BodyMap) (*EcommerceProfitShareRsp, error)

请求分账API Code = 0 is success

func (*ClientV3) V3EcommerceProfitShareAddReceiver added in v1.5.68

func (c *ClientV3) V3EcommerceProfitShareAddReceiver(ctx context.Context, bm gopay.BodyMap) (*EcommerceProfitShareAddReceiverRsp, error)

添加分账接收方API Code = 0 is success

func (*ClientV3) V3EcommerceProfitShareDeleteReceiver added in v1.5.68

func (c *ClientV3) V3EcommerceProfitShareDeleteReceiver(ctx context.Context, bm gopay.BodyMap) (*EcommerceProfitShareDeleteReceiverRsp, error)

删除分账接收方API Code = 0 is success

func (*ClientV3) V3EcommerceProfitShareFinish added in v1.5.68

func (c *ClientV3) V3EcommerceProfitShareFinish(ctx context.Context, bm gopay.BodyMap) (*EcommerceProfitShareFinishRsp, error)

完结分账API Code = 0 is success

func (*ClientV3) V3EcommerceProfitShareQuery added in v1.5.68

func (c *ClientV3) V3EcommerceProfitShareQuery(ctx context.Context, bm gopay.BodyMap) (*EcommerceProfitShareQueryRsp, error)

查询分账结果API Code = 0 is success

func (*ClientV3) V3EcommerceProfitShareReturn added in v1.5.68

func (c *ClientV3) V3EcommerceProfitShareReturn(ctx context.Context, bm gopay.BodyMap) (*EcommerceProfitShareReturnRsp, error)

请求分账回退API Code = 0 is success

func (*ClientV3) V3EcommerceProfitShareReturnResult added in v1.5.68

func (c *ClientV3) V3EcommerceProfitShareReturnResult(ctx context.Context, bm gopay.BodyMap) (*EcommerceProfitShareReturnResultRsp, error)

查询分账回退结果API Code = 0 is success

func (*ClientV3) V3EcommerceProfitShareUnsplitAmount added in v1.5.68

func (c *ClientV3) V3EcommerceProfitShareUnsplitAmount(ctx context.Context, transactionId string) (*EcommerceProfitShareUnsplitAmountRsp, error)

查询订单剩余待分金额API Code = 0 is success

func (*ClientV3) V3EcommerceRefund added in v1.5.68

func (c *ClientV3) V3EcommerceRefund(ctx context.Context, bm gopay.BodyMap) (wxRsp *EcommerceRefundRsp, err error)

申请退款API Code = 0 is success

func (*ClientV3) V3EcommerceRefundAdvance added in v1.5.68

func (c *ClientV3) V3EcommerceRefundAdvance(ctx context.Context, refundId string, bm gopay.BodyMap) (wxRsp *EcommerceRefundAdvanceRsp, err error)

垫付退款回补API Code = 0 is success

func (*ClientV3) V3EcommerceRefundAdvanceResult added in v1.5.68

func (c *ClientV3) V3EcommerceRefundAdvanceResult(ctx context.Context, refundId string, bm gopay.BodyMap) (wxRsp *EcommerceRefundAdvanceRsp, err error)

查询垫付回补结果API Code = 0 is success

func (*ClientV3) V3EcommerceRefundQueryById added in v1.5.68

func (c *ClientV3) V3EcommerceRefundQueryById(ctx context.Context, refundId string, bm gopay.BodyMap) (wxRsp *EcommerceRefundQueryRsp, err error)

通过微信支付退款单号查询退款API Code = 0 is success

func (*ClientV3) V3EcommerceRefundQueryByNo added in v1.5.68

func (c *ClientV3) V3EcommerceRefundQueryByNo(ctx context.Context, outRefundNo string, bm gopay.BodyMap) (wxRsp *EcommerceRefundQueryRsp, err error)

通过商户退款单号查询退款API Code = 0 is success

func (*ClientV3) V3EcommerceSubsidies added in v1.5.68

func (c *ClientV3) V3EcommerceSubsidies(ctx context.Context, bm gopay.BodyMap) (*EcommerceSubsidiesRsp, error)

请求补差API Code = 0 is success

func (*ClientV3) V3EcommerceSubsidiesCancel added in v1.5.68

func (c *ClientV3) V3EcommerceSubsidiesCancel(ctx context.Context, bm gopay.BodyMap) (*EcommerceSubsidiesCancelRsp, error)

取消补差API Code = 0 is success

func (*ClientV3) V3EcommerceSubsidiesReturn added in v1.5.68

func (c *ClientV3) V3EcommerceSubsidiesReturn(ctx context.Context, bm gopay.BodyMap) (*EcommerceSubsidiesReturnRsp, error)

请求补差回退API Code = 0 is success

func (*ClientV3) V3EcommerceWithdraw added in v1.5.77

func (c *ClientV3) V3EcommerceWithdraw(ctx context.Context, bm gopay.BodyMap) (*EcommerceWithdrawRsp, error)

电商平台预约提现 Code = 0 is success 电商文档:https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_8_2.shtml

func (*ClientV3) V3EcommerceWithdrawStatus added in v1.5.77

func (c *ClientV3) V3EcommerceWithdrawStatus(ctx context.Context, withdrawId, outRequestNo string) (*EcommerceWithdrawStatusRsp, error)

电商平台查询预约提现状态 注意:withdrawId 和 outRequestNo 二选一 Code = 0 is success 电商文档:https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_8_6.shtml

func (*ClientV3) V3EncryptText added in v1.5.48

func (c *ClientV3) V3EncryptText(text string) (cipherText string, err error)

敏感信息加密,默认使用最新的有效微信平台证书加密

func (*ClientV3) V3EntrustPayNotify added in v1.5.89

func (c *ClientV3) V3EntrustPayNotify(ctx context.Context, contractId string, bm gopay.BodyMap) (wxRsp *EmptyRsp, err error)

预扣费通知API Code = 0 is success

func (*ClientV3) V3FavorBatchCreate added in v1.5.55

func (c *ClientV3) V3FavorBatchCreate(ctx context.Context, bm gopay.BodyMap) (wxRsp *FavorBatchCreateRsp, err error)

创建代金券批次 Code = 0 is success

func (*ClientV3) V3FavorBatchDetail added in v1.5.55

func (c *ClientV3) V3FavorBatchDetail(ctx context.Context, stockId, stockCreatorMchid string) (wxRsp *FavorBatchDetailRsp, err error)

查询批次详情 Code = 0 is success

func (*ClientV3) V3FavorBatchGrant added in v1.5.55

func (c *ClientV3) V3FavorBatchGrant(ctx context.Context, openid string, bm gopay.BodyMap) (wxRsp *FavorBatchGrantRsp, err error)

发放代金券批次 Code = 0 is success

func (*ClientV3) V3FavorBatchList added in v1.5.55

func (c *ClientV3) V3FavorBatchList(ctx context.Context, bm gopay.BodyMap) (wxRsp *FavorBatchListRsp, err error)

条件查询批次列表 Code = 0 is success

func (*ClientV3) V3FavorBatchPause added in v1.5.55

func (c *ClientV3) V3FavorBatchPause(ctx context.Context, stockId, stockCreatorMchid string) (wxRsp *FavorBatchPauseRsp, err error)

暂停代金券批次 Code = 0 is success

func (*ClientV3) V3FavorBatchRestart added in v1.5.55

func (c *ClientV3) V3FavorBatchRestart(ctx context.Context, stockId, stockCreatorMchid string) (wxRsp *FavorBatchRestartRsp, err error)

重启代金券批次 Code = 0 is success

func (*ClientV3) V3FavorBatchStart added in v1.5.55

func (c *ClientV3) V3FavorBatchStart(ctx context.Context, stockId, stockCreatorMchid string) (wxRsp *FavorBatchStartRsp, err error)

激活代金券批次 Code = 0 is success

func (*ClientV3) V3FavorCallbackUrlSet added in v1.5.55

func (c *ClientV3) V3FavorCallbackUrlSet(ctx context.Context, bm gopay.BodyMap) (wxRsp *FavorCallbackUrlSetRsp, err error)

设置消息通知地址 Code = 0 is success

func (*ClientV3) V3FavorDetail added in v1.5.55

func (c *ClientV3) V3FavorDetail(ctx context.Context, appid, couponId, openid string) (wxRsp *FavorDetailRsp, err error)

查询代金券详情 Code = 0 is success

func (*ClientV3) V3FavorItems added in v1.5.55

func (c *ClientV3) V3FavorItems(ctx context.Context, stockId, stockCreatorMchid string, limit, offset int) (wxRsp *FavorItemsRsp, err error)

查询代金券可用单品 Code = 0 is success

func (*ClientV3) V3FavorMediaUploadImage added in v1.5.58

func (c *ClientV3) V3FavorMediaUploadImage(ctx context.Context, fileName, fileSha256 string, img *gopay.File) (wxRsp *MarketMediaUploadRsp, err error)

图片上传(营销专用) 注意:图片不能超过2MB Code = 0 is success

func (*ClientV3) V3FavorMerchant added in v1.5.55

func (c *ClientV3) V3FavorMerchant(ctx context.Context, stockId, stockCreatorMchid string, limit, offset int) (wxRsp *FavorMerchantRsp, err error)

查询代金券可用商户 Code = 0 is success

func (*ClientV3) V3FavorRefundFlowDownload added in v1.5.55

func (c *ClientV3) V3FavorRefundFlowDownload(ctx context.Context, stockId string) (wxRsp *FavorRefundFlowDownloadRsp, err error)

下载批次退款明细 Code = 0 is success

func (*ClientV3) V3FavorUseFlowDownload added in v1.5.55

func (c *ClientV3) V3FavorUseFlowDownload(ctx context.Context, stockId string) (wxRsp *FavorUseFlowDownloadRsp, err error)

下载批次核销明细 Code = 0 is success

func (*ClientV3) V3FavorUserCoupons added in v1.5.55

func (c *ClientV3) V3FavorUserCoupons(ctx context.Context, openid string, bm gopay.BodyMap) (wxRsp *FavorUserCouponsRsp, err error)

根据商户号查用户的券 Code = 0 is success

func (*ClientV3) V3GoldPlanBillManage added in v1.5.65

func (c *ClientV3) V3GoldPlanBillManage(ctx context.Context, bm gopay.BodyMap) (wxRsp *GoldPlanManageRsp, err error)

商家小票管理API Code = 0 is success

func (*ClientV3) V3GoldPlanCloseAdShow added in v1.5.65

func (c *ClientV3) V3GoldPlanCloseAdShow(ctx context.Context, bm gopay.BodyMap) (wxRsp *EmptyRsp, err error)

关闭广告展示API Code = 0 is success

func (*ClientV3) V3GoldPlanFilterManage added in v1.5.65

func (c *ClientV3) V3GoldPlanFilterManage(ctx context.Context, bm gopay.BodyMap) (wxRsp *EmptyRsp, err error)

同业过滤标签管理API Code = 0 is success

func (*ClientV3) V3GoldPlanManage added in v1.5.65

func (c *ClientV3) V3GoldPlanManage(ctx context.Context, bm gopay.BodyMap) (wxRsp *GoldPlanManageRsp, err error)

点金计划管理API Code = 0 is success

func (*ClientV3) V3GoldPlanOpenAdShow added in v1.5.65

func (c *ClientV3) V3GoldPlanOpenAdShow(ctx context.Context, bm gopay.BodyMap) (wxRsp *EmptyRsp, err error)

开通广告展示API Code = 0 is success

func (*ClientV3) V3MediaDownloadImage added in v1.5.94

func (c *ClientV3) V3MediaDownloadImage(ctx context.Context, mediaUrl string) (resBody *bytes.Buffer, err error)

图片资源下载 Code = 0 is success

func (*ClientV3) V3MediaUploadImage added in v1.5.43

func (c *ClientV3) V3MediaUploadImage(ctx context.Context, fileName, fileSha256 string, img *gopay.File) (wxRsp *MediaUploadRsp, err error)

图片上传API 注意:图片不能超过2MB Code = 0 is success

func (*ClientV3) V3MediaUploadVideo added in v1.5.43

func (c *ClientV3) V3MediaUploadVideo(ctx context.Context, fileName, fileSha256 string, img *gopay.File) (wxRsp *MediaUploadRsp, err error)

视频上传API 注意:媒体视频只支持avi、wmv、mpeg、mp4、mov、mkv、flv、f4v、m4v、rmvb格式,文件大小不能超过5M。 Code = 0 is success

func (*ClientV3) V3MerchantBalance added in v1.5.47

func (c *ClientV3) V3MerchantBalance(ctx context.Context, accountType string) (*MerchantBalanceRsp, error)

查询账户实时余额 Code = 0 is success

func (*ClientV3) V3MerchantDayBalance added in v1.5.47

func (c *ClientV3) V3MerchantDayBalance(ctx context.Context, accountType, date string) (*MerchantBalanceRsp, error)

查询账户日终余额 date示例值:2019-08-17 Code = 0 is success

func (*ClientV3) V3MerchantIncomeRecord added in v1.5.47

func (c *ClientV3) V3MerchantIncomeRecord(ctx context.Context, bm gopay.BodyMap) (*MerchantIncomeRecordRsp, error)

商户/服务商银行来账查询API Code = 0 is success

func (*ClientV3) V3PartnerCloseOrder

func (c *ClientV3) V3PartnerCloseOrder(ctx context.Context, tradeNo string, bm gopay.BodyMap) (wxRsp *CloseOrderRsp, err error)

(服务商、电商模式)关单API Code = 0 is success

func (*ClientV3) V3PartnerQueryOrder

func (c *ClientV3) V3PartnerQueryOrder(ctx context.Context, orderNoType OrderNoType, orderNo string, bm gopay.BodyMap) (wxRsp *PartnerQueryOrderRsp, err error)

(服务商、电商模式)查询订单API Code = 0 is success

func (*ClientV3) V3PartnerTransactionApp

func (c *ClientV3) V3PartnerTransactionApp(ctx context.Context, bm gopay.BodyMap) (wxRsp *PrepayRsp, err error)

(服务商、电商模式)APP下单API Code = 0 is success

func (*ClientV3) V3PartnerTransactionH5

func (c *ClientV3) V3PartnerTransactionH5(ctx context.Context, bm gopay.BodyMap) (wxRsp *H5Rsp, err error)

(服务商模式)H5下单API Code = 0 is success

func (*ClientV3) V3PartnerTransactionJsapi

func (c *ClientV3) V3PartnerTransactionJsapi(ctx context.Context, bm gopay.BodyMap) (wxRsp *PrepayRsp, err error)

(服务商、电商模式)JSAPI/小程序下单API Code = 0 is success

func (*ClientV3) V3PartnerTransactionNative

func (c *ClientV3) V3PartnerTransactionNative(ctx context.Context, bm gopay.BodyMap) (wxRsp *NativeRsp, err error)

(服务商、电商模式)Native下单API Code = 0 is success

func (*ClientV3) V3PartnerTransfer added in v1.5.67

func (c *ClientV3) V3PartnerTransfer(ctx context.Context, bm gopay.BodyMap) (*TransferRsp, error)

发起批量转账API(服务商) 注意:入参加密字段数据加密:client.V3EncryptText() Code = 0 is success

func (*ClientV3) V3PartnerTransferDetail added in v1.5.67

func (c *ClientV3) V3PartnerTransferDetail(ctx context.Context, batchId, detailId string) (*PartnerTransferDetailRsp, error)

微信明细单号查询明细单API(服务商) Code = 0 is success

func (*ClientV3) V3PartnerTransferMerchantDetail added in v1.5.67

func (c *ClientV3) V3PartnerTransferMerchantDetail(ctx context.Context, outBatchNo, outDetailNo string) (*PartnerTransferMerchantDetailRsp, error)

商家明细单号查询明细单API(服务商) Code = 0 is success

func (*ClientV3) V3PartnerTransferMerchantQuery added in v1.5.67

func (c *ClientV3) V3PartnerTransferMerchantQuery(ctx context.Context, outBatchNo string, bm gopay.BodyMap) (*PartnerTransferMerchantQueryRsp, error)

商家批次单号查询批次单API(服务商) Code = 0 is success

func (*ClientV3) V3PartnerTransferQuery added in v1.5.67

func (c *ClientV3) V3PartnerTransferQuery(ctx context.Context, batchId string, bm gopay.BodyMap) (*PartnerTransferQueryRsp, error)

微信批次单号查询批次单API(服务商) Code = 0 is success

func (*ClientV3) V3PartnershipsBuild added in v1.5.58

func (c *ClientV3) V3PartnershipsBuild(ctx context.Context, idempotencyKey string, bm gopay.BodyMap) (wxRsp *PartnershipsBuildRsp, err error)

建立合作关系 Code = 0 is success

func (*ClientV3) V3PartnershipsList added in v1.5.58

func (c *ClientV3) V3PartnershipsList(ctx context.Context, bm gopay.BodyMap) (wxRsp *PartnershipsListRsp, err error)

查询合作关系列表 Code = 0 is success

func (*ClientV3) V3PartnershipsTerminate added in v1.5.58

func (c *ClientV3) V3PartnershipsTerminate(ctx context.Context, idempotencyKey string, bm gopay.BodyMap) (wxRsp *PartnershipsTerminateRsp, err error)

终止合作关系 Code = 0 is success

func (*ClientV3) V3ProfitShareAddReceiver

func (c *ClientV3) V3ProfitShareAddReceiver(ctx context.Context, bm gopay.BodyMap) (*ProfitShareAddReceiverRsp, error)

新增分账接收方API Code = 0 is success

func (*ClientV3) V3ProfitShareBills added in v1.5.56

func (c *ClientV3) V3ProfitShareBills(ctx context.Context, bm gopay.BodyMap) (*ProfitShareBillsRsp, error)

申请分账账单 Code = 0 is success

func (*ClientV3) V3ProfitShareDeleteReceiver

func (c *ClientV3) V3ProfitShareDeleteReceiver(ctx context.Context, bm gopay.BodyMap) (*ProfitShareDeleteReceiverRsp, error)

删除分账接收方API Code = 0 is success

func (*ClientV3) V3ProfitShareMerchantConfigs added in v1.5.55

func (c *ClientV3) V3ProfitShareMerchantConfigs(ctx context.Context, subMchId string) (*ProfitShareMerchantConfigsRsp, error)

查询最大分账比例API Code = 0 is success

func (*ClientV3) V3ProfitShareOrder

func (c *ClientV3) V3ProfitShareOrder(ctx context.Context, bm gopay.BodyMap) (*ProfitShareOrderRsp, error)

请求分账API 微信会在接到请求后立刻返回请求接收结果,分账结果需要自行调用查询接口来获取 Code = 0 is success

func (*ClientV3) V3ProfitShareOrderQuery

func (c *ClientV3) V3ProfitShareOrderQuery(ctx context.Context, orderNo string, bm gopay.BodyMap) (*ProfitShareOrderQueryRsp, error)

查询分账结果API Code = 0 is success

func (*ClientV3) V3ProfitShareOrderUnfreeze

func (c *ClientV3) V3ProfitShareOrderUnfreeze(ctx context.Context, bm gopay.BodyMap) (*ProfitShareOrderUnfreezeRsp, error)

解冻剩余资金API Code = 0 is success

func (*ClientV3) V3ProfitShareReturn

func (c *ClientV3) V3ProfitShareReturn(ctx context.Context, bm gopay.BodyMap) (*ProfitShareReturnRsp, error)

请求分账回退API Code = 0 is success

func (*ClientV3) V3ProfitShareReturnResult

func (c *ClientV3) V3ProfitShareReturnResult(ctx context.Context, returnNo string, bm gopay.BodyMap) (*ProfitShareReturnResultRsp, error)

查询分账回退结果API Code = 0 is success

func (*ClientV3) V3ProfitShareUnsplitAmount

func (c *ClientV3) V3ProfitShareUnsplitAmount(ctx context.Context, transId string) (*ProfitShareUnsplitAmountRsp, error)

查询剩余待分金额API Code = 0 is success

func (*ClientV3) V3Refund

func (c *ClientV3) V3Refund(ctx context.Context, bm gopay.BodyMap) (wxRsp *RefundRsp, err error)

申请退款API Code = 0 is success

func (*ClientV3) V3RefundQuery

func (c *ClientV3) V3RefundQuery(ctx context.Context, outRefundNo string, bm gopay.BodyMap) (wxRsp *RefundQueryRsp, err error)

查询单笔退款API 注意:商户查询时,bm 可传 nil;服务商时,传相应query参数 Code = 0 is success

func (*ClientV3) V3ScoreDirectComplete

func (c *ClientV3) V3ScoreDirectComplete(ctx context.Context, bm gopay.BodyMap) (wxRsp *ScoreDirectCompleteRsp, err error)

创单结单合并API Code = 0 is success 注意:限制条件:【免确认订单模式】,用户已授权状态下,可调用该接口。

func (*ClientV3) V3ScoreOrderCancel

func (c *ClientV3) V3ScoreOrderCancel(ctx context.Context, appid, tradeNo, serviceid, reason string) (wxRsp *ScoreOrderCancelRsp, err error)

取消支付分订单API Code = 0 is success

func (*ClientV3) V3ScoreOrderComplete

func (c *ClientV3) V3ScoreOrderComplete(ctx context.Context, tradeNo string, bm gopay.BodyMap) (wxRsp *ScoreOrderCompleteRsp, err error)

完结支付分订单API Code = 0 is success

func (*ClientV3) V3ScoreOrderCreate

func (c *ClientV3) V3ScoreOrderCreate(ctx context.Context, bm gopay.BodyMap) (wxRsp *ScoreOrderCreateRsp, err error)

创建支付分订单API Code = 0 is success

func (*ClientV3) V3ScoreOrderModify

func (c *ClientV3) V3ScoreOrderModify(ctx context.Context, tradeNo string, bm gopay.BodyMap) (wxRsp *ScoreOrderModifyRsp, err error)

修改订单金额API Code = 0 is success

func (*ClientV3) V3ScoreOrderPartnerCancel added in v1.5.100

func (c *ClientV3) V3ScoreOrderPartnerCancel(ctx context.Context, subMchid, tradeNo, serviceid, reason string) (*ScoreOrderPartnerCancelRsp, error)

V3ScoreOrderPartnerCancel 服务商模式取消支付分订单 Code = 0 is success 微信文档:https://pay.weixin.qq.com/wiki/doc/apiv3_partner/Offline/apis/chapter6_2_3.shtml

func (*ClientV3) V3ScoreOrderPartnerComplete added in v1.5.100

func (c *ClientV3) V3ScoreOrderPartnerComplete(ctx context.Context, tradeNo string, bm gopay.BodyMap) (*ScoreOrderPartnerCompleteRsp, error)

V3ScoreOrderPartnerComplete 服务商模式完结支付分订单A Code = 0 is success 微信文档: https://pay.weixin.qq.com/wiki/doc/apiv3_partner/Offline/apis/chapter6_2_5.shtml

func (*ClientV3) V3ScoreOrderPartnerCreate added in v1.5.100

func (c *ClientV3) V3ScoreOrderPartnerCreate(ctx context.Context, bm gopay.BodyMap) (*ScoreOrderPartnerCreateRsp, error)

V3ScoreOrderPartnerCreate 服务行模式创建支付分订单 Code = 0 is success 微信文档:https://pay.weixin.qq.com/wiki/doc/apiv3_partner/Offline/apis/chapter6_2_1.shtml

func (*ClientV3) V3ScoreOrderPartnerQuery added in v1.5.100

func (c *ClientV3) V3ScoreOrderPartnerQuery(ctx context.Context, orderNoType OrderNoType, orderNo, serviceid, subMchid string) (*ScoreOrderPartnerQueryRsp, error)

V3ScoreOrderPartnerQuery 服务商模式查询支付分订单 Code = 0 is success 微信文档:https://pay.weixin.qq.com/wiki/doc/apiv3_partner/Offline/apis/chapter6_2_2.shtml

func (*ClientV3) V3ScoreOrderPay

func (c *ClientV3) V3ScoreOrderPay(ctx context.Context, appid, tradeNo, serviceid string) (wxRsp *ScoreOrderPayRsp, err error)

商户发起催收扣款API Code = 0 is success

func (*ClientV3) V3ScoreOrderQuery

func (c *ClientV3) V3ScoreOrderQuery(ctx context.Context, orderNoType OrderNoType, appid, orderNo, serviceid string) (wxRsp *ScoreOrderQueryRsp, err error)

查询支付分订单API Code = 0 is success

func (*ClientV3) V3ScoreOrderSync

func (c *ClientV3) V3ScoreOrderSync(ctx context.Context, tradeNo string, bm gopay.BodyMap) (wxRsp *ScoreOrderSyncRsp, err error)

同步服务订单信息API Code = 0 is success

func (*ClientV3) V3ScorePermission

func (c *ClientV3) V3ScorePermission(ctx context.Context, bm gopay.BodyMap) (wxRsp *ScorePermissionRsp, err error)

商户预授权API Code = 0 is success

func (*ClientV3) V3ScorePermissionOpenidQuery

func (c *ClientV3) V3ScorePermissionOpenidQuery(ctx context.Context, appid, openid, serviceid string) (wxRsp *ScorePermissionOpenidQueryRsp, err error)

查询用户授权记录(openid)API Code = 0 is success

func (*ClientV3) V3ScorePermissionOpenidTerminate

func (c *ClientV3) V3ScorePermissionOpenidTerminate(ctx context.Context, appid, openid, serviceid, reason string) (wxRsp *EmptyRsp, err error)

解除用户授权关系(openid)API Code = 0 is success

func (*ClientV3) V3ScorePermissionQuery

func (c *ClientV3) V3ScorePermissionQuery(ctx context.Context, authCode, serviceId string) (wxRsp *ScorePermissionQueryRsp, err error)

查询用户授权记录(授权协议号)API Code = 0 is success

func (*ClientV3) V3ScorePermissionTerminate

func (c *ClientV3) V3ScorePermissionTerminate(ctx context.Context, authCode, serviceId, reason string) (wxRsp *EmptyRsp, err error)

解除用户授权关系(授权协议号)API Code = 0 is success

func (*ClientV3) V3SmartGuideAssign added in v1.5.46

func (c *ClientV3) V3SmartGuideAssign(ctx context.Context, guideId, tradeNo string) (wxRsp *EmptyRsp, err error)

服务人员分配API Code = 0 is success

func (*ClientV3) V3SmartGuideQuery added in v1.5.46

func (c *ClientV3) V3SmartGuideQuery(ctx context.Context, bm gopay.BodyMap) (wxRsp *SmartGuideQueryRsp, err error)

服务人员查询API 注意:入参加密字段数据加密:client.V3EncryptText(),返回参数加密字段解密:client.V3DecryptText() Code = 0 is success

func (*ClientV3) V3SmartGuideReg added in v1.5.46

func (c *ClientV3) V3SmartGuideReg(ctx context.Context, bm gopay.BodyMap) (wxRsp *SmartGuideRegRsp, err error)

服务人员注册API 注意:入参加密字段数据加密:client.V3EncryptText() Code = 0 is success

func (*ClientV3) V3SmartGuideUpdate added in v1.5.46

func (c *ClientV3) V3SmartGuideUpdate(ctx context.Context, guideId string, bm gopay.BodyMap) (wxRsp *EmptyRsp, err error)

服务人员信息更新API 注意:入参加密字段数据加密:client.V3EncryptText() Code = 0 is success

func (*ClientV3) V3TransactionApp

func (c *ClientV3) V3TransactionApp(ctx context.Context, bm gopay.BodyMap) (wxRsp *PrepayRsp, err error)

APP下单API Code = 0 is success

func (*ClientV3) V3TransactionCloseOrder

func (c *ClientV3) V3TransactionCloseOrder(ctx context.Context, tradeNo string) (wxRsp *CloseOrderRsp, err error)

关闭订单API Code = 0 is success

func (*ClientV3) V3TransactionH5

func (c *ClientV3) V3TransactionH5(ctx context.Context, bm gopay.BodyMap) (wxRsp *H5Rsp, err error)

H5下单API Code = 0 is success

func (*ClientV3) V3TransactionJsapi

func (c *ClientV3) V3TransactionJsapi(ctx context.Context, bm gopay.BodyMap) (wxRsp *PrepayRsp, err error)

JSAPI/小程序下单API Code = 0 is success

func (*ClientV3) V3TransactionNative

func (c *ClientV3) V3TransactionNative(ctx context.Context, bm gopay.BodyMap) (wxRsp *NativeRsp, err error)

Native下单API Code = 0 is success

func (*ClientV3) V3TransactionQueryOrder

func (c *ClientV3) V3TransactionQueryOrder(ctx context.Context, orderNoType OrderNoType, orderNo string) (wxRsp *QueryOrderRsp, err error)

查询订单API Code = 0 is success

func (*ClientV3) V3Transfer added in v1.5.47

func (c *ClientV3) V3Transfer(ctx context.Context, bm gopay.BodyMap) (*TransferRsp, error)

发起商家转账API 注意:入参加密字段数据加密:client.V3EncryptText() Code = 0 is success

func (*ClientV3) V3TransferDetail added in v1.5.67

func (c *ClientV3) V3TransferDetail(ctx context.Context, batchId, detailId string) (*TransferDetailRsp, error)

微信明细单号查询明细单API Code = 0 is success

func (*ClientV3) V3TransferDetailQuery added in v1.5.47

func (c *ClientV3) V3TransferDetailQuery(ctx context.Context, batchId, detailId string) (*TransferDetailRsp, error)

Deprecated 推荐直接使用 client.V3TransferDetail() 方法

func (*ClientV3) V3TransferDetailReceipt added in v1.5.47

func (c *ClientV3) V3TransferDetailReceipt(ctx context.Context, bm gopay.BodyMap) (*TransferDetailReceiptRsp, error)

转账明细电子回单受理API Code = 0 is success

func (*ClientV3) V3TransferDetailReceiptQuery added in v1.5.47

func (c *ClientV3) V3TransferDetailReceiptQuery(ctx context.Context, bm gopay.BodyMap) (*TransferDetailReceiptQueryRsp, error)

查询转账明细电子回单受理结果API Code = 0 is success

func (*ClientV3) V3TransferMerchantDetail added in v1.5.67

func (c *ClientV3) V3TransferMerchantDetail(ctx context.Context, outBatchNo, outDetailNo string) (*TransferMerchantDetailRsp, error)

商家明细单号查询明细单API Code = 0 is success

func (*ClientV3) V3TransferMerchantQuery added in v1.5.47

func (c *ClientV3) V3TransferMerchantQuery(ctx context.Context, outBatchNo string, bm gopay.BodyMap) (*TransferMerchantQueryRsp, error)

商家批次单号查询批次单API Code = 0 is success

func (*ClientV3) V3TransferQuery added in v1.5.47

func (c *ClientV3) V3TransferQuery(ctx context.Context, batchId string, bm gopay.BodyMap) (*TransferQueryRsp, error)

微信批次单号查询批次单API Code = 0 is success

func (*ClientV3) V3TransferReceipt added in v1.5.47

func (c *ClientV3) V3TransferReceipt(ctx context.Context, outBatchNo string) (*TransferReceiptRsp, error)

转账电子回单申请受理API Code = 0 is success

func (*ClientV3) V3TransferReceiptQuery added in v1.5.47

func (c *ClientV3) V3TransferReceiptQuery(ctx context.Context, outBatchNo string) (*TransferReceiptQueryRsp, error)

查询转账电子回单API Code = 0 is success

func (*ClientV3) V3VehicleParkingFee added in v1.5.90

func (c *ClientV3) V3VehicleParkingFee(ctx context.Context, bm gopay.BodyMap) (wxRsp *VehicleParkingFeeRsp, err error)

扣费受理 Code = 0 is success bm:body 参数

func (*ClientV3) V3VehicleParkingIn added in v1.5.90

func (c *ClientV3) V3VehicleParkingIn(ctx context.Context, bm gopay.BodyMap) (wxRsp *VehicleParkingInRsp, err error)

创建停车入场 Code = 0 is success bm:body 参数

func (*ClientV3) V3VehicleParkingOrder added in v1.5.90

func (c *ClientV3) V3VehicleParkingOrder(ctx context.Context, outTradeNo string, bm gopay.BodyMap) (*VehicleParkingOrderRsp, error)

查询订单 Code = 0 is success bm:query 参数

func (*ClientV3) V3VehicleParkingQuery added in v1.5.90

func (c *ClientV3) V3VehicleParkingQuery(ctx context.Context, bm gopay.BodyMap) (*VehicleParkingQueryRsp, error)

查询车牌服务开通信息 Code = 0 is success bm:query 参数

func (*ClientV3) V3ViolationNotifyUrlCreate added in v1.5.97

func (c *ClientV3) V3ViolationNotifyUrlCreate(ctx context.Context, url string) (wxRsp *ViolationNotifyUrlRsp, err error)

创建商户违规通知回调地址API Code = 0 is success

func (*ClientV3) V3ViolationNotifyUrlDelete added in v1.5.97

func (c *ClientV3) V3ViolationNotifyUrlDelete(ctx context.Context) (wxRsp *EmptyRsp, err error)

删除商户违规通知回调地址API Code = 0 is success

func (*ClientV3) V3ViolationNotifyUrlQuery added in v1.5.97

func (c *ClientV3) V3ViolationNotifyUrlQuery(ctx context.Context) (wxRsp *ViolationNotifyUrlRsp, err error)

查询商户违规通知回调地址API Code = 0 is success

func (*ClientV3) V3ViolationNotifyUrlUpdate added in v1.5.97

func (c *ClientV3) V3ViolationNotifyUrlUpdate(ctx context.Context, url string) (wxRsp *ViolationNotifyUrlRsp, err error)

更新商户违规通知回调地址API Code = 0 is success

func (*ClientV3) V3Withdraw added in v1.5.67

func (c *ClientV3) V3Withdraw(ctx context.Context, bm gopay.BodyMap) (*WithdrawRsp, error)

特约商户余额提现、二级商户预约提现 Code = 0 is success 服务商文档:https://pay.weixin.qq.com/wiki/doc/apiv3_partner/Offline/apis/chapter4_3_14.shtml

func (*ClientV3) V3WithdrawDownloadErrBill added in v1.5.67

func (c *ClientV3) V3WithdrawDownloadErrBill(ctx context.Context, bm gopay.BodyMap) (wxRsp *BillRsp, err error)

按日下载提现异常文件 注意:如 bill_date 为空,默认查前一天的 Code = 0 is success 服务商文档:https://pay.weixin.qq.com/wiki/doc/apiv3_partner/Offline/apis/chapter4_3_16.shtml

func (*ClientV3) V3WithdrawStatus added in v1.5.67

func (c *ClientV3) V3WithdrawStatus(ctx context.Context, withdrawId, outRequestNo string, bm gopay.BodyMap) (*WithdrawStatusRsp, error)

查询特约商户提现状态、二级商户查询预约提现状态 注意:withdrawId 和 outRequestNo 二选一 Code = 0 is success 服务商文档:https://pay.weixin.qq.com/wiki/doc/apiv3_partner/Offline/apis/chapter4_3_15.shtml

func (*ClientV3) WxPublicKey added in v1.5.62

func (c *ClientV3) WxPublicKey() (wxPublicKey *rsa.PublicKey)

获取最新的 微信平台证书

func (*ClientV3) WxPublicKeyMap added in v1.5.86

func (c *ClientV3) WxPublicKeyMap() (wxPublicKeyMap map[string]*rsa.PublicKey)

获取 微信平台证书 Map(readonly) wxPublicKeyMap: key:SerialNo, value:WxPublicKey

type CloseOrderRsp

type CloseOrderRsp struct {
	Code     int       `json:"-"`
	SignInfo *SignInfo `json:"-"`
	Error    string    `json:"-"`
}

关闭订单 Rsp

type Collection

type Collection struct {
	State        string     `json:"state"`                   // 收款状态,USER_PAYING:待支付,USER_PAID:已支付
	TotalAmount  int        `json:"total_amount,omitempty"`  // 总金额,大于等于0的数字,单位为分,只能为整数
	PayingAmount int        `json:"paying_amount,omitempty"` // 等待用户付款金额,只能为整数
	PaidAmount   int        `json:"paid_amount,omitempty"`   // 用户已付款的金额,只能为整数
	Details      []*Details `json:"details,omitempty"`       // 收款明细列表
}

type CombineAmount

type CombineAmount struct {
	TotalAmount   int    `json:"total_amount,omitempty"`   // 订单总金额,单位为分
	Currency      string `json:"currency,omitempty"`       // 标价币种:符合ISO 4217标准的三位字母代码,人民币:CNY
	PayerAmount   int    `json:"payer_amount"`             // 订单现金支付金额
	PayerCurrency string `json:"payer_currency,omitempty"` // 现金支付币种:符合ISO 4217标准的三位字母代码,默认人民币:CNY
}

type CombineQueryOrder

type CombineQueryOrder struct {
	CombineAppid      string       `json:"combine_appid"`        // 合单发起方的appid
	CombineMchid      string       `json:"combine_mchid"`        // 合单发起方商户号
	CombineOutTradeNo string       `json:"combine_out_trade_no"` // 合单支付总订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一
	SceneInfo         *SceneInfo   `json:"scene_info,omitempty"` // 支付场景描述
	SubOrders         []*SubOrders `json:"sub_orders"`           // 最多支持子单条数:50
	CombinePayerInfo  *Payer       `json:"combine_payer_info"`   // 支付者信息
}

type CombineQueryOrderRsp

type CombineQueryOrderRsp struct {
	Code     int                `json:"-"`
	SignInfo *SignInfo          `json:"-"`
	Response *CombineQueryOrder `json:"response,omitempty"`
	Error    string             `json:"-"`
}

合单查询订单 Rsp

type ComplaintDetail

type ComplaintDetail struct {
	ComplaintId           string                `json:"complaint_id"`                   // 投诉单对应的投诉单号
	ComplaintTime         string                `json:"complaint_time"`                 // 投诉时间, 例如:2015-05-20T13:29:35.120+08:00表示北京时间2015年05月20日13点29分35秒
	ComplaintDetail       string                `json:"complaint_detail"`               // 投诉的具体描述
	ComplaintedMchid      string                `json:"complainted_mchid,omitempty"`    // 投诉单对应的被诉商户号。
	ComplaintState        string                `json:"complaint_state"`                // 投诉单状态, PENDING:待处理, PROCESSING:处理中, PROCESSED:已处理完成
	PayerPhone            string                `json:"payer_phone,omitempty"`          // 投诉人联系方式。该字段已做加密处理
	PayerOpenid           string                `json:"payer_openid"`                   // 投诉人在商户appid下的唯一标识
	ComplaintOrderInfo    []*ComplaintOrderInfo `json:"complaint_order_info,omitempty"` // 投诉单关联订单信息
	ComplaintMediaList    []*ComplaintMediaList `json:"complaint_media_list,omitempty"` // 投诉资料列表
	ServiceOrderInfo      []*ServiceOrderInfo   `json:"service_order_info,omitempty"`   // 投诉单关联服务订单信息
	ComplaintFullRefunded bool                  `json:"complaint_full_refunded"`        // 投诉单下所有订单是否已全部全额退款
	IncomingUserResponse  bool                  `json:"incoming_user_response"`         // 投诉单是否有待回复的用户留言
	UserComplaintTimes    int                   `json:"user_complaint_times"`           // 用户投诉次数
	ProblemDescription    string                `json:"problem_description"`
	ProblemType           string                `json:"problem_type"`
	ApplyRefundAmount     int                   `json:"apply_refund_amount"`
	UserTagList           []string              `json:"user_tag_list"`
	AdditionalInfo        *AdditionalInfo       `json:"additional_info"`
}

type ComplaintDetailRsp

type ComplaintDetailRsp struct {
	Code     int              `json:"-"`
	SignInfo *SignInfo        `json:"-"`
	Response *ComplaintDetail `json:"response,omitempty"`
	Error    string           `json:"-"`
}

查询投诉单详情 Rsp

type ComplaintList

type ComplaintList struct {
	Data       []*ComplaintListItem `json:"data,omitempty"`        // 用户投诉信息详情
	Limit      int                  `json:"limit"`                 // 设置该次请求返回的最大投诉条数,范围【1,50】
	Offset     int                  `json:"offset"`                // 该次请求的分页开始位置,从0开始计数,例如offset=10,表示从第11条记录开始返回。
	TotalCount int                  `json:"total_count,omitempty"` // 投诉总条数,当offset=0时返回
}

type ComplaintListItem

type ComplaintListItem struct {
	ComplaintId           string                `json:"complaint_id"`                   // 投诉单对应的投诉单号
	ComplaintTime         string                `json:"complaint_time"`                 // 投诉时间, 例如:2015-05-20T13:29:35.120+08:00表示北京时间2015年05月20日13点29分35秒
	ComplaintDetail       string                `json:"complaint_detail"`               // 投诉的具体描述
	ComplaintState        string                `json:"complaint_state"`                // 投诉单状态, PENDING:待处理, PROCESSING:处理中, PROCESSED:已处理完成
	PayerPhone            string                `json:"payer_phone,omitempty"`          // 投诉人联系方式。该字段已做加密处理
	ComplaintOrderInfo    []*ComplaintOrderInfo `json:"complaint_order_info,omitempty"` // 投诉单关联订单信息
	ServiceOrderInfo      []*ServiceOrderInfo   `json:"service_order_info,omitempty"`   // 投诉单关联服务订单信息
	ComplaintFullRefunded bool                  `json:"complaint_full_refunded"`        // 投诉单下所有订单是否已全部全额退款
	IncomingUserResponse  bool                  `json:"incoming_user_response"`         // 投诉单是否有待回复的用户留言
	UserComplaintTimes    int                   `json:"user_complaint_times"`           // 用户投诉次数
	ComplaintMediaList    []*ComplaintMediaList `json:"complaint_media_list,omitempty"` // 投诉资料列表
	ProblemDescription    string                `json:"problem_description"`
	ProblemType           string                `json:"problem_type"`
	ApplyRefundAmount     int                   `json:"apply_refund_amount"`
	UserTagList           []string              `json:"user_tag_list"`
	AdditionalInfo        *AdditionalInfo       `json:"additional_info"`
}

type ComplaintListRsp

type ComplaintListRsp struct {
	Code     int            `json:"-"`
	SignInfo *SignInfo      `json:"-"`
	Response *ComplaintList `json:"response,omitempty"`
	Error    string         `json:"-"`
}

查询投诉单列表 Rsp

type ComplaintMediaList added in v1.5.92

type ComplaintMediaList struct {
	MediaType string   `json:"media_type"` // 投诉单对应的投诉媒体信息
	MediaUrl  []string `json:"media_url"`
}

type ComplaintNegotiationHistory

type ComplaintNegotiationHistory struct {
	Data       []*ComplaintNegotiationHistoryItem `json:"data,omitempty"`        // 投诉协商历史
	Limit      int                                `json:"limit"`                 // 设置该次请求返回的最大投诉条数,范围【1,50】
	Offset     int                                `json:"offset"`                // 该次请求的分页开始位置,从0开始计数,例如offset=10,表示从第11条记录开始返回。
	TotalCount int                                `json:"total_count,omitempty"` // 投诉总条数,当offset=0时返回
}

type ComplaintNegotiationHistoryItem

type ComplaintNegotiationHistoryItem struct {
	ComplaintMediaList *ComplaintMediaList `json:"complaint_media_list,omitempty"` // 投诉资料列表
	LogId              string              `json:"log_id"`                         // 操作流水号
	Operator           string              `json:"operator"`                       // 当前投诉协商记录的操作人
	OperateTime        string              `json:"operate_time"`                   // 当前投诉协商记录的操作时间
	OperateType        string              `json:"operate_type"`                   // 当前投诉协商记录的操作类型
	OperateDetails     string              `json:"operate_details"`                // 当前投诉协商记录的具体内容
	ImageList          []string            `json:"image_list"`                     // 当前投诉协商记录提交的图片凭证(url格式),最多返回4张图片,url有效时间为1小时。如未查询到协商历史图片凭证,则返回空数组。
}

type ComplaintNegotiationHistoryRsp

type ComplaintNegotiationHistoryRsp struct {
	Code     int                          `json:"-"`
	SignInfo *SignInfo                    `json:"-"`
	Response *ComplaintNegotiationHistory `json:"response,omitempty"`
	Error    string                       `json:"-"`
}

查询投诉单详情 Rsp

type ComplaintNotifyUrl

type ComplaintNotifyUrl struct {
	Mchid string `json:"mchid"` // 返回创建回调地址的商户号,由微信支付生成并下发。
	Url   string `json:"url"`   // 通知地址,仅支持https。
}

type ComplaintNotifyUrlRsp

type ComplaintNotifyUrlRsp struct {
	Code     int                 `json:"-"`
	SignInfo *SignInfo           `json:"-"`
	Response *ComplaintNotifyUrl `json:"response,omitempty"`
	Error    string              `json:"-"`
}

创建、查询、更新投诉通知回调地址 Rsp

type ComplaintOrderInfo

type ComplaintOrderInfo struct {
	TransactionId string `json:"transaction_id"` // 投诉单关联的微信订单号
	OutTradeNo    string `json:"out_trade_no"`   // 投诉单关联的商户订单号
	Amount        int    `json:"amount"`         // 订单金额,单位(分)
}

type ConsumeInformation added in v1.5.55

type ConsumeInformation struct {
	ConsumeTime   string               `json:"consume_time"`           // 核销时间,遵循rfc3339标准格式
	ConsumeMchid  string               `json:"consume_mchid"`          // 核销商户号
	TransactionId string               `json:"transaction_id"`         // 核销订单号
	GoodsDetail   []*CouponGoodsDetail `json:"goods_detail,omitempty"` // 商户下单单品信息
}

type CouponAvailableTime added in v1.5.55

type CouponAvailableTime struct {
	AvailableBeginTime       string           `json:"available_begin_time"`        // 批次开始时间,遵循rfc3339标准格式
	AvailableEndTime         string           `json:"available_end_time"`          // 批次结束时间,遵循rfc3339标准格式
	AvailableDayAfterReceive int              `json:"available_day_after_receive"` // 生效后N天内有效
	AvailableWeek            *AvailableWeek   `json:"available_week"`              // 固定周期有效时间段
	IrregularyAvaliableTime  []*AvailableTime `json:"irregulary_avaliable_time"`   // 无规律的有效时间段
	WaitDaysAfterReceive     int              `json:"wait_days_after_receive"`     // 领取后N天开始生效
}

type CouponCodeCount added in v1.5.55

type CouponCodeCount struct {
	TotalCount     int `json:"total_count"`     // 该批次总共已上传的code总数
	AvailableCount int `json:"available_count"` // 该批次当前可用的code数
}

type CouponGoodsDetail added in v1.5.55

type CouponGoodsDetail struct {
	GoodsId        string `json:"goods_id"`        // 商品编码
	Quantity       int    `json:"quantity"`        // 商品数量
	Price          int    `json:"price"`           // 单品价格,单位为分
	DiscountAmount int    `json:"discount_amount"` // 商品优惠金额
}

type CouponUseRule added in v1.5.55

type CouponUseRule struct {
	CouponAvailableTime *CouponAvailableTime `json:"coupon_available_time"`
	FixedNormalCoupon   *struct {
		DiscountAmount     int `json:"discount_amount"`     // 优惠金额,单位:分
		TransactionMinimum int `json:"transaction_minimum"` // 消费门槛,单位:分
	} `json:"fixed_normal_coupon,omitempty"` // 固定面额满减券使用规则
	DiscountCoupon *struct {
		DiscountPercent    int `json:"discount_percent"`    // 折扣百分比,例如:86为八六折
		TransactionMinimum int `json:"transaction_minimum"` // 消费门槛,单位:分
	} `json:"discount_coupon,omitempty"` // 折扣券使用规则
	ExchangeCoupon *struct {
		ExchangePrice      int `json:"exchange_price"`      // 单品换购价,单位:分
		TransactionMinimum int `json:"transaction_minimum"` // 消费门槛,单位:分
	} `json:"exchange_coupon,omitempty"` // 换购券使用规则
	UseMethod         string `json:"use_method"`          // 核销方式
	MiniProgramsAppid string `json:"mini_programs_appid"` // 小程序appid
	MiniProgramsPath  string `json:"mini_programs_path"`  // 小程序path
}

type CustomEntrance added in v1.5.55

type CustomEntrance struct {
	MiniProgramsInfo *MiniProgramsInfo `json:"mini_programs_info"` // 小程序入口
	Appid            string            `json:"appid"`              // 商户公众号appid
	HallId           string            `json:"hall_id"`            // 营销馆id
	StoreId          string            `json:"store_id"`           // 可用门店id
	CodeDisplayMode  string            `json:"code_display_mode"`  // code展示模式
}

type CutToMessage added in v1.5.55

type CutToMessage struct {
	SinglePriceMax int `json:"single_price_max"` // 可用优惠的商品最高单价,单位:分
	CutToPrice     int `json:"cut_to_price"`     // 减至后的优惠单价,单位:分
}

type Details

type Details struct {
	Seq             int                `json:"seq,omitempty"`              // 收款序号
	Amount          int                `json:"amount,omitempty"`           // 单笔收款动作的金额,只能为整数
	PaidType        string             `json:"paid_type,omitempty"`        // 收款成功渠道,NEWTON:微信支付分,MCH:商户渠道
	PaidTime        string             `json:"paid_time,omitempty"`        // 支付成功时间,支持两种格式:yyyyMMddHHmmss和yyyyMMdd
	TransactionId   string             `json:"transaction_id,omitempty"`   // 结单交易单号,等于普通支付接口中的transaction_id
	PromotionDetail []*PromotionDetail `json:"promotion_detail,omitempty"` // 优惠功能,享受优惠时返回该字段
}

type DiscountCardApply added in v1.5.46

type DiscountCardApply struct {
	PrepareCardToken string `json:"prepare_card_token"` // 预领卡请求token,在引导用户进入先享卡领卡时,需要传入prepare_card_token
}

type DiscountCardApplyRsp added in v1.5.46

type DiscountCardApplyRsp struct {
	Code     int                `json:"-"`
	SignInfo *SignInfo          `json:"-"`
	Response *DiscountCardApply `json:"response,omitempty"`
	Error    string             `json:"-"`
}

预受理领卡请求 Rsp

type DiscountCardQuery added in v1.5.46

type DiscountCardQuery struct {
	CardId         string `json:"card_id"`          // 先享卡Id,唯一标识一个先享卡。
	CardTemplateId string `json:"card_template_id"` // 先享卡卡模板Id,唯一定义此资源的标识。
	Openid         string `json:"openid"`           // 微信用户在商户对应appid下的唯一标识
	OutCardCode    string `json:"out_card_code"`    // 商户领卡号
	Appid          string `json:"appid"`            // 公众账号Id
	Mchid          string `json:"mchid"`            // 商户号
	TimeRange      *struct {
		BeginTime string `json:"begin_time"` // 约定开始时间
		EndTime   string `json:"end_time"`   // 约定结束时间
	} `json:"time_range"` // 用户领取先享卡之后,约定的生效时间和到期时间。
	State            string          `json:"state"`                       // 先享卡的守约状态:ONGOING:约定进行中,SETTLING:约定到期核对中,FINISHED:已完成约定,UNFINISHED:未完成约定
	UnfinishedReason string          `json:"unfinished_reason,omitempty"` // 用户未完成约定的原因
	TotalAmount      int             `json:"total_amount,omitempty"`      // 享受优惠总金额
	PayInformation   *PayInformation `json:"pay_information,omitempty"`   // 用户退回优惠的付款信息
	CreateTime       string          `json:"create_time"`                 // 创卡时间
	Objectives       []*Objective    `json:"objectives"`                  // 用户先享卡目标列表
	Rewards          []*Reward       `json:"rewards"`                     // 用户先享卡优惠列表
	SharerOpenid     string          `json:"sharer_openid,omitempty"`     // 邀请者用户标识
}

type DiscountCardQueryRsp added in v1.5.46

type DiscountCardQueryRsp struct {
	Code     int                `json:"-"`
	SignInfo *SignInfo          `json:"-"`
	Response *DiscountCardQuery `json:"response,omitempty"`
	Error    string             `json:"-"`
}

查询先享卡订单 Rsp

type DisplayPatternInfo added in v1.5.55

type DisplayPatternInfo struct {
	Description     string `json:"description,omitempty"` // 使用说明
	MerchantLogoUrl string `json:"merchant_logo_url"`     // 商户logo
	MerchantName    string `json:"merchant_name"`         // 商户名称
	BackgroundColor string `json:"background_color"`      // 背景颜色
	CouponImageUrl  string `json:"coupon_image_url"`      // 券详情图片
}

type DownloadBill

type DownloadBill struct {
	DownloadBillCount int           `json:"download_bill_count"`
	DownloadBillList  []*BillDetail `json:"download_bill_list"`
}

type EcommerceApply added in v1.5.65

type EcommerceApply struct {
	ApplymentId  int64  `json:"applyment_id"`
	OutRequestNo string `json:"out_request_no"`
}

type EcommerceApplyRsp added in v1.5.65

type EcommerceApplyRsp struct {
	Code     int             `json:"-"`
	SignInfo *SignInfo       `json:"-"`
	Response *EcommerceApply `json:"response,omitempty"`
	Error    string          `json:"-"`
}

二级商户进件 Rsp

type EcommerceApplyStatus added in v1.5.65

type EcommerceApplyStatus struct {
	ApplymentState     string            `json:"applyment_state"`
	ApplymentStateDesc string            `json:"applyment_state_desc"`
	SignState          string            `json:"sign_state,omitempty"`
	SignUrl            string            `json:"sign_url,omitempty"`
	SubMchid           string            `json:"sub_mchid,omitempty"`
	AccountValidation  AccountValidation `json:"account_validation"`
	AuditDetail        []*AuditDetail    `json:"audit_detail,omitempty"`
	LegalValidationUrl string            `json:"legal_validation_url,omitempty"`
	OutRequestNo       string            `json:"out_request_no"`
	ApplymentId        int64             `json:"applyment_id"`
}

type EcommerceApplyStatusRsp added in v1.5.65

type EcommerceApplyStatusRsp struct {
	Code     int                   `json:"-"`
	SignInfo *SignInfo             `json:"-"`
	Response *EcommerceApplyStatus `json:"response,omitempty"`
	Error    string                `json:"-"`
}

查询申请状态 Rsp

type EcommerceBalance added in v1.5.58

type EcommerceBalance struct {
	SubMchid        string `json:"sub_mchid"`                // 特约商户号
	AccountType     string `json:"account_type,omitempty"`   // 账户类型
	AvailableAmount int    `json:"available_amount"`         // 可用余额(单位:分),此余额可做提现操作
	PendingAmount   int    `json:"pending_amount,omitempty"` // 不可用余额(单位:分)
}

type EcommerceBalanceRsp added in v1.5.58

type EcommerceBalanceRsp struct {
	Code     int               `json:"-"`
	SignInfo *SignInfo         `json:"-"`
	Response *EcommerceBalance `json:"response,omitempty"`
	Error    string            `json:"-"`
}

查询特约商户账户实时余额 Rsp

type EcommerceFundFlowBillRsp added in v1.5.58

type EcommerceFundFlowBillRsp struct {
	Code     int           `json:"-"`
	SignInfo *SignInfo     `json:"-"`
	Response *DownloadBill `json:"response,omitempty"`
	Error    string        `json:"-"`
}

二级商户资金账单 Rsp

type EcommerceProfitShare added in v1.5.68

type EcommerceProfitShare struct {
	SubMchid      string               `json:"sub_mchid"`           // 二级商户号
	TransactionId string               `json:"transaction_id"`      // 微信订单号
	OutOrderNo    string               `json:"out_order_no"`        // 商户分账单号
	OrderId       string               `json:"order_id"`            // 微信分账单号
	Status        string               `json:"status"`              // 分账单状态:PROCESSING:处理中,FINISHED:分账完成
	Receivers     []*EcommerceReceiver `json:"receivers,omitempty"` // 分账接收方列表
}

type EcommerceProfitShareAddReceiverRsp added in v1.5.68

type EcommerceProfitShareAddReceiverRsp struct {
	Code     int                           `json:"-"`
	SignInfo *SignInfo                     `json:"-"`
	Response *EcommerceProfitShareReceiver `json:"response,omitempty"`
	Error    string                        `json:"-"`
}

添加分账接收方 Rsp

type EcommerceProfitShareDeleteReceiverRsp added in v1.5.68

type EcommerceProfitShareDeleteReceiverRsp struct {
	Code     int                           `json:"-"`
	SignInfo *SignInfo                     `json:"-"`
	Response *EcommerceProfitShareReceiver `json:"response,omitempty"`
	Error    string                        `json:"-"`
}

删除分账接收方 Rsp

type EcommerceProfitShareFinish added in v1.5.68

type EcommerceProfitShareFinish struct {
	SubMchid      string `json:"sub_mchid"`      // 二级商户号
	TransactionId string `json:"transaction_id"` // 微信订单号
	OutOrderNo    string `json:"out_order_no"`   // 商户分账单号
	OrderId       string `json:"order_id"`       // 微信分账单号
}

type EcommerceProfitShareFinishRsp added in v1.5.68

type EcommerceProfitShareFinishRsp struct {
	Code     int                         `json:"-"`
	SignInfo *SignInfo                   `json:"-"`
	Response *EcommerceProfitShareFinish `json:"response,omitempty"`
	Error    string                      `json:"-"`
}

完结分账 Rsp

type EcommerceProfitShareQuery added in v1.5.68

type EcommerceProfitShareQuery struct {
	SubMchid          string               `json:"sub_mchid"`                    // 二级商户号
	TransactionId     string               `json:"transaction_id"`               // 微信订单号
	OutOrderNo        string               `json:"out_order_no"`                 // 商户分账单号
	OrderId           string               `json:"order_id"`                     // 微信分账单号
	Status            string               `json:"status"`                       // 分账单状态:PROCESSING:处理中,FINISHED:分账完成
	Receivers         []*EcommerceReceiver `json:"receivers,omitempty"`          // 分账接收方列表
	FinishAmount      int                  `json:"finish_amount,omitempty"`      // 分账完结的分账金额,单位为分,仅当查询分账完结的执行结果时,存在本字段。
	FinishDescription string               `json:"finish_description,omitempty"` // 分账完结的原因描述,仅当查询分账完结的执行结果时,存在本字段。
}

type EcommerceProfitShareQueryRsp added in v1.5.68

type EcommerceProfitShareQueryRsp struct {
	Code     int                        `json:"-"`
	SignInfo *SignInfo                  `json:"-"`
	Response *EcommerceProfitShareQuery `json:"response,omitempty"`
	Error    string                     `json:"-"`
}

查询分账结果 Rsp

type EcommerceProfitShareReceiver added in v1.5.68

type EcommerceProfitShareReceiver struct {
	Type    string `json:"type"`    // 接收方类型:MERCHANT_ID:商户,PERSONAL_OPENID:个人
	Account string `json:"account"` // 分账接收方帐号
}

type EcommerceProfitShareReturn added in v1.5.68

type EcommerceProfitShareReturn struct {
	SubMchid    string `json:"sub_mchid"`             // 二级商户号
	OrderId     string `json:"order_id"`              // 微信分账单号,微信系统返回的唯一标识
	OutOrderNo  string `json:"out_order_no"`          // 商户分账单号
	OutReturnNo string `json:"out_return_no"`         // 商户回退单号
	ReturnNo    string `json:"return_no"`             // 微信分账回退单号,微信支付系统返回的唯一标识。
	ReturnMchid string `json:"return_mchid"`          // 只能对原分账请求中成功分给商户接收方进行回退
	Amount      int    `json:"amount"`                // 需要从分账接收方回退的金额,单位为分,只能为整数
	Result      string `json:"result"`                // 回退结果: PROCESSING:处理中,SUCCESS:已成功,FAILED:已失败
	FailReason  string `json:"fail_reason,omitempty"` // 失败原因: ACCOUNT_ABNORMAL : 分账接收方账户异常,TIME_OUT_CLOSED : 超时关单
	FinishTime  string `json:"finish_time"`           // 分账回退完成时间
}

type EcommerceProfitShareReturnResultRsp added in v1.5.68

type EcommerceProfitShareReturnResultRsp struct {
	Code     int                         `json:"-"`
	SignInfo *SignInfo                   `json:"-"`
	Response *EcommerceProfitShareReturn `json:"response,omitempty"`
	Error    string                      `json:"-"`
}

查询分账回退结果 Rsp

type EcommerceProfitShareReturnRsp added in v1.5.68

type EcommerceProfitShareReturnRsp struct {
	Code     int                         `json:"-"`
	SignInfo *SignInfo                   `json:"-"`
	Response *EcommerceProfitShareReturn `json:"response,omitempty"`
	Error    string                      `json:"-"`
}

请求分账回退 Rsp

type EcommerceProfitShareRsp added in v1.5.68

type EcommerceProfitShareRsp struct {
	Code     int                   `json:"-"`
	SignInfo *SignInfo             `json:"-"`
	Response *EcommerceProfitShare `json:"response,omitempty"`
	Error    string                `json:"-"`
}

请求分账 Rsp

type EcommerceProfitShareUnsplitAmount added in v1.5.68

type EcommerceProfitShareUnsplitAmount struct {
	TransactionId string `json:"transaction_id"` // 微信订单号
	UnsplitAmount int    `json:"unsplit_amount"` // 订单剩余待分金额
}

type EcommerceProfitShareUnsplitAmountRsp added in v1.5.68

type EcommerceProfitShareUnsplitAmountRsp struct {
	Code     int                                `json:"-"`
	SignInfo *SignInfo                          `json:"-"`
	Response *EcommerceProfitShareUnsplitAmount `json:"response,omitempty"`
	Error    string                             `json:"-"`
}

查询订单剩余待分金额 Rsp

type EcommerceReceiver added in v1.5.68

type EcommerceReceiver struct {
	Amount          int    `json:"amount"`                // 分账金额
	Description     string `json:"description"`           // 分账描述
	Type            string `json:"type"`                  // 分账接收方类型
	ReceiverAccount string `json:"receiver_account"`      // 分账接收方帐号
	ReceiverMchid   string `json:"receiver_mchid"`        // 分账接收商户号
	Result          string `json:"result"`                // 分账结果,PENDING:待分账,SUCCESS:分账成功,CLOSED:已关闭
	DetailId        string `json:"detail_id"`             // 分账明细单号
	FailReason      string `json:"fail_reason,omitempty"` // 分账失败原因ACCOUNT_ABNORMAL : 分账接收账户异常、NO_RELATION : 分账关系已解除、RECEIVER_HIGH_RISK : 高风险接收方、RECEIVER_REAL_NAME_NOT_VERIFIED : 接收方未实名、NO_AUTH : 分账权限已解除
	FinishTime      string `json:"finish_time"`           // 分账完成时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss.sss+TIMEZONE
}

type EcommerceRefund added in v1.5.68

type EcommerceRefund struct {
	RefundId        string                 `json:"refund_id"`        // 微信支付退款号
	OutRefundNo     string                 `json:"out_refund_no"`    // 商户退款单号
	CreateTime      string                 `json:"create_time"`      // 退款创建时间
	RefundAccount   string                 `json:"refund_account"`   // 退款资金来源
	Amount          *EcommerceRefundAmount `json:"amount"`           // 金额信息
	PromotionDetail []*PromotionDetailItem `json:"promotion_detail"` // 优惠退款信息
}

type EcommerceRefundAdvance added in v1.5.68

type EcommerceRefundAdvance struct {
	RefundId        string `json:"refund_id"`         // 微信支付退款号
	AdvanceReturnId string `json:"advance_return_id"` // 微信回补单号
	ReturnAmount    int    `json:"return_amount"`     // 垫付回补金额
	PayerMchid      string `json:"payer_mchid"`       // 出款方商户号
	PayerAccount    string `json:"payer_account"`     // 出款方账户
	PayeeMchid      string `json:"payee_mchid"`       // 入账方商户号
	PayeeAccount    string `json:"payee_account"`     // 入账方账户
	Result          string `json:"result"`            // 垫付回补结果
	SuccessTime     string `json:"success_time"`      // 垫付回补完成时间
}

type EcommerceRefundAdvanceRsp added in v1.5.68

type EcommerceRefundAdvanceRsp struct {
	Code     int                     `json:"-"`
	SignInfo *SignInfo               `json:"-"`
	Response *EcommerceRefundAdvance `json:"response,omitempty"`
	Error    string                  `json:"-"`
}

垫付退款回补 Rsp

type EcommerceRefundAmount added in v1.5.68

type EcommerceRefundAmount struct {
	Refund         int    `json:"refund"`          // 退款金额
	PayerRefund    int    `json:"payer_refund"`    // 用户退款金额
	DiscountRefund int    `json:"discount_refund"` // 优惠退款金额
	Currency       string `json:"currency"`        // 退款币种
}

type EcommerceRefundQuery added in v1.5.68

type EcommerceRefundQuery struct {
	RefundId            string                 `json:"refund_id"`                // 微信支付退款号
	OutRefundNo         string                 `json:"out_refund_no"`            // 商户退款单号
	TransactionId       string                 `json:"transaction_id"`           // 微信支付系统生成的订单号
	OutTradeNo          string                 `json:"out_trade_no"`             // 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一
	Channel             string                 `json:"channel"`                  // 退款渠道
	UserReceivedAccount string                 `json:"user_received_account"`    // 退款入账账户
	SuccessTime         string                 `json:"success_time"`             // 退款成功时间
	CreateTime          string                 `json:"create_time"`              // 退款创建时间
	Status              string                 `json:"status"`                   // 退款状态
	RefundAccount       string                 `json:"refund_account,omitempty"` // 退款出资商户
	FundsAccount        string                 `json:"funds_account"`            // 资金账户
	Amount              *EcommerceRefundAmount `json:"amount"`                   // 金额信息
	PromotionDetail     []*PromotionDetailItem `json:"promotion_detail"`         // 优惠退款信息
}

type EcommerceRefundQueryRsp added in v1.5.68

type EcommerceRefundQueryRsp struct {
	Code     int                   `json:"-"`
	SignInfo *SignInfo             `json:"-"`
	Response *EcommerceRefundQuery `json:"response,omitempty"`
	Error    string                `json:"-"`
}

申请退款 Rsp

type EcommerceRefundRsp added in v1.5.68

type EcommerceRefundRsp struct {
	Code     int              `json:"-"`
	SignInfo *SignInfo        `json:"-"`
	Response *EcommerceRefund `json:"response,omitempty"`
	Error    string           `json:"-"`
}

申请退款 Rsp

type EcommerceSubsidies added in v1.5.68

type EcommerceSubsidies struct {
	SubMchid      string `json:"sub_mchid"`      // 二级商户号
	TransactionId string `json:"transaction_id"` // 微信订单号
	SubsidyId     string `json:"subsidy_id"`     // 微信补差单号
	Description   string `json:"description"`    // 补差描述
	Amount        int    `json:"amount"`         // 补差金额
	Result        string `json:"result"`         // 补差单结果
	SuccessTime   string `json:"success_time"`   // 补差完成时间
}

type EcommerceSubsidiesCancel added in v1.5.68

type EcommerceSubsidiesCancel struct {
	SubMchid      string `json:"sub_mchid"`      // 二级商户号
	TransactionId string `json:"transaction_id"` // 微信订单号
	Result        string `json:"result"`         // 取消补差结果
	Description   string `json:"description"`    // 取消补差描述
}

type EcommerceSubsidiesCancelRsp added in v1.5.68

type EcommerceSubsidiesCancelRsp struct {
	Code     int                       `json:"-"`
	SignInfo *SignInfo                 `json:"-"`
	Response *EcommerceSubsidiesCancel `json:"response,omitempty"`
	Error    string                    `json:"-"`
}

取消补差 Rsp

type EcommerceSubsidiesReturn added in v1.5.68

type EcommerceSubsidiesReturn struct {
	SubMchid        string `json:"sub_mchid"`         // 二级商户号
	TransactionId   string `json:"transaction_id"`    // 微信订单号
	SubsidyRefundId string `json:"subsidy_refund_id"` // 微信补差回退单号
	RefundId        string `json:"refund_id"`         // 微信退款单号
	OutOrderNo      string `json:"out_order_no"`      // 商户补差回退单号
	Amount          int    `json:"amount"`            // 补差回退金额
	Description     string `json:"description"`       // 补差回退描述
	Result          string `json:"result"`            // 补差回退结果
	SuccessTime     string `json:"success_time"`      // 补差回退完成时间
}

type EcommerceSubsidiesReturnRsp added in v1.5.68

type EcommerceSubsidiesReturnRsp struct {
	Code     int                       `json:"-"`
	SignInfo *SignInfo                 `json:"-"`
	Response *EcommerceSubsidiesReturn `json:"response,omitempty"`
	Error    string                    `json:"-"`
}

请求补差回退 Rsp

type EcommerceSubsidiesRsp added in v1.5.68

type EcommerceSubsidiesRsp struct {
	Code     int                 `json:"-"`
	SignInfo *SignInfo           `json:"-"`
	Response *EcommerceSubsidies `json:"response,omitempty"`
	Error    string              `json:"-"`
}

请求补差 Rsp

type EcommerceWithdraw added in v1.5.77

type EcommerceWithdraw struct {
	WithdrawId   string `json:"withdraw_id"`    // 微信支付预约提现单号
	OutRequestNo string `json:"out_request_no"` // 商户预约提现单号
}

type EcommerceWithdrawRsp added in v1.5.77

type EcommerceWithdrawRsp struct {
	Code     int                `json:"-"`
	SignInfo *SignInfo          `json:"-"`
	Response *EcommerceWithdraw `json:"response,omitempty"`
	Error    string             `json:"-"`
}

电商平台预约提现 Rsp

type EcommerceWithdrawStatus added in v1.5.77

type EcommerceWithdrawStatus struct {
	Status        string `json:"status"`         // 提现单状态:CREATE_SUCCESS:受理成功,SUCCESS:提现成功,FAIL:提现失败,REFUND:提现退票,CLOSE:关单,INIT:业务单已创建
	WithdrawId    string `json:"withdraw_id"`    // 微信支付提现单号
	OutRequestNo  string `json:"out_request_no"` // 商户提现单号
	Amount        int    `json:"amount"`         // 提现金额
	CreateTime    string `json:"create_time"`    // 创建时间
	UpdateTime    string `json:"update_time"`    // 更新时间
	Reason        string `json:"reason"`         // 提现失败原因,仅在提现失败、退票、关单时有值
	Remark        string `json:"remark"`         // 商户对提现单的备注,若发起提现时未传入相应值或输入不合法,则该值为空
	BankMemo      string `json:"bank_memo"`      // 展示在收款银行系统中的附言,由数字、字母、汉字组成(能否成功展示依赖银行系统支持)。若发起提现时未传入相应值或输入不合法,则该值为空
	AccountType   string `json:"account_type"`   // 出款账户类型
	AccountNumber string `json:"account_number"` // 服务商提现入账的银行账号,仅显示后四位。
	AccountBank   string `json:"account_bank"`   // 服务商提现入账的开户银行
	BankName      string `json:"bank_name"`      // 服务商提现入账的开户银行全称(含支行)
	Solution      string `json:"solution"`       // 提现失败解决方案,仅在提现失败、退票、关单时有值
}

type EcommerceWithdrawStatusRsp added in v1.5.77

type EcommerceWithdrawStatusRsp struct {
	Code     int                      `json:"-"`
	SignInfo *SignInfo                `json:"-"`
	Response *EcommerceWithdrawStatus `json:"response,omitempty"`
	Error    string                   `json:"-"`
}

电商平台查询预约提现状态 Rsp

type EmptyRsp

type EmptyRsp struct {
	Code     int       `json:"-"`
	SignInfo *SignInfo `json:"-"`
	Error    string    `json:"-"`
}

type EncryptCert added in v1.5.92

type EncryptCert struct {
	Algorithm      string `json:"algorithm"`
	AssociatedData string `json:"associated_data"`
	Ciphertext     string `json:"ciphertext"`
	Nonce          string `json:"nonce"`
}

type EntrustPayNotifyRsp added in v1.5.89

type EntrustPayNotifyRsp struct {
	Code     int               `json:"-"`
	SignInfo *SignInfo         `json:"-"`
	Response *BankSearchBranch `json:"response,omitempty"`
	Error    string            `json:"-"`
}

type FailCode added in v1.5.55

type FailCode struct {
	CouponCode string `json:"coupon_code"` // 上传失败的券code
	Code       string `json:"code"`        // 上传失败错误码
	Message    string `json:"message"`     // 上传失败错误信息
}

type FavorBatch added in v1.5.55

type FavorBatch struct {
	StockId            string        `json:"stock_id"`             // 微信为每个代金券批次分配的唯一Id
	StockCreatorMchid  string        `json:"stock_creator_mchid"`  // 创建批次的商户号
	StockName          string        `json:"stock_name"`           // 批次名称
	Status             string        `json:"status"`               // 批次状态
	CreateTime         string        `json:"create_time"`          // 创建时间,遵循rfc3339标准格式
	Description        string        `json:"description"`          // 使用说明
	StockUseRule       *StockUseRule `json:"stock_use_rule"`       // 普通发券批次特定信息
	AvailableBeginTime string        `json:"available_begin_time"` // 可用开始时间,遵循rfc3339标准格式
	AvailableEndTime   string        `json:"available_end_time"`   // 可用结束时间,遵循rfc3339标准格式
	DistributedCoupons int           `json:"distributed_coupons"`  // 已发券数量
	NoCash             bool          `json:"no_cash"`              // 是否无资金流
	StartTime          string        `json:"start_time"`           // 激活批次的时间
	StopTime           string        `json:"stop_time"`            // 终止批次的时间
	CutToMessage       *CutToMessage `json:"cut_to_message"`       // 单品优惠特定信息
	Singleitem         bool          `json:"singleitem"`           // 是否单品优惠
	StockType          string        `json:"stock_type"`           // 批次类型
}

type FavorBatchCreate added in v1.5.55

type FavorBatchCreate struct {
	StockId    string `json:"stock_id"`    // 批次号
	CreateTime string `json:"create_time"` // 创建时间,遵循rfc3339标准格式
}

type FavorBatchCreateRsp added in v1.5.55

type FavorBatchCreateRsp struct {
	Code     int               `json:"-"`
	SignInfo *SignInfo         `json:"-"`
	Response *FavorBatchCreate `json:"response,omitempty"`
	Error    string            `json:"-"`
}

创建代金券批次 Rsp

type FavorBatchDetailRsp added in v1.5.55

type FavorBatchDetailRsp struct {
	Code     int         `json:"-"`
	SignInfo *SignInfo   `json:"-"`
	Response *FavorBatch `json:"response,omitempty"`
	Error    string      `json:"-"`
}

查询批次详情 Rsp

type FavorBatchGrant added in v1.5.55

type FavorBatchGrant struct {
	CouponId string `json:"coupon_id"` // 微信为代金券唯一分配的id
}

type FavorBatchGrantRsp added in v1.5.55

type FavorBatchGrantRsp struct {
	Code     int              `json:"-"`
	SignInfo *SignInfo        `json:"-"`
	Response *FavorBatchGrant `json:"response,omitempty"`
	Error    string           `json:"-"`
}

发放代金券批次 Rsp

type FavorBatchList added in v1.5.55

type FavorBatchList struct {
	Data       []*FavorBatch `json:"data,omitempty"` // 批次详情列表
	TotalCount int           `json:"total_count"`    // 批次总数
	Offset     int           `json:"offset"`         // 分页页码
	Limit      int           `json:"limit"`          // 分页大小
}

type FavorBatchListRsp added in v1.5.55

type FavorBatchListRsp struct {
	Code     int             `json:"-"`
	SignInfo *SignInfo       `json:"-"`
	Response *FavorBatchList `json:"response,omitempty"`
	Error    string          `json:"-"`
}

条件查询批次列表 Rsp

type FavorBatchPause added in v1.5.55

type FavorBatchPause struct {
	PauseTime string `json:"pause_time"` // 暂停时间,遵循rfc3339标准格式
	StockId   string `json:"stock_id"`   // 批次号
}

type FavorBatchPauseRsp added in v1.5.55

type FavorBatchPauseRsp struct {
	Code     int              `json:"-"`
	SignInfo *SignInfo        `json:"-"`
	Response *FavorBatchPause `json:"response,omitempty"`
	Error    string           `json:"-"`
}

暂停代金券批次 Rsp

type FavorBatchRestart added in v1.5.55

type FavorBatchRestart struct {
	RestartTime string `json:"restart_time"` // 生效时间,遵循rfc3339标准格式
	StockId     string `json:"stock_id"`     // 批次号
}

type FavorBatchRestartRsp added in v1.5.55

type FavorBatchRestartRsp struct {
	Code     int                `json:"-"`
	SignInfo *SignInfo          `json:"-"`
	Response *FavorBatchRestart `json:"response,omitempty"`
	Error    string             `json:"-"`
}

重启代金券批次 Rsp

type FavorBatchStart added in v1.5.55

type FavorBatchStart struct {
	StockId   string `json:"stock_id"`   // 微信为每个代金券批次分配的唯一Id
	StartTime string `json:"start_time"` // 生效时间,遵循rfc3339标准格式
}

type FavorBatchStartRsp added in v1.5.55

type FavorBatchStartRsp struct {
	Code     int              `json:"-"`
	SignInfo *SignInfo        `json:"-"`
	Response *FavorBatchStart `json:"response,omitempty"`
	Error    string           `json:"-"`
}

激活代金券批次 Rsp

type FavorCallbackUrl added in v1.5.55

type FavorCallbackUrl struct {
	UpdateTime string `json:"update_time"` // 修改时间,遵循rfc3339标准格式
	NotifyUrl  string `json:"notify_url"`  // 通知地址
}

type FavorCallbackUrlSetRsp added in v1.5.55

type FavorCallbackUrlSetRsp struct {
	Code     int               `json:"-"`
	SignInfo *SignInfo         `json:"-"`
	Response *FavorCallbackUrl `json:"response,omitempty"`
	Error    string            `json:"-"`
}

设置消息通知地址 Rsp

type FavorDetail added in v1.5.55

type FavorDetail struct {
	StockId                 string                   `json:"stock_id"`                  // 微信为每个代金券批次分配的唯一Id
	StockCreatorMchid       string                   `json:"stock_creator_mchid"`       // 创建批次的商户号
	CouponId                string                   `json:"coupon_id"`                 // 微信为代金券唯一分配的id
	CutToMessage            *CutToMessage            `json:"cut_to_message"`            // 单品优惠特定信息
	CouponName              string                   `json:"coupon_name"`               // 代金券名称
	Status                  string                   `json:"status"`                    // 代金券状态
	Description             string                   `json:"description"`               // 使用说明
	CreateTime              string                   `json:"create_time"`               // 领券时间,遵循rfc3339标准格式
	CouponType              string                   `json:"coupon_type"`               // 券类型
	NoCash                  bool                     `json:"no_cash"`                   // 是否无资金流
	AvailableBeginTime      string                   `json:"available_begin_time"`      // 可用开始时间,遵循rfc3339标准格式
	AvailableEndTime        string                   `json:"available_end_time"`        // 可用结束时间,遵循rfc3339标准格式
	Singleitem              bool                     `json:"singleitem"`                // 是否单品优惠
	NormalCouponInformation *NormalCouponInformation `json:"normal_coupon_information"` // 普通满减券面额、门槛信息
}

type FavorDetailRsp added in v1.5.55

type FavorDetailRsp struct {
	Code     int          `json:"-"`
	SignInfo *SignInfo    `json:"-"`
	Response *FavorDetail `json:"response,omitempty"`
	Error    string       `json:"-"`
}

查询批次详情 Rsp

type FavorFlowDownload added in v1.5.55

type FavorFlowDownload struct {
	Url       string `json:"url"`        // 流水文件下载链接,30s内有效
	HashValue string `json:"hash_value"` // 文件内容的哈希值,防止篡改
	HashType  string `json:"hash_type"`  // 哈希算法类型,目前只支持sha1
}

type FavorItems added in v1.5.55

type FavorItems struct {
	StockId    string   `json:"stock_id"`       // 批次号
	Data       []string `json:"data,omitempty"` // 可用商户列表
	TotalCount int      `json:"total_count"`    // 批次总数
	Offset     int      `json:"offset"`         // 分页页码
	Limit      int      `json:"limit"`          // 分页大小
}

type FavorItemsRsp added in v1.5.55

type FavorItemsRsp struct {
	Code     int         `json:"-"`
	SignInfo *SignInfo   `json:"-"`
	Response *FavorItems `json:"response,omitempty"`
	Error    string      `json:"-"`
}

查询代金券可用单品 Rsp

type FavorMerchant added in v1.5.55

type FavorMerchant struct {
	StockId    string   `json:"stock_id"`       // 批次号
	Data       []string `json:"data,omitempty"` // 可用商户列表
	TotalCount int      `json:"total_count"`    // 批次总数
	Offset     int      `json:"offset"`         // 分页页码
	Limit      int      `json:"limit"`          // 分页大小
}

type FavorMerchantRsp added in v1.5.55

type FavorMerchantRsp struct {
	Code     int            `json:"-"`
	SignInfo *SignInfo      `json:"-"`
	Response *FavorMerchant `json:"response,omitempty"`
	Error    string         `json:"-"`
}

查询代金券可用商户 Rsp

type FavorRefundFlowDownloadRsp added in v1.5.55

type FavorRefundFlowDownloadRsp struct {
	Code     int                `json:"-"`
	SignInfo *SignInfo          `json:"-"`
	Response *FavorFlowDownload `json:"response,omitempty"`
	Error    string             `json:"-"`
}

下载批次退款明细 Rsp

type FavorUseFlowDownloadRsp added in v1.5.55

type FavorUseFlowDownloadRsp struct {
	Code     int                `json:"-"`
	SignInfo *SignInfo          `json:"-"`
	Response *FavorFlowDownload `json:"response,omitempty"`
	Error    string             `json:"-"`
}

下载批次核销明细 Rsp

type FavorUserCoupons added in v1.5.55

type FavorUserCoupons struct {
	Data       []*UserCoupon `json:"data,omitempty"` // 批次详情列表
	TotalCount int           `json:"total_count"`    // 批次总数
	Offset     int           `json:"offset"`         // 分页页码
	Limit      int           `json:"limit"`          // 分页大小
}

type FavorUserCouponsRsp added in v1.5.55

type FavorUserCouponsRsp struct {
	Code     int               `json:"-"`
	SignInfo *SignInfo         `json:"-"`
	Response *FavorUserCoupons `json:"response,omitempty"`
	Error    string            `json:"-"`
}

根据商户号查用户的券 Rsp

type FixedNormalCoupon added in v1.5.55

type FixedNormalCoupon struct {
	CouponAmount       int `json:"coupon_amount"`       // 面额,单位:分
	TransactionMinimum int `json:"transaction_minimum"` // 使用券金额门槛,单位:分
}

type GoldPlanManage added in v1.5.65

type GoldPlanManage struct {
	SubMchid string `json:"sub_mchid"`
}

type GoldPlanManageRsp added in v1.5.65

type GoldPlanManageRsp struct {
	Code     int             `json:"-"`
	SignInfo *SignInfo       `json:"-"`
	Response *GoldPlanManage `json:"response,omitempty"`
	Error    string          `json:"-"`
}

点金计划管理 Rsp

type GoodsDetail

type GoodsDetail struct {
	GoodsId         string `json:"goods_id"`                    // 商品编码
	Quantity        int    `json:"quantity"`                    // 用户购买的数量
	UnitPrice       int    `json:"unit_price"`                  // 商品单价,单位为分
	DiscountAmount  int    `json:"discount_amount"`             // 商品优惠金额
	GoodsRemark     string `json:"goods_remark,omitempty"`      // 商品备注信息
	MerchantGoodsId string `json:"merchant_goods_id,omitempty"` // 商户侧商品编码,服务商模式下无此字段
}

type H5Rsp

type H5Rsp struct {
	Code     int       `json:"-"`
	SignInfo *SignInfo `json:"-"`
	Response *H5Url    `json:"response,omitempty"`
	Error    string    `json:"-"`
}

H5 支付Rsp

type H5Url

type H5Url struct {
	H5Url string `json:"h5_url"` // h5_url为拉起微信支付收银台的中间页面,可通过访问该url来拉起微信客户端,完成支付,h5_url的有效期为5分钟
}

type IncomeData added in v1.5.47

type IncomeData struct {
	Mchid             string `json:"mchid"`               // 微信支付分配的商户号
	AccountType       string `json:"account_type"`        // 需查询银行来账记录商户的账户类型:BASIC:基本账户,OPERATION:运营账户,FEES:手续费账户
	IncomeRecordType  string `json:"income_record_type"`  // 银行来账类型
	IncomeRecordId    string `json:"income_record_id"`    // 银行来账的微信单号
	Amount            int    `json:"amount"`              // 银行来账金额,单位为分,只能为整数
	SuccessTime       string `json:"success_time"`        // 银行来账完成时间
	BankName          string `json:"bank_name"`           // 银行来账的付款方银行名称,由于部分银行的数据获取限制,该字段有可能为空
	BankAccountName   string `json:"bank_account_name"`   // 银行来账的付款方银行账户信息,户名为全称、明文,由于部分银行的数据获取限制,该字段有可能为空
	BankAccountNumber string `json:"bank_account_number"` // 四位掩码+付款方银行卡尾号后四位
	RechargeRemark    string `json:"recharge_remark"`     // 银行备注
}

type JSAPIPayParams

type JSAPIPayParams struct {
	AppId     string `json:"appId"`
	TimeStamp string `json:"timeStamp"`
	NonceStr  string `json:"nonceStr"`
	Package   string `json:"package"`
	SignType  string `json:"signType"`
	PaySign   string `json:"paySign"`
}

type JSAPIScoreQuery added in v1.5.97

type JSAPIScoreQuery struct {
	MchId     string `json:"mch_id"`
	Package   string `json:"package"`
	TimeStamp string `json:"timestamp"`
	NonceStr  string `json:"nonce_str"`
	SignType  string `json:"sign_type"`
	Sign      string `json:"sign"`
}
type Link struct {
	Next string `json:"next"` // 下一页链接
	Prev string `json:"prev"` // 上一页链接
	Self string `json:"self"` // 当前链接
}

type Location

type Location struct {
	StartLocation string `json:"start_location,omitempty"` // 服务开始地点
	EndLocation   string `json:"end_location,omitempty"`   // 服务结束位置
}

type MarketMediaUpload added in v1.5.58

type MarketMediaUpload struct {
	MediaUrl string `json:"media_url"` // 微信返回的媒体文件URL地址
}

type MarketMediaUploadRsp added in v1.5.58

type MarketMediaUploadRsp struct {
	Code     int                `json:"-"`
	SignInfo *SignInfo          `json:"-"`
	Response *MarketMediaUpload `json:"response,omitempty"`
	Error    string             `json:"-"`
}

商户上传(营销专用)反馈图片 Rsp

type MediaUpload added in v1.5.43

type MediaUpload struct {
	MediaId string `json:"media_id"` // 微信返回的媒体文件标识Id。
}

type MediaUploadRsp added in v1.5.43

type MediaUploadRsp struct {
	Code     int          `json:"-"`
	SignInfo *SignInfo    `json:"-"`
	Response *MediaUpload `json:"response,omitempty"`
	Error    string       `json:"-"`
}

商户上传反馈图片 Rsp

type MerchantBalance added in v1.5.47

type MerchantBalance struct {
	AvailableAmount int `json:"available_amount"`         // 可用余额(单位:分),此余额可做提现操作
	PendingAmount   int `json:"pending_amount,omitempty"` // 不可用余额(单位:分)
}

type MerchantBalanceRsp added in v1.5.47

type MerchantBalanceRsp struct {
	Code     int              `json:"-"`
	SignInfo *SignInfo        `json:"-"`
	Response *MerchantBalance `json:"response,omitempty"`
	Error    string           `json:"-"`
}

查询账户实时余额 Rsp

type MerchantIncomeRecord added in v1.5.47

type MerchantIncomeRecord struct {
	Data       []*IncomeData `json:"data,omitempty"` // 单次查询返回的银行来账记录列表结果数组,如果查询结果为空时,则为空数组
	Links      *Link         `json:"links"`          // 返回前后页和当前页面的访问链接
	Offset     int           `json:"offset"`         // 该次请求资源的起始位置,请求中包含偏移量时应答消息返回相同偏移量,否则返回默认值0
	Limit      int           `json:"limit"`          // 经过条件筛选,本次查询到的银行来账记录条数
	TotalCount int           `json:"total_count"`    // 经过条件筛选,查询到的银行来账记录总数
}

type MerchantIncomeRecordRsp added in v1.5.47

type MerchantIncomeRecordRsp struct {
	Code     int                   `json:"-"`
	SignInfo *SignInfo             `json:"-"`
	Response *MerchantIncomeRecord `json:"response,omitempty"`
	Error    string                `json:"-"`
}

商户银行来账查询 Rsp

type MiniProgramsInfo added in v1.5.55

type MiniProgramsInfo struct {
	MiniProgramsAppid string `json:"mini_programs_appid"` // 商家小程序appid
	MiniProgramsPath  string `json:"mini_programs_path"`  // 商家小程序path
	EntranceWords     string `json:"entrance_words"`      // 入口文案
	GuidingWords      string `json:"guiding_words"`       // 引导文案
}

type Native

type Native struct {
	CodeUrl string `json:"code_url"` // 此URL用于生成支付二维码,然后提供给用户扫码支付
}

type NativeRsp

type NativeRsp struct {
	Code     int       `json:"-"`
	SignInfo *SignInfo `json:"-"`
	Response *Native   `json:"response,omitempty"`
	Error    string    `json:"-"`
}

Native 支付Rsp

type NormalCouponInformation added in v1.5.55

type NormalCouponInformation struct {
	CouponAmount       int `json:"coupon_amount"`       // 面额,单位:分
	TransactionMinimum int `json:"transaction_minimum"` // 使用券金额门槛,单位:分
}

type NotifyConfig added in v1.5.55

type NotifyConfig struct {
	NotifyAppid string `json:"notify_appid"` // 事件通知appid
}

type Objective added in v1.5.46

type Objective struct {
	ObjectiveId                string                       `json:"objective_id"`                           // 由先享卡平台生成,唯一标识一个先享卡目标。商户需要记录该目标Id,进行同步用户记录
	Name                       string                       `json:"name"`                                   // 目标的名称
	Count                      int                          `json:"count"`                                  // 履约目标需要完成的数量,必须大于0
	Unit                       string                       `json:"unit"`                                   // 目标的单位
	Description                string                       `json:"description"`                            // 对先享卡目标的补充信息
	ObjectiveCompletionRecords []*ObjectiveCompletionRecord `json:"objective_completion_records,omitempty"` // 用户完成的目标明细列表
}

type ObjectiveCompletionRecord added in v1.5.46

type ObjectiveCompletionRecord struct {
	ObjectiveCompletionSerialNo string `json:"objective_completion_serial_no"` // 目标完成流水号
	ObjectiveId                 string `json:"objective_id"`                   // 微信先享卡为每个先享卡目标分配的唯一Id
	CompletionTime              string `json:"completion_time"`                // 用户履约行为发生的时间
	CompletionType              string `json:"completion_type"`                // 目标完成类型: INCREASE:增加数量,DECREASE:减少数量
	Description                 string `json:"description"`                    // 用户本次履约的描述
	CompletionCount             int    `json:"completion_count"`               // 用户本次履约的数量,必须大于0
	Remark                      string `json:"remark,omitempty"`               // 对于用户履约情况的一些补充信息
}

type OrderNoType

type OrderNoType uint8

微信支付分订单类型:1-微信订单号,2-商户订单号,3-微信侧回跳到商户前端时用于查单的单据查询id(查询支付分订单中会使用)

type ParkingInfo added in v1.5.90

type ParkingInfo struct {
	ParkingId        string `json:"parking_id"`        // 停车入场id
	PlateNumber      string `json:"plate_number"`      // 车牌号,仅包括省份+车牌,不包括特殊字符。
	PlateColor       string `json:"plate_color"`       // 车牌颜色,BLUE:蓝色,GREEN:绿色,YELLOW:黄色,BLACK:黑色,WHITE:白色,LIMEGREEN:黄绿色
	StartTime        string `json:"start_time"`        // 入场时间
	EndTime          string `json:"end_time"`          // 出场时间
	ParkingName      string `json:"parking_name"`      // 所在停车位车场的名称
	ChargingDuration int    `json:"charging_duration"` // 计费的时间长,单位为秒
	DeviceId         string `json:"device_id"`         // 停车场设备id
}

type Partner added in v1.5.58

type Partner struct {
	Appid      string `json:"appid"`       // 合作方APPID
	Type       string `json:"type"`        // 合作方类别
	MerchantId string `json:"merchant_id"` // 合作方商户Id
}

type PartnerIncomeData added in v1.5.58

type PartnerIncomeData struct {
	SubMchid          string `json:"sub_mchid"`           // 特约商户号
	AccountType       string `json:"account_type"`        // 需查询银行来账记录商户的账户类型:BASIC:基本账户,OPERATION:运营账户,FEES:手续费账户
	IncomeRecordType  string `json:"income_record_type"`  // 银行来账类型
	IncomeRecordId    string `json:"income_record_id"`    // 银行来账的微信单号
	Amount            int    `json:"amount"`              // 银行来账金额,单位为分,只能为整数
	SuccessTime       string `json:"success_time"`        // 银行来账完成时间
	BankName          string `json:"bank_name"`           // 银行来账的付款方银行名称,由于部分银行的数据获取限制,该字段有可能为空
	BankAccountName   string `json:"bank_account_name"`   // 银行来账的付款方银行账户信息,户名为全称、明文,由于部分银行的数据获取限制,该字段有可能为空
	BankAccountNumber string `json:"bank_account_number"` // 四位掩码+付款方银行卡尾号后四位
	RechargeRemark    string `json:"recharge_remark"`     // 银行备注
}

type PartnerIncomeRecord added in v1.5.58

type PartnerIncomeRecord struct {
	Data       []*PartnerIncomeData `json:"data,omitempty"` // 单次查询返回的银行来账记录列表结果数组,如果查询结果为空时,则为空数组
	Links      *Link                `json:"links"`          // 返回前后页和当前页面的访问链接
	Offset     int                  `json:"offset"`         // 该次请求资源的起始位置,请求中包含偏移量时应答消息返回相同偏移量,否则返回默认值0
	Limit      int                  `json:"limit"`          // 经过条件筛选,本次查询到的银行来账记录条数
	TotalCount int                  `json:"total_count"`    // 经过条件筛选,查询到的银行来账记录总数
}

type PartnerIncomeRecordRsp added in v1.5.58

type PartnerIncomeRecordRsp struct {
	Code     int                  `json:"-"`
	SignInfo *SignInfo            `json:"-"`
	Response *PartnerIncomeRecord `json:"response,omitempty"`
	Error    string               `json:"-"`
}

特约商户银行来账查询 Rsp

type PartnerPayer

type PartnerPayer struct {
	SpOpenid  string `json:"sp_openid"`  // 用户在服务商appid下的唯一标识。
	SubOpenid string `json:"sub_openid"` // 用户在子商户appid下的唯一标识。 如果返回sub_appid,那么sub_openid一定会返回。
}

type PartnerQueryOrder

type PartnerQueryOrder struct {
	SpAppid         string             `json:"sp_appid"`                   // 服务商申请的公众号或移动应用appid。
	SpMchid         string             `json:"sp_mchid"`                   // 服务商户号,由微信支付生成并下发
	SubAppid        string             `json:"sub_appid"`                  // 子商户申请的公众号或移动应用appid。如果返回sub_appid,那么sub_openid一定会返回。
	SubMchid        string             `json:"sub_mchid"`                  // 子商户的商户号,有微信支付生成并下发。
	OutTradeNo      string             `json:"out_trade_no"`               // 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一
	TransactionId   string             `json:"transaction_id"`             // 微信支付系统生成的订单号
	TradeType       string             `json:"trade_type"`                 // 交易类型,枚举值:JSAPI:公众号支付, NATIVE:扫码支付, APP:APP支付, MICROPAY:付款码支付, MWEB:H5支付, FACEPAY:刷脸支付
	TradeState      string             `json:"trade_state"`                // 交易状态,枚举值:SUCCESS:支付成功, REFUND:转入退款, NOTPAY:未支付, CLOSED:已关闭, REVOKED:已撤销(付款码支付), USERPAYING:用户支付中(付款码支付), PAYERROR:支付失败(其他原因,如银行返回失败)
	TradeStateDesc  string             `json:"trade_state_desc"`           // 交易状态描述
	BankType        string             `json:"bank_type,omitempty"`        // 银行类型,采用字符串类型的银行标识
	Attach          string             `json:"attach"`                     // 附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用
	SuccessTime     string             `json:"success_time,omitempty"`     // 支付完成时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒
	Payer           *PartnerPayer      `json:"payer"`                      // 支付者信息
	Amount          *Amount            `json:"amount,omitempty"`           // 订单金额信息,当支付成功时返回该字段
	SceneInfo       *SceneInfo         `json:"scene_info,omitempty"`       // 支付场景描述
	PromotionDetail []*PromotionDetail `json:"promotion_detail,omitempty"` // 优惠功能,享受优惠时返回该字段
}

type PartnerQueryOrderRsp

type PartnerQueryOrderRsp struct {
	Code     int                `json:"-"`
	SignInfo *SignInfo          `json:"-"`
	Response *PartnerQueryOrder `json:"response,omitempty"`
	Error    string             `json:"-"`
}

服务商查询订单 Rsp

type PartnerTransferDetail added in v1.5.67

type PartnerTransferDetail struct {
	SpMchid        string `json:"sp_mchid"`              // 微信支付分配的服务商商户号
	OutBatchNo     string `json:"out_batch_no"`          // 商户系统内部的商家批次单号
	BatchId        string `json:"batch_id"`              // 微信批次单号,微信商家转账系统返回的唯一标识
	Appid          string `json:"appid"`                 // 申请商户号的appid或商户号绑定的appid(企业号corpid即为此appid)
	OutDetailNo    string `json:"out_detail_no"`         // 商家明细单号
	DetailId       string `json:"detail_id"`             // 微信明细单号
	DetailStatus   string `json:"detail_status"`         // 明细状态:PROCESSING:转账中,SUCCESS:转账成功,FAIL:转账失败
	TransferAmount int    `json:"transfer_amount"`       // 转账金额单位为分
	TransferRemark string `json:"transfer_remark"`       // 单条转账备注(微信用户会收到该备注),UTF8编码,最多允许32个字符
	FailReason     string `json:"fail_reason,omitempty"` // 如果转账失败则有失败原因
	Openid         string `json:"openid"`                // 用户在直连商户appid下的唯一标识
	Username       string `json:"username"`              // 收款方姓名(加密)
	InitiateTime   string `json:"initiate_time"`         // 转账发起的时间
	UpdateTime     string `json:"update_time"`           // 明细最后一次状态变更的时间
}

type PartnerTransferDetailRsp added in v1.5.67

type PartnerTransferDetailRsp struct {
	Code     int                    `json:"-"`
	SignInfo *SignInfo              `json:"-"`
	Response *PartnerTransferDetail `json:"response,omitempty"`
	Error    string                 `json:"-"`
}

微信明细单号查询明细单(服务商) Rsp

type PartnerTransferMerchantDetail added in v1.5.67

type PartnerTransferMerchantDetail struct {
	SpMchid        string `json:"sp_mchid"`              // 微信支付分配的服务商商户号
	OutBatchNo     string `json:"out_batch_no"`          // 商户系统内部的商家批次单号
	BatchId        string `json:"batch_id"`              // 微信批次单号,微信商家转账系统返回的唯一标识
	Appid          string `json:"appid"`                 // 申请商户号的appid或商户号绑定的appid(企业号corpid即为此appid)
	OutDetailNo    string `json:"out_detail_no"`         // 商家明细单号
	DetailId       string `json:"detail_id"`             // 微信明细单号
	DetailStatus   string `json:"detail_status"`         // 明细状态:PROCESSING:转账中,SUCCESS:转账成功,FAIL:转账失败
	TransferAmount int    `json:"transfer_amount"`       // 转账金额单位为分
	TransferRemark string `json:"transfer_remark"`       // 单条转账备注(微信用户会收到该备注),UTF8编码,最多允许32个字符
	FailReason     string `json:"fail_reason,omitempty"` // 如果转账失败则有失败原因
	Openid         string `json:"openid"`                // 用户在直连商户appid下的唯一标识
	Username       string `json:"username"`              // 收款方姓名(加密)
	InitiateTime   string `json:"initiate_time"`         // 转账发起的时间
	UpdateTime     string `json:"update_time"`           // 明细最后一次状态变更的时间
}

type PartnerTransferMerchantDetailRsp added in v1.5.67

type PartnerTransferMerchantDetailRsp struct {
	Code     int                            `json:"-"`
	SignInfo *SignInfo                      `json:"-"`
	Response *PartnerTransferMerchantDetail `json:"response,omitempty"`
	Error    string                         `json:"-"`
}

商家明细单号查询明细单(服务商) Rsp

type PartnerTransferMerchantQuery added in v1.5.67

type PartnerTransferMerchantQuery struct {
	SpMchid            string            `json:"sp_mchid"`                       // 微信支付分配的服务商商户号
	SubMchid           string            `json:"sub_mchid"`                      // 微信支付分配的特约商户号
	OutBatchNo         string            `json:"out_batch_no"`                   // 商户系统内部的商家批次单号
	BatchId            string            `json:"batch_id"`                       // 微信批次单号,微信商家转账系统返回的唯一标识
	SpAppid            string            `json:"sp_appid,omitempty"`             // 微信分配的服务商商户公众账号Id,特约商户授权类型为FUND_AUTHORIZATION_TYPE时才有该字段
	SubAppid           string            `json:"sub_appid"`                      // 微信分配的特约商户公众账号Id。特约商户appid
	BatchStatus        string            `json:"batch_status"`                   // 批次状态
	BatchType          string            `json:"batch_type"`                     // 批次类型
	AuthorizationType  string            `json:"authorization_type"`             // 特约商户授权类型
	BatchName          string            `json:"batch_name"`                     // 该笔批量转账的名称
	BatchRemark        string            `json:"batch_remark"`                   // 转账说明,UTF8编码,最多允许32个字符
	CloseReason        string            `json:"close_reason,omitempty"`         // 如果批次单状态为“CLOSED”(已关闭),则有关闭原因
	TotalAmount        int               `json:"total_amount"`                   // 转账金额单位为分
	TotalNum           int               `json:"total_num"`                      // 一个转账批次单最多发起三千笔转账
	CreateTime         string            `json:"create_time,omitempty"`          // 批次受理成功时返回
	UpdateTime         string            `json:"update_time,omitempty"`          // 批次最近一次状态变更的时间
	SuccessAmount      int               `json:"success_amount,omitempty"`       // 转账成功的金额,单位为分
	SuccessNum         int               `json:"success_num,omitempty"`          // 转账成功的笔数
	FailAmount         int               `json:"fail_amount,omitempty"`          // 转账失败的金额,单位为分
	FailNum            int               `json:"fail_num,omitempty"`             // 转账失败的笔数
	TransferPurpose    string            `json:"transfer_purpose"`               // 批量转账用途
	TransferDetailList []*TransferDetail `json:"transfer_detail_list,omitempty"` // 当批次状态为“FINISHED”(已完成),且成功查询到转账明细单时返回
}

type PartnerTransferMerchantQueryRsp added in v1.5.67

type PartnerTransferMerchantQueryRsp struct {
	Code     int                           `json:"-"`
	SignInfo *SignInfo                     `json:"-"`
	Response *PartnerTransferMerchantQuery `json:"response,omitempty"`
	Error    string                        `json:"-"`
}

商家批次单号查询批次单(服务商) Rsp

type PartnerTransferQuery added in v1.5.67

type PartnerTransferQuery struct {
	SpMchid            string            `json:"sp_mchid"`                       // 微信支付分配的服务商商户号
	SubMchid           string            `json:"sub_mchid"`                      // 微信支付分配的特约商户号
	OutBatchNo         string            `json:"out_batch_no"`                   // 商户系统内部的商家批次单号
	BatchId            string            `json:"batch_id"`                       // 微信批次单号,微信商家转账系统返回的唯一标识
	SpAppid            string            `json:"sp_appid,omitempty"`             // 微信分配的服务商商户公众账号Id,特约商户授权类型为FUND_AUTHORIZATION_TYPE时才有该字段
	SubAppid           string            `json:"sub_appid"`                      // 微信分配的特约商户公众账号Id。特约商户appid
	BatchStatus        string            `json:"batch_status"`                   // 批次状态
	BatchType          string            `json:"batch_type"`                     // 批次类型
	AuthorizationType  string            `json:"authorization_type"`             // 特约商户授权类型
	BatchName          string            `json:"batch_name"`                     // 该笔批量转账的名称
	BatchRemark        string            `json:"batch_remark"`                   // 转账说明,UTF8编码,最多允许32个字符
	CloseReason        string            `json:"close_reason,omitempty"`         // 如果批次单状态为“CLOSED”(已关闭),则有关闭原因
	TotalAmount        int               `json:"total_amount"`                   // 转账金额单位为分
	TotalNum           int               `json:"total_num"`                      // 一个转账批次单最多发起三千笔转账
	CreateTime         string            `json:"create_time,omitempty"`          // 批次受理成功时返回
	UpdateTime         string            `json:"update_time,omitempty"`          // 批次最近一次状态变更的时间
	SuccessAmount      int               `json:"success_amount,omitempty"`       // 转账成功的金额,单位为分
	SuccessNum         int               `json:"success_num,omitempty"`          // 转账成功的笔数
	FailAmount         int               `json:"fail_amount,omitempty"`          // 转账失败的金额,单位为分
	FailNum            int               `json:"fail_num,omitempty"`             // 转账失败的笔数
	TransferPurpose    string            `json:"transfer_purpose"`               // 批量转账用途
	TransferDetailList []*TransferDetail `json:"transfer_detail_list,omitempty"` // 当批次状态为“FINISHED”(已完成),且成功查询到转账明细单时返回
}

type PartnerTransferQueryRsp added in v1.5.67

type PartnerTransferQueryRsp struct {
	Code     int                   `json:"-"`
	SignInfo *SignInfo             `json:"-"`
	Response *PartnerTransferQuery `json:"response,omitempty"`
	Error    string                `json:"-"`
}

微信批次单号查询批次单(服务商) Rsp

type Partnerships added in v1.5.58

type Partnerships struct {
	Partner        *Partner        `json:"partner"`         // 合作方相关的信息
	AuthorizedData *AuthorizedData `json:"authorized_data"` // 被授权的数据
	BuildTime      string          `json:"build_time"`      // 建立合作关系时间
	TerminateTime  string          `json:"terminate_time"`  // 终止合作关系时间
	CreateTime     string          `json:"create_time"`     // 创建时间
	UpdateTime     string          `json:"update_time"`     // 更新时间
}

type PartnershipsBuild added in v1.5.58

type PartnershipsBuild struct {
	Partner        *Partner        `json:"partner"`         // 合作方相关的信息
	AuthorizedData *AuthorizedData `json:"authorized_data"` // 被授权的数据
	State          string          `json:"state"`           // 合作状态,ESTABLISHED:已建立,TERMINATED:已终止
	BuildTime      string          `json:"build_time"`      // 建立合作关系时间
	CreateTime     string          `json:"create_time"`     // 创建时间
	UpdateTime     string          `json:"update_time"`     // 更新时间
}

type PartnershipsBuildRsp added in v1.5.58

type PartnershipsBuildRsp struct {
	Code     int                `json:"-"`
	SignInfo *SignInfo          `json:"-"`
	Response *PartnershipsBuild `json:"response,omitempty"`
	Error    string             `json:"-"`
}

建立合作关系 Rsp

type PartnershipsList added in v1.5.58

type PartnershipsList struct {
	Data       []*Partnerships `json:"data,omitempty"` // 合作关系结果集
	TotalCount int             `json:"total_count"`    // 批次总数
	Offset     int             `json:"offset"`         // 分页页码
	Limit      int             `json:"limit"`          // 分页大小
}

type PartnershipsListRsp added in v1.5.58

type PartnershipsListRsp struct {
	Code     int               `json:"-"`
	SignInfo *SignInfo         `json:"-"`
	Response *PartnershipsList `json:"response,omitempty"`
	Error    string            `json:"-"`
}

查询合作关系列表 Rsp

type PartnershipsTerminate added in v1.5.58

type PartnershipsTerminate struct {
	TerminateTime string `json:"terminate_time"` // 终止合作关系时间
}

type PartnershipsTerminateRsp added in v1.5.58

type PartnershipsTerminateRsp struct {
	Code     int                    `json:"-"`
	SignInfo *SignInfo              `json:"-"`
	Response *PartnershipsTerminate `json:"response,omitempty"`
	Error    string                 `json:"-"`
}

终止合作关系 Rsp

type PayInformation added in v1.5.46

type PayInformation struct {
	PayAmount     int    `json:"pay_amount"`               // 用户需要退回优惠而付款的金额,单位为:分
	PayState      string `json:"pay_state"`                // 用户付款状态:PAYING:付款中,PAID:已付款
	TransactionId string `json:"transaction_id,omitempty"` // 微信支付订单号,仅在订单成功收款时才返回
	PayTime       string `json:"pay_time,omitempty"`       // 用户成功支付的时间,仅在订单成功收款时才返回
}

type Payer

type Payer struct {
	Openid    string `json:"openid"`               // 用户在直连商户appid下的唯一标识
	SubOpenid string `json:"sub_openid,omitempty"` // 用户在sub_appid下的标识
}

type PlatformCert

type PlatformCert struct {
	Data []*CertData `json:"data"`
}

type PlatformCertItem

type PlatformCertItem struct {
	EffectiveTime string `json:"effective_time"`
	ExpireTime    string `json:"expire_time"`
	PublicKey     string `json:"public_key"`
	SerialNo      string `json:"serial_no"`
}

type PlatformCertRsp

type PlatformCertRsp struct {
	Code  int                 `json:"-"`
	Certs []*PlatformCertItem `json:"certs"`
	Error string              `json:"-"`
}

func GetPlatformCerts added in v1.5.49

func GetPlatformCerts(ctx context.Context, mchid, apiV3Key, serialNo, privateKey string, certType ...CertType) (certs *PlatformCertRsp, err error)

获取平台RSA证书列表(获取后自行保存使用,如需定期刷新功能,自行实现) 注意事项 如果自行实现验证平台签名逻辑的话,需要注意以下事项: - 程序实现定期更新平台证书的逻辑,不要硬编码验证应答消息签名的平台证书 - 定期调用该接口,间隔时间小于12小时 - 加密请求消息中的敏感信息时,使用最新的平台证书(即:证书启用时间较晚的证书) 文档说明:https://pay.weixin.qq.com/wiki/doc/apiv3/apis/wechatpay5_1.shtml

func GetPlatformRSACerts added in v1.5.90

func GetPlatformRSACerts(ctx context.Context, mchid, apiV3Key, serialNo, privateKey string) (certs *PlatformCertRsp, err error)

获取平台RSA证书列表

func GetPlatformSM2Certs added in v1.5.90

func GetPlatformSM2Certs(ctx context.Context, mchid, apiV3Key, serialNo, privateKey string) (certs *PlatformCertRsp, err error)

获取国密平台证书

type PostDiscounts

type PostDiscounts struct {
	Name        string `json:"name"`        // 优惠名称说明。
	Description string `json:"description"` // 优惠使用条件说明。
	Amount      int    `json:"amount"`      // 优惠金额,只能为整数
	Count       int    `json:"count"`       // 优惠的数量。
}

type PostPayments

type PostPayments struct {
	Name        string `json:"name"`        // 付费项目名称
	Amount      int    `json:"amount"`      // 此付费项目总金额,大于等于0,单位为分,等于0时代表不需要扣费,只能为整数
	Description string `json:"description"` // 描述计费规则,不超过30个字符,超出报错处理。
	Count       int    `json:"count"`       // 付费项目的数量。
}

type Prepay

type Prepay struct {
	PrepayId string `json:"prepay_id"` // 预支付交易会话标识。用于后续接口调用中使用,该值有效期为2小时
}

type PrepayRsp

type PrepayRsp struct {
	Code     int       `json:"-"`
	SignInfo *SignInfo `json:"-"`
	Response *Prepay   `json:"response,omitempty"`
	Error    string    `json:"-"`
}

Prepay 支付Rsp

type ProfitShareAddReceiver

type ProfitShareAddReceiver struct {
	SubMchid       string `json:"sub_mchid,omitempty"`       // 子商户号,分账回退的接收商户,对应原分账出资的分账方商户【服务商模式】
	Type           string `json:"type"`                      // 分账接收方类型MERCHANT_ID:商户ID,PERSONAL_OPENID:个人openid(由父商户APPID转换得到)
	Account        string `json:"account"`                   // 分账接收方帐号
	Name           string `json:"name,omitempty"`            // 分账接收方类型是MERCHANT_ID时,是商户全称(必传),当商户是小微商户或个体户时,是开户人姓名 分账接收方类型是PERSONAL_OPENID时,是个人姓名(选传,传则校验)
	RelationType   string `json:"relation_type"`             // 商户与接收方的关系。STORE:门店STAFF:员工	STORE_OWNER:店主	PARTNER:合作伙伴	HEADQUARTER:总部	BRAND:品牌方	DISTRIBUTOR:分销商	USER:用户	SUPPLIER: 供应商	CUSTOM:自定义
	CustomRelation string `json:"custom_relation,omitempty"` // 子商户与接收方具体的关系,本字段最多10个字。当字段relation_type的值为CUSTOM时,本字段必填;当字段relation_type的值不为CUSTOM时,本字段无需填写。
}

type ProfitShareAddReceiverRsp

type ProfitShareAddReceiverRsp struct {
	Code     int                     `json:"-"`
	SignInfo *SignInfo               `json:"-"`
	Response *ProfitShareAddReceiver `json:"response,omitempty"`
	Error    string                  `json:"-"`
}

添加分账接收方 Rsp

type ProfitShareBills added in v1.5.56

type ProfitShareBills struct {
	DownloadUrl string `json:"download_url"` // 下载地址	原始账单(gzip需要解压缩)的摘要值,用于校验文件的完整性。
	HashType    string `json:"hash_type"`    // 哈希类型 原始账单(gzip需要解压缩)的摘要算法,用于校验文件的完整性
	HashValue   string `json:"hash_value"`   // 哈希值	供下一步请求账单文件的下载地址,该地址30s内有效。
}

type ProfitShareBillsRsp added in v1.5.56

type ProfitShareBillsRsp struct {
	Code     int               `json:"-"`
	SignInfo *SignInfo         `json:"-"`
	Response *ProfitShareBills `json:"response,omitempty"`
	Error    string            `json:"-"`
}

申请分账账单 Rsp

type ProfitShareDeleteReceiver

type ProfitShareDeleteReceiver struct {
	SubMchid string `json:"sub_mchid,omitempty"` // 子商户号,分账回退的接收商户,对应原分账出资的分账方商户【服务商模式】
	Type     string `json:"type"`                // 分账接收方类型MERCHANT_ID:商户ID,PERSONAL_OPENID:个人openid(由父商户APPID转换得到)
	Account  string `json:"account"`             // 分账接收方帐号
}

type ProfitShareDeleteReceiverRsp

type ProfitShareDeleteReceiverRsp struct {
	Code     int                        `json:"-"`
	SignInfo *SignInfo                  `json:"-"`
	Response *ProfitShareDeleteReceiver `json:"response,omitempty"`
	Error    string                     `json:"-"`
}

删除分账接收方 Rsp

type ProfitShareMerchantConfigs added in v1.5.55

type ProfitShareMerchantConfigs struct {
	SubMchId string `json:"sub_mchid"` // 子商户号
	MaxRatio int    `json:"max_ratio"` // 最大分账比例 (单位万分比,比如2000表示20%)
}

type ProfitShareMerchantConfigsRsp added in v1.5.55

type ProfitShareMerchantConfigsRsp struct {
	Code     int                         `json:"-"`
	SignInfo *SignInfo                   `json:"-"`
	Response *ProfitShareMerchantConfigs `json:"response,omitempty"`
	Error    string                      `json:"-"`
}

type ProfitShareOrder

type ProfitShareOrder struct {
	SubMchid      string                   `json:"sub_mchid"`           // 二级商户号
	TransactionId string                   `json:"transaction_id"`      // 微信订单号
	OutOrderNo    string                   `json:"out_order_no"`        // 商户分账单号
	OrderId       string                   `json:"order_id"`            // 微信分账单号
	State         string                   `json:"state"`               // 分账单状态(每个接收方的分账结果请查看receivers中的result字段):PROCESSING:处理中,FINISHED:分账完成
	Receivers     []*ProfitSharingReceiver `json:"receivers,omitempty"` // 分账接收方列表
}

type ProfitShareOrderQuery

type ProfitShareOrderQuery struct {
	SubMchid      string                   `json:"sub_mchid,omitempty"` // 子商户号,即分账的出资商户号【服务商模式】
	TransactionId string                   `json:"transaction_id"`      // 微信订单号
	OutOrderNo    string                   `json:"out_order_no"`        // 商户分账单号
	OrderId       string                   `json:"order_id"`            // 微信分账单号
	State         string                   `json:"state"`               // 分账单状态(每个接收方的分账结果请查看receivers中的result字段):PROCESSING:处理中,FINISHED:分账完成
	Receivers     []*ProfitSharingReceiver `json:"receivers,omitempty"` // 分账接收方列表
}

type ProfitShareOrderQueryRsp

type ProfitShareOrderQueryRsp struct {
	Code     int                    `json:"-"`
	SignInfo *SignInfo              `json:"-"`
	Response *ProfitShareOrderQuery `json:"response,omitempty"`
	Error    string                 `json:"-"`
}

查询分账结果 Rsp

type ProfitShareOrderRsp

type ProfitShareOrderRsp struct {
	Code     int               `json:"-"`
	SignInfo *SignInfo         `json:"-"`
	Response *ProfitShareOrder `json:"response,omitempty"`
	Error    string            `json:"-"`
}

请求分账 Rsp

type ProfitShareOrderUnfreeze

type ProfitShareOrderUnfreeze struct {
	SubMchid      string                   `json:"sub_mchid,omitempty"` // 子商户号,分账回退的接收商户,对应原分账出资的分账方商户【服务商模式】
	TransactionId string                   `json:"transaction_id"`      // 微信支付订单号
	OutOrderNo    string                   `json:"out_order_no"`        // 商户系统内部的分账单号,在商户系统内部唯一,同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@
	OrderId       string                   `json:"order_id"`            // 微信分账单号,微信系统返回的唯一标识
	State         string                   `json:"state"`               // 分账单状态(每个接收方的分账结果请查看receivers中的result字段):PROCESSING:处理中,FINISHED:分账完成
	Receivers     []*ProfitSharingReceiver `json:"receivers,omitempty"` // 分账接收方列表
}

type ProfitShareOrderUnfreezeRsp

type ProfitShareOrderUnfreezeRsp struct {
	Code     int                       `json:"-"`
	SignInfo *SignInfo                 `json:"-"`
	Response *ProfitShareOrderUnfreeze `json:"response,omitempty"`
	Error    string                    `json:"-"`
}

解冻剩余资金 Rsp

type ProfitShareReturn

type ProfitShareReturn struct {
	SubMchid    string `json:"sub_mchid"`             // 子商户号,分账回退的接收商户,对应原分账出资的分账方商户【服务商模式】
	OrderId     string `json:"order_id"`              // 微信分账单号,微信系统返回的唯一标识
	OutOrderNo  string `json:"out_order_no"`          // 商户系统内部的分账单号,在商户系统内部唯一,同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@
	OutReturnNo string `json:"out_return_no"`         // 此回退单号是商户在自己后台生成的一个新的回退单号,在商户后台唯一
	ReturnId    string `json:"return_id"`             // 微信分账回退单号,微信系统返回的唯一标识
	ReturnMchid string `json:"return_mchid"`          // 只能对原分账请求中成功分给商户接收方进行回退
	Amount      int    `json:"amount"`                // 需要从分账接收方回退的金额,单位为分,只能为整数
	Description string `json:"description"`           // 分账回退的原因描述
	Result      string `json:"result"`                // 回退结果: PROCESSING:处理中,SUCCESS:已成功,FAILED:已失败
	FailReason  string `json:"fail_reason,omitempty"` // 失败原因: ACCOUNT_ABNORMAL : 分账接收方账户异常,TIME_OUT_CLOSED : 超时关单
	CreateTime  string `json:"create_time"`           // 分账回退创建时间
	FinishTime  string `json:"finish_time"`           // 分账回退完成时间
}

type ProfitShareReturnResult

type ProfitShareReturnResult struct {
	SubMchid    string `json:"sub_mchid,omitempty"`   // 子商户号,分账回退的接收商户,对应原分账出资的分账方商户【服务商模式】
	OrderId     string `json:"order_id"`              // 微信分账单号,微信系统返回的唯一标识
	OutOrderNo  string `json:"out_order_no"`          // 商户系统内部的分账单号,在商户系统内部唯一,同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@
	OutReturnNo string `json:"out_return_no"`         // 此回退单号是商户在自己后台生成的一个新的回退单号,在商户后台唯一
	ReturnId    string `json:"return_id"`             // 微信分账回退单号,微信系统返回的唯一标识
	ReturnMchid string `json:"return_mchid"`          // 只能对原分账请求中成功分给商户接收方进行回退
	Amount      int    `json:"amount"`                // 需要从分账接收方回退的金额,单位为分,只能为整数
	Description string `json:"description"`           // 分账回退的原因描述
	Result      string `json:"result"`                // 回退结果: PROCESSING:处理中,SUCCESS:已成功,FAILED:已失败
	FailReason  string `json:"fail_reason,omitempty"` // 失败原因: ACCOUNT_ABNORMAL : 分账接收方账户异常,TIME_OUT_CLOSED : 超时关单
	CreateTime  string `json:"create_time"`           // 分账回退创建时间
	FinishTime  string `json:"finish_time"`           // 分账回退完成时间
}

type ProfitShareReturnResultRsp

type ProfitShareReturnResultRsp struct {
	Code     int                      `json:"-"`
	SignInfo *SignInfo                `json:"-"`
	Response *ProfitShareReturnResult `json:"response,omitempty"`
	Error    string                   `json:"-"`
}

请求分账回退 Rsp

type ProfitShareReturnRsp

type ProfitShareReturnRsp struct {
	Code     int                `json:"-"`
	SignInfo *SignInfo          `json:"-"`
	Response *ProfitShareReturn `json:"response,omitempty"`
	Error    string             `json:"-"`
}

请求分账回退 Rsp

type ProfitShareUnsplitAmount

type ProfitShareUnsplitAmount struct {
	TransactionId string `json:"transaction_id"` // 微信支付订单号
	UnsplitAmount int    `json:"unsplit_amount"` // 订单剩余待分金额,整数,单位为分
}

type ProfitShareUnsplitAmountRsp

type ProfitShareUnsplitAmountRsp struct {
	Code     int                       `json:"-"`
	SignInfo *SignInfo                 `json:"-"`
	Response *ProfitShareUnsplitAmount `json:"response,omitempty"`
	Error    string                    `json:"-"`
}

查询剩余待分金额 Rsp

type ProfitSharingReceiver

type ProfitSharingReceiver struct {
	Amount      int    `json:"amount"`      // 分账金额
	Description string `json:"description"` // 分账描述
	Type        string `json:"type"`        // 分账接收方类型
	Account     string `json:"account"`     // 分账接收方帐号
	Result      string `json:"result"`      // 分账结果,PENDING:待分账,SUCCESS:分账成功,CLOSED:已关闭
	FailReason  string `json:"fail_reason"` // 分账失败原因ACCOUNT_ABNORMAL : 分账接收账户异常、NO_RELATION : 分账关系已解除、RECEIVER_HIGH_RISK : 高风险接收方、RECEIVER_REAL_NAME_NOT_VERIFIED : 接收方未实名、NO_AUTH : 分账权限已解除
	CreateTime  string `json:"create_time"` // 分账创建时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss.sss+TIMEZONE
	FinishTime  string `json:"finish_time"` // 分账完成时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss.sss+TIMEZONE
	DetailId    string `json:"detail_id"`   // 分账明细单号, 微信分账明细单号,每笔分账业务执行的明细单号,可与资金账单对账使用
}

分账接收方

type PromotionDetail

type PromotionDetail struct {
	Amount              int            `json:"amount"`                         // 优惠券面额
	CouponId            string         `json:"coupon_id"`                      // 券Id
	Name                string         `json:"name,omitempty"`                 // 优惠名称
	Scope               string         `json:"scope,omitempty"`                // 优惠范围:GLOBAL:全场代金券, SINGLE:单品优惠
	Type                string         `json:"type,omitempty"`                 // 优惠类型:CASH:充值, NOCASH:预充值
	StockId             string         `json:"stock_id,omitempty"`             // 活动Id
	WechatpayContribute int            `json:"wechatpay_contribute,omitempty"` // 微信出资,单位为分
	MerchantContribute  int            `json:"merchant_contribute,omitempty"`  // 商户出资,单位为分
	OtherContribute     int            `json:"other_contribute,omitempty"`     // 其他出资,单位为分
	Currency            string         `json:"currency,omitempty"`             // CNY:人民币,境内商户号仅支持人民币
	GoodsDetail         []*GoodsDetail `json:"goods_detail,omitempty"`         // 单品列表信息
}

type PromotionDetailItem added in v1.5.68

type PromotionDetailItem struct {
	PromotionId  string `json:"promotion_id"`  // 券Id,券或立减金额
	Scope        string `json:"scope"`         // 优惠范围,GLOBAL:全场代金券,SINGLE:单品优惠
	Type         string `json:"type"`          // 优惠类型,COUPON:代金券,DISCOUNT:优惠券
	Amount       int    `json:"amount"`        // 优惠券面额,用户享受优惠的金额(优惠券面额=微信出资金额+商家出资金额+其他出资方金额),单位为分
	RefundAmount int    `json:"refund_amount"` // 优惠退款金额,单位为分
}

type ProvinceInfo added in v1.5.71

type ProvinceInfo struct {
	ProvinceName string `json:"province_name"` // 省份名称
	ProvinceCode int    `json:"province_code"` // 省份编码
}

type QueryOrder

type QueryOrder struct {
	Appid           string             `json:"appid"`                      // 直连商户申请的公众号或移动应用appid
	Mchid           string             `json:"mchid"`                      // 直连商户的商户号,由微信支付生成并下发
	OutTradeNo      string             `json:"out_trade_no"`               // 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一
	TransactionId   string             `json:"transaction_id"`             // 微信支付系统生成的订单号
	TradeType       string             `json:"trade_type"`                 // 交易类型,枚举值:JSAPI:公众号支付, NATIVE:扫码支付, APP:APP支付, MICROPAY:付款码支付, MWEB:H5支付, FACEPAY:刷脸支付
	TradeState      string             `json:"trade_state"`                // 交易状态,枚举值:SUCCESS:支付成功, REFUND:转入退款, NOTPAY:未支付, CLOSED:已关闭, REVOKED:已撤销(付款码支付), USERPAYING:用户支付中(付款码支付), PAYERROR:支付失败(其他原因,如银行返回失败)
	TradeStateDesc  string             `json:"trade_state_desc"`           // 交易状态描述
	BankType        string             `json:"bank_type,omitempty"`        // 银行类型,采用字符串类型的银行标识
	Attach          string             `json:"attach"`                     // 附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用
	SuccessTime     string             `json:"success_time,omitempty"`     // 支付完成时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒
	Payer           *Payer             `json:"payer"`                      // 支付者信息
	Amount          *Amount            `json:"amount,omitempty"`           // 订单金额信息,当支付成功时返回该字段
	SceneInfo       *SceneInfo         `json:"scene_info,omitempty"`       // 支付场景描述
	PromotionDetail []*PromotionDetail `json:"promotion_detail,omitempty"` // 优惠功能,享受优惠时返回该字段
}

type QueryOrderRsp

type QueryOrderRsp struct {
	Code     int         `json:"-"`
	SignInfo *SignInfo   `json:"-"`
	Response *QueryOrder `json:"response,omitempty"`
	Error    string      `json:"-"`
}

查询订单 Rsp

type Receiver added in v1.5.56

type Receiver struct {
	Type        string `json:"type"`        // 分账接收方类型
	Account     string `json:"account"`     // 分账接收方账号
	Amount      int    `json:"amount"`      // 分账动账金额
	Description string `json:"description"` // 分账/回退描述
}

type RefundAmount

type RefundAmount struct {
	Total       int `json:"total,omitempty"`       // 订单总金额,单位为分,只能为整数
	Refund      int `json:"refund,omitempty"`      // 退款金额,币种的最小单位,只能为整数,不能超过原订单支付金额,如果有使用券,后台会按比例退
	PayerTotal  int `json:"payer_total,omitempty"` // 用户实际支付金额,单位为分,只能为整数
	PayerRefund int `json:"payer_refund"`          // 退款给用户的金额,不包含所有优惠券金额
}

type RefundOrderResponse

type RefundOrderResponse struct {
	RefundId            string                        `json:"refund_id"`             // 微信支付退款号
	OutRefundNo         string                        `json:"out_refund_no"`         // 商户退款单号
	TransactionId       string                        `json:"transaction_id"`        // 微信支付系统生成的订单号
	OutTradeNo          string                        `json:"out_trade_no"`          // 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一
	Channel             string                        `json:"channel"`               // 退款渠道
	UserReceivedAccount string                        `json:"user_received_account"` // 退款入账账户
	SuccessTime         string                        `json:"success_time"`          // 退款成功时间
	CreateTime          string                        `json:"create_time"`           // 退款创建时间
	Status              string                        `json:"status"`                // 退款状态
	FundsAccount        string                        `json:"funds_account"`         // 资金账户
	Amount              *RefundQueryAmount            `json:"amount"`                // 金额信息
	PromotionDetail     []*RefundQueryPromotionDetail `json:"promotion_detail"`      // 优惠退款信息
}

type RefundQueryAmount

type RefundQueryAmount struct {
	Total            int    `json:"total"`             // 订单总金额,单位为分
	Refund           int    `json:"refund"`            // 退款金额,币种的最小单位,只能为整数,不能超过原订单支付金额。
	PayerTotal       int    `json:"payer_total"`       // 用户支付金额,单位为分
	PayerRefund      int    `json:"payer_refund"`      // 用户退款金额,不包含所有优惠券金额
	SettlementRefund int    `json:"settlement_refund"` // 应结退款金额,去掉非充值代金券退款金额后的退款金额,单位为分
	DiscountRefund   int    `json:"discount_refund"`   // 优惠退款金额
	Currency         string `json:"currency"`          // CNY:人民币,境内商户号仅支持人民币
}

type RefundQueryGoodsDetail

type RefundQueryGoodsDetail struct {
	MerchantGoodsId  string `json:"merchant_goods_id"`            // 商户侧商品编码
	WechatpayGoodsId string `json:"wechatpay_goods_id,omitempty"` // 微信侧商品编码
	GoodsName        string `json:"goods_name,omitempty"`         // 商品名称
	UnitPrice        int    `json:"unit_price"`                   // 商品单价金额
	RefundAmount     int    `json:"refund_amount"`                // 商品退款金额
	RefundQuantity   int    `json:"refund_quantity"`              // 商品退货数量
}

type RefundQueryPromotionDetail

type RefundQueryPromotionDetail struct {
	PromotionId  string                    `json:"promotion_id"`           // 券Id,券或立减金额
	Scope        string                    `json:"scope"`                  // 优惠范围,GLOBAL:全场代金券,SINGLE:单品优惠
	Type         string                    `json:"type"`                   // 优惠类型,COUPON:代金券,DISCOUNT:优惠券
	Amount       int                       `json:"amount"`                 // 优惠券面额,用户享受优惠的金额(优惠券面额=微信出资金额+商家出资金额+其他出资方金额),单位为分
	RefundAmount int                       `json:"refund_amount"`          // 优惠退款金额,单位为分
	GoodsDetail  []*RefundQueryGoodsDetail `json:"goods_detail,omitempty"` // 商品列表,优惠商品发送退款时返回商品信息
}

type RefundQueryResponse

type RefundQueryResponse struct {
	RefundId            string                        `json:"refund_id"`             // 微信支付退款号
	OutRefundNo         string                        `json:"out_refund_no"`         // 商户退款单号
	TransactionId       string                        `json:"transaction_id"`        // 微信支付系统生成的订单号
	OutTradeNo          string                        `json:"out_trade_no"`          // 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一
	Channel             string                        `json:"channel"`               // 退款渠道
	UserReceivedAccount string                        `json:"user_received_account"` // 退款入账账户
	SuccessTime         string                        `json:"success_time"`          // 退款成功时间
	CreateTime          string                        `json:"create_time"`           // 退款创建时间
	Status              string                        `json:"status"`                // 退款状态
	FundsAccount        string                        `json:"funds_account"`         // 资金账户
	Amount              *RefundQueryAmount            `json:"amount"`                // 金额信息
	PromotionDetail     []*RefundQueryPromotionDetail `json:"promotion_detail"`      // 优惠退款信息
}

type RefundQueryRsp

type RefundQueryRsp struct {
	Code     int                  `json:"-"`
	SignInfo *SignInfo            `json:"-"`
	Response *RefundQueryResponse `json:"response,omitempty"`
	Error    string               `json:"-"`
}

退款查询 Rsp

type RefundRsp

type RefundRsp struct {
	Code     int                  `json:"-"`
	SignInfo *SignInfo            `json:"-"`
	Response *RefundOrderResponse `json:"response,omitempty"`
	Error    string               `json:"-"`
}

退款 Rsp

type Resource

type Resource struct {
	OriginalType   string `json:"original_type,omitempty"`
	Algorithm      string `json:"algorithm"`
	Ciphertext     string `json:"ciphertext"`
	AssociatedData string `json:"associated_data"`
	Nonce          string `json:"nonce"`
}

type Reward added in v1.5.46

type Reward struct {
	RewardId           string               `json:"reward_id"`                      // 由先享卡平台生成,唯一标识一个先享卡目标。商户需要记录该优惠Id,进行同步用户记录
	Name               string               `json:"name"`                           // 优惠名称
	CountType          string               `json:"count_type"`                     // 优惠数量的类型标识:COUNT_UNLIMITED:不限数量,COUNT_LIMIT:有限数量
	Count              int                  `json:"count"`                          // 本项优惠可使用的数量,必须大于0
	Unit               string               `json:"unit"`                           // 优惠的单位
	Amount             int                  `json:"amount"`                         // 优惠金额,此项优惠对应的优惠总金额,单位:分,必须大于0
	Description        string               `json:"description,omitempty"`          // 对先享卡优惠的补充信息
	RewardUsageRecords []*RewardUsageRecord `json:"reward_usage_records,omitempty"` // 优惠使用记录列表
}

type RewardUsageRecord added in v1.5.46

type RewardUsageRecord struct {
	RewardUsageSerialNo string `json:"reward_usage_serial_no"` // 优惠使用记录流水号
	RewardId            string `json:"reward_id"`              // 微信先享卡为每个先享卡优惠分配的唯一Id
	UsageTime           string `json:"usage_time"`             // 用户使用优惠的时间
	UsageType           string `json:"usage_type"`             // 目标完成类型:INCREASE:增加数量,DECREASE:减少数量
	Description         string `json:"description"`            // 用户获得奖励的描述
	UsageCount          int    `json:"usage_count"`            // 用户本次获得的奖励数量,必须大于0
	Amount              int    `json:"amount"`                 // 优惠金额,用户此项本次享受的优惠对应的优惠总金额,单位:分,必须大于0
	Remark              string `json:"remark,omitempty"`       // 对于用户奖励情况的一些补充信息
}

type RiskFund

type RiskFund struct {
	Name        string `json:"name"`                  // 风险金名称。DEPOSIT:押金,ADVANCE:预付款,CASH_DEPOSIT:保证金,ESTIMATE_ORDER_COST:预估订单费用
	Description string `json:"description,omitempty"` // 风险说明
	Amount      int    `json:"amount"`                // 风险金额
}

type SceneInfo

type SceneInfo struct {
	DeviceId string `json:"device_id,omitempty"` // 商户端设备号(发起扣款请求的商户服务器设备号)
}

type ScoreDirectComplete

type ScoreDirectComplete struct {
	Appid               string           `json:"appid"`                       // 调用接口提交的公众账号Id。
	Mchid               string           `json:"mchid"`                       // 调用接口提交的商户号。
	OutOrderNo          string           `json:"out_order_no"`                // 调用接口提交的商户服务订单号。
	ServiceId           string           `json:"service_id"`                  // 调用该接口提交的服务Id。
	OrderId             string           `json:"order_id"`                    // 微信支付服务订单号,每个微信支付服务订单号与商户号下对应的商户服务订单号一一对应。
	ServiceIntroduction string           `json:"service_introduction"`        // 服务信息,用于介绍本订单所提供的服务。
	State               string           `json:"state"`                       // 表示当前单据状态。枚举值:CREATED:商户已创建服务订单,DOING:服务订单进行中,DONE:服务订单完成,REVOKED:商户取消服务订单,EXPIRED:服务订单已失效
	StateDescription    string           `json:"state_description,omitempty"` // 对服务订单"进行中"状态的附加说明。USER_CONFIRM:用户确认,MCH_COMPLETE:商户完结
	PostPayments        []*PostPayments  `json:"post_payments"`               // 后付费项目列表,最多包含100条付费项目。 如果传入,用户侧则显示此参数。
	PostDiscounts       []*PostDiscounts `json:"post_discounts,omitempty"`    // 后付费商户优惠,最多包含30条付费项目。 如果传入,用户侧则显示此参数。
	TimeRange           *TimeRange       `json:"time_range"`                  // 服务时间范围
	Location            *Location        `json:"location,omitempty"`          // 服务位置信息
	Attach              string           `json:"attach,omitempty"`            // 商户数据包,可存放本订单所需信息,需要先urlencode后传入,总长度不大于256字符,超出报错处理。
	NotifyUrl           string           `json:"notify_url,omitempty"`        // 商户接收用户确认订单或扣款成功回调通知的地址。
	TotalAmount         int              `json:"total_amount"`                // 金额:数字,必须≥0(单位:分)
}

type ScoreDirectCompleteRsp

type ScoreDirectCompleteRsp struct {
	Code     int                  `json:"-"`
	SignInfo *SignInfo            `json:"-"`
	Response *ScoreDirectComplete `json:"response,omitempty"`
	Error    string               `json:"-"`
}

创单结单合并 Rsp

type ScoreOrderCancel

type ScoreOrderCancel struct {
	Appid      string `json:"appid"`        // 调用接口提交的公众账号Id。
	Mchid      string `json:"mchid"`        // 调用接口提交的商户号。
	ServiceId  string `json:"service_id"`   // 调用该接口提交的服务Id。
	OutOrderNo string `json:"out_order_no"` // 调用接口提交的商户服务订单号。
	OrderId    string `json:"order_id"`     // 微信支付服务订单号,每个微信支付服务订单号与商户号下对应的商户服务订单号一一对应。
}

type ScoreOrderCancelRsp

type ScoreOrderCancelRsp struct {
	Code     int               `json:"-"`
	SignInfo *SignInfo         `json:"-"`
	Response *ScoreOrderCancel `json:"response,omitempty"`
	Error    string            `json:"-"`
}

取消支付分订单 Rsp

type ScoreOrderComplete

type ScoreOrderComplete struct {
	Appid               string           `json:"appid"`                       // 调用接口提交的公众账号Id。
	Mchid               string           `json:"mchid"`                       // 调用接口提交的商户号。
	ServiceId           string           `json:"service_id"`                  // 调用该接口提交的服务Id。
	OutOrderNo          string           `json:"out_order_no"`                // 调用接口提交的商户服务订单号。
	ServiceIntroduction string           `json:"service_introduction"`        // 服务信息,用于介绍本订单所提供的服务。
	State               string           `json:"state"`                       // 表示当前单据状态。枚举值:CREATED:商户已创建服务订单,DOING:服务订单进行中,DONE:服务订单完成,REVOKED:商户取消服务订单,EXPIRED:服务订单已失效
	StateDescription    string           `json:"state_description,omitempty"` // 对服务订单"进行中"状态的附加说明。USER_CONFIRM:用户确认,MCH_COMPLETE:商户完结
	TotalAmount         int              `json:"total_amount"`                // 总金额,大于等于0的数字,单位为分,只能为整数
	PostPayments        []*PostPayments  `json:"post_payments"`               // 后付费项目列表,最多包含100条付费项目。 如果传入,用户侧则显示此参数。
	PostDiscounts       []*PostDiscounts `json:"post_discounts,omitempty"`    // 后付费商户优惠,最多包含30条付费项目。 如果传入,用户侧则显示此参数。
	RiskFund            *RiskFund        `json:"risk_fund"`                   // 订单风险金信息
	TimeRange           *TimeRange       `json:"time_range,omitempty"`        // 服务时间范围
	Location            *Location        `json:"location,omitempty"`          // 服务位置信息
	OrderId             string           `json:"order_id"`                    // 微信支付服务订单号,每个微信支付服务订单号与商户号下对应的商户服务订单号一一对应。
	NeedCollection      bool             `json:"need_collection,omitempty"`   // 是否需要收款
}

type ScoreOrderCompleteRsp

type ScoreOrderCompleteRsp struct {
	Code     int                 `json:"-"`
	SignInfo *SignInfo           `json:"-"`
	Response *ScoreOrderComplete `json:"response,omitempty"`
	Error    string              `json:"-"`
}

完结支付分订单 Rsp

type ScoreOrderCreate

type ScoreOrderCreate struct {
	Appid               string           `json:"appid"`                       // 调用接口提交的公众账号Id。
	Mchid               string           `json:"mchid"`                       // 调用接口提交的商户号。
	OutOrderNo          string           `json:"out_order_no"`                // 调用接口提交的商户服务订单号。
	ServiceId           string           `json:"service_id"`                  // 调用该接口提交的服务Id。
	ServiceIntroduction string           `json:"service_introduction"`        // 服务信息,用于介绍本订单所提供的服务。
	State               string           `json:"state"`                       // 表示当前单据状态。枚举值:CREATED:商户已创建服务订单,DOING:服务订单进行中,DONE:服务订单完成,REVOKED:商户取消服务订单,EXPIRED:服务订单已失效
	StateDescription    string           `json:"state_description,omitempty"` // 对服务订单"进行中"状态的附加说明。USER_CONFIRM:用户确认,MCH_COMPLETE:商户完结
	PostPayments        []*PostPayments  `json:"post_payments,omitempty"`     // 后付费项目列表,最多包含100条付费项目。 如果传入,用户侧则显示此参数。
	PostDiscounts       []*PostDiscounts `json:"post_discounts,omitempty"`    // 后付费商户优惠,最多包含30条付费项目。 如果传入,用户侧则显示此参数。
	RiskFund            *RiskFund        `json:"risk_fund"`                   // 订单风险金信息
	TimeRange           *TimeRange       `json:"time_range"`                  // 服务时间范围
	Location            *Location        `json:"location,omitempty"`          // 服务位置信息
	Attach              string           `json:"attach,omitempty"`            // 商户数据包,可存放本订单所需信息,需要先urlencode后传入,总长度不大于256字符,超出报错处理。
	NotifyUrl           string           `json:"notify_url,omitempty"`        // 商户接收用户确认订单或扣款成功回调通知的地址。
	OrderId             string           `json:"order_id"`                    // 微信支付服务订单号,每个微信支付服务订单号与商户号下对应的商户服务订单号一一对应。
	Package             string           `json:"package"`                     // 用户跳转到微信侧小程序订单数据,需确认模式特有API中调起支付分-确认订单传入。该数据一小时内有效。
}

type ScoreOrderCreateRsp

type ScoreOrderCreateRsp struct {
	Code     int               `json:"-"`
	SignInfo *SignInfo         `json:"-"`
	Response *ScoreOrderCreate `json:"response,omitempty"`
	Error    string            `json:"-"`
}

创建支付分订单 Rsp

type ScoreOrderModify

type ScoreOrderModify struct {
	Appid               string           `json:"appid"`                       // 调用接口提交的公众账号Id。
	Mchid               string           `json:"mchid"`                       // 调用接口提交的商户号。
	ServiceId           string           `json:"service_id"`                  // 调用该接口提交的服务Id。
	OutOrderNo          string           `json:"out_order_no"`                // 调用接口提交的商户服务订单号。
	ServiceIntroduction string           `json:"service_introduction"`        // 服务信息,用于介绍本订单所提供的服务。
	State               string           `json:"state"`                       // 表示当前单据状态。枚举值:CREATED:商户已创建服务订单,DOING:服务订单进行中,DONE:服务订单完成,REVOKED:商户取消服务订单,EXPIRED:服务订单已失效
	StateDescription    string           `json:"state_description,omitempty"` // 对服务订单"进行中"状态的附加说明。USER_CONFIRM:用户确认,MCH_COMPLETE:商户完结
	TotalAmount         int              `json:"total_amount,omitempty"`      // 总金额,大于等于0的数字,单位为分,只能为整数
	PostPayments        []*PostPayments  `json:"post_payments,omitempty"`     // 后付费项目列表,最多包含100条付费项目。 如果传入,用户侧则显示此参数。
	PostDiscounts       []*PostDiscounts `json:"post_discounts,omitempty"`    // 后付费商户优惠,最多包含30条付费项目。 如果传入,用户侧则显示此参数。
	RiskFund            *RiskFund        `json:"risk_fund"`                   // 订单风险金信息
	TimeRange           *TimeRange       `json:"time_range"`                  // 服务时间范围
	Location            *Location        `json:"location,omitempty"`          // 服务位置信息
	Attach              string           `json:"attach,omitempty"`            // 商户数据包,可存放本订单所需信息,需要先urlencode后传入,总长度不大于256字符,超出报错处理。
	NotifyUrl           string           `json:"notify_url,omitempty"`        // 商户接收用户确认订单或扣款成功回调通知的地址。
	OrderId             string           `json:"order_id"`                    // 微信支付服务订单号,每个微信支付服务订单号与商户号下对应的商户服务订单号一一对应。
	NeedCollection      bool             `json:"need_collection,omitempty"`   // 是否需要收款
	Collection          *Collection      `json:"collection,omitempty"`        // 收款信息
}

type ScoreOrderModifyRsp

type ScoreOrderModifyRsp struct {
	Code     int               `json:"-"`
	SignInfo *SignInfo         `json:"-"`
	Response *ScoreOrderModify `json:"response,omitempty"`
	Error    string            `json:"-"`
}

修改订单金额 Rsp

type ScoreOrderPartnerCancelRsp added in v1.5.100

type ScoreOrderPartnerCancelRsp struct {
	Code     int       `json:"code"`
	SignInfo *SignInfo `json:"-"`
	Error    string    `json:"error"`
}

ScoreOrderPartnerCancelRsp 服务商模式取消支付分订单 Rsp

type ScoreOrderPartnerCompleteRsp added in v1.5.100

type ScoreOrderPartnerCompleteRsp struct {
	Code     int       `json:"code"`
	SignInfo *SignInfo `json:"-"`
	Error    string    `json:"error"`
}

ScoreOrderPartnerCompleteRsp 服务商模式完结支付分订单 Rsp

type ScoreOrderPartnerCreate added in v1.5.100

type ScoreOrderPartnerCreate struct {
	Appid               string           `json:"appid"`                       // 调用接口提交的公众账号Id。
	Mchid               string           `json:"mchid"`                       // 调用接口提交的商户号。
	OutOrderNo          string           `json:"out_order_no"`                // 调用接口提交的商户服务订单号。
	ServiceId           string           `json:"service_id"`                  // 调用该接口提交的服务Id。
	ServiceIntroduction string           `json:"service_introduction"`        // 服务信息,用于介绍本订单所提供的服务。
	State               string           `json:"state"`                       // 表示当前单据状态。枚举值:CREATED:商户已创建服务订单,DOING:服务订单进行中,DONE:服务订单完成,REVOKED:商户取消服务订单,EXPIRED:服务订单已失效
	StateDescription    string           `json:"state_description,omitempty"` // 对服务订单"进行中"状态的附加说明。USER_CONFIRM:用户确认,MCH_COMPLETE:商户完结
	PostPayments        []*PostPayments  `json:"post_payments,omitempty"`     // 后付费项目列表,最多包含100条付费项目。 如果传入,用户侧则显示此参数。
	PostDiscounts       []*PostDiscounts `json:"post_discounts,omitempty"`    // 后付费商户优惠,最多包含30条付费项目。 如果传入,用户侧则显示此参数。
	RiskFund            *RiskFund        `json:"risk_fund"`                   // 订单风险金信息
	TimeRange           *TimeRange       `json:"time_range"`                  // 服务时间范围
	Location            *Location        `json:"location,omitempty"`          // 服务位置信息
	Attach              string           `json:"attach,omitempty"`            // 商户数据包,可存放本订单所需信息,需要先urlencode后传入,总长度不大于256字符,超出报错处理。
	NotifyUrl           string           `json:"notify_url,omitempty"`        // 商户接收用户确认订单或扣款成功回调通知的地址。
	OrderId             string           `json:"order_id"`                    // 微信支付服务订单号,每个微信支付服务订单号与商户号下对应的商户服务订单号一一对应。
	Package             string           `json:"package"`                     // 用户跳转到微信侧小程序订单数据,需确认模式特有API中调起支付分-确认订单传入。该数据一小时内有效。
	SubAppid            string           `json:"sub_appid"`                   // 调用接口传入的子商户应用ID
	SubMchid            string           `json:"sub_mchid"`                   // 调用接口传入的子商户商户号
	Openid              string           `json:"openid"`                      // 用户在子商户appid下的唯一标识
	SubOpenid           string           `json:"sub_openid"`                  // 用户在子商户appid下的唯一标识
	NeedUserConfirm     bool             `json:"need_user_confirm"`           // 是否需要用户确认,商户可通过该字段设置是否在商户侧完成服务订单的确认,枚举值:true:是,false:否。默认为false。当商户选择了服务订单需要用户确认时,用户确认后才会发起扣款。
}

type ScoreOrderPartnerCreateRsp added in v1.5.100

type ScoreOrderPartnerCreateRsp struct {
	Code     int                      `json:"code"`
	SignInfo *SignInfo                `json:"-"`
	Response *ScoreOrderPartnerCreate `json:"response,omitempty"`
	Error    string                   `json:"error"`
}

ScoreOrderPartnerCreateRsp 服务商模式创建支付分订单 Rsp

type ScoreOrderPartnerQuery added in v1.5.100

type ScoreOrderPartnerQuery struct {
	Appid               string           `json:"appid"`                       // 调用接口提交的公众账号Id。
	Mchid               string           `json:"mchid"`                       // 调用接口提交的商户号。
	ServiceId           string           `json:"service_id"`                  // 调用该接口提交的服务Id。
	OutOrderNo          string           `json:"out_order_no"`                // 调用接口提交的商户服务订单号。
	ServiceIntroduction string           `json:"service_introduction"`        // 服务信息,用于介绍本订单所提供的服务。
	State               string           `json:"state"`                       // 表示当前单据状态。枚举值:CREATED:商户已创建服务订单,DOING:服务订单进行中,DONE:服务订单完成,REVOKED:商户取消服务订单,EXPIRED:服务订单已失效
	StateDescription    string           `json:"state_description,omitempty"` // 对服务订单"进行中"状态的附加说明。USER_CONFIRM:用户确认,MCH_COMPLETE:商户完结
	TotalAmount         int              `json:"total_amount,omitempty"`      // 总金额,大于等于0的数字,单位为分,只能为整数
	PostPayments        []*PostPayments  `json:"post_payments,omitempty"`     // 后付费项目列表,最多包含100条付费项目。 如果传入,用户侧则显示此参数。
	PostDiscounts       []*PostDiscounts `json:"post_discounts,omitempty"`    // 后付费商户优惠,最多包含30条付费项目。 如果传入,用户侧则显示此参数。
	RiskFund            *RiskFund        `json:"risk_fund"`                   // 订单风险金信息
	TimeRange           *TimeRange       `json:"time_range"`                  // 服务时间范围
	Location            *Location        `json:"location,omitempty"`          // 服务位置信息
	Attach              string           `json:"attach,omitempty"`            // 商户数据包,可存放本订单所需信息,需要先urlencode后传入,总长度不大于256字符,超出报错处理。
	NotifyUrl           string           `json:"notify_url"`                  // 商户接收用户确认订单或扣款成功回调通知的地址。
	OrderId             string           `json:"order_id"`                    // 微信支付服务订单号,每个微信支付服务订单号与商户号下对应的商户服务订单号一一对应。
	NeedCollection      bool             `json:"need_collection,omitempty"`   // 是否需要收款
	Collection          *Collection      `json:"collection,omitempty"`        // 收款信息
	Openid              string           `json:"openid,omitempty"`            // 微信用户在商户对应appid下的唯一标识
	SubAppid            string           `json:"sub_appid"`                   // 调用接口传入的子商户应用ID
	SubMchid            string           `json:"sub_mchid"`                   // 调用接口传入的子商户商户号
	SubOpenid           string           `json:"sub_openid"`                  // 子商户公众号下的用户标识
}

type ScoreOrderPartnerQueryRsp added in v1.5.100

type ScoreOrderPartnerQueryRsp struct {
	Code     int                     `json:"code"`
	SignInfo *SignInfo               `json:"-"`
	Response *ScoreOrderPartnerQuery `json:"response,omitempty"`
	Error    string                  `json:"error"`
}

ScoreOrderPartnerQueryRsp 服务商模式查询支付分订单 Rsp

type ScoreOrderPay

type ScoreOrderPay struct {
	Appid      string `json:"appid"`        // 调用接口提交的公众账号Id。
	Mchid      string `json:"mchid"`        // 调用接口提交的商户号。
	ServiceId  string `json:"service_id"`   // 调用该接口提交的服务Id。
	OutOrderNo string `json:"out_order_no"` // 调用接口提交的商户服务订单号。
	OrderId    string `json:"order_id"`     // 微信支付服务订单号,每个微信支付服务订单号与商户号下对应的商户服务订单号一一对应。
}

type ScoreOrderPayRsp

type ScoreOrderPayRsp struct {
	Code     int            `json:"-"`
	SignInfo *SignInfo      `json:"-"`
	Response *ScoreOrderPay `json:"response,omitempty"`
	Error    string         `json:"-"`
}

商户发起催收扣款 Rsp

type ScoreOrderQuery

type ScoreOrderQuery struct {
	Appid               string           `json:"appid"`                       // 调用接口提交的公众账号Id。
	Mchid               string           `json:"mchid"`                       // 调用接口提交的商户号。
	ServiceId           string           `json:"service_id"`                  // 调用该接口提交的服务Id。
	OutOrderNo          string           `json:"out_order_no"`                // 调用接口提交的商户服务订单号。
	ServiceIntroduction string           `json:"service_introduction"`        // 服务信息,用于介绍本订单所提供的服务。
	State               string           `json:"state"`                       // 表示当前单据状态。枚举值:CREATED:商户已创建服务订单,DOING:服务订单进行中,DONE:服务订单完成,REVOKED:商户取消服务订单,EXPIRED:服务订单已失效
	StateDescription    string           `json:"state_description,omitempty"` // 对服务订单"进行中"状态的附加说明。USER_CONFIRM:用户确认,MCH_COMPLETE:商户完结
	TotalAmount         int              `json:"total_amount,omitempty"`      // 总金额,大于等于0的数字,单位为分,只能为整数
	PostPayments        []*PostPayments  `json:"post_payments,omitempty"`     // 后付费项目列表,最多包含100条付费项目。 如果传入,用户侧则显示此参数。
	PostDiscounts       []*PostDiscounts `json:"post_discounts,omitempty"`    // 后付费商户优惠,最多包含30条付费项目。 如果传入,用户侧则显示此参数。
	RiskFund            *RiskFund        `json:"risk_fund"`                   // 订单风险金信息
	TimeRange           *TimeRange       `json:"time_range"`                  // 服务时间范围
	Location            *Location        `json:"location,omitempty"`          // 服务位置信息
	Attach              string           `json:"attach,omitempty"`            // 商户数据包,可存放本订单所需信息,需要先urlencode后传入,总长度不大于256字符,超出报错处理。
	NotifyUrl           string           `json:"notify_url"`                  // 商户接收用户确认订单或扣款成功回调通知的地址。
	OrderId             string           `json:"order_id"`                    // 微信支付服务订单号,每个微信支付服务订单号与商户号下对应的商户服务订单号一一对应。
	NeedCollection      bool             `json:"need_collection,omitempty"`   // 是否需要收款
	Collection          *Collection      `json:"collection,omitempty"`        // 收款信息
	Openid              string           `json:"openid,omitempty"`            // 微信用户在商户对应appid下的唯一标识
}

type ScoreOrderQueryRsp

type ScoreOrderQueryRsp struct {
	Code     int              `json:"-"`
	SignInfo *SignInfo        `json:"-"`
	Response *ScoreOrderQuery `json:"response,omitempty"`
	Error    string           `json:"-"`
}

查询支付分订单 Rsp

type ScoreOrderSync

type ScoreOrderSync struct {
	Appid               string           `json:"appid"`                       // 调用接口提交的公众账号Id。
	Mchid               string           `json:"mchid"`                       // 调用接口提交的商户号。
	ServiceId           string           `json:"service_id"`                  // 调用该接口提交的服务Id。
	OutOrderNo          string           `json:"out_order_no"`                // 调用接口提交的商户服务订单号。
	ServiceIntroduction string           `json:"service_introduction"`        // 服务信息,用于介绍本订单所提供的服务。
	State               string           `json:"state"`                       // 表示当前单据状态。枚举值:CREATED:商户已创建服务订单,DOING:服务订单进行中,DONE:服务订单完成,REVOKED:商户取消服务订单,EXPIRED:服务订单已失效
	StateDescription    string           `json:"state_description,omitempty"` // 对服务订单"进行中"状态的附加说明。USER_CONFIRM:用户确认,MCH_COMPLETE:商户完结
	TotalAmount         int              `json:"total_amount"`                // 总金额,大于等于0的数字,单位为分,只能为整数
	PostPayments        []*PostPayments  `json:"post_payments,omitempty"`     // 后付费项目列表,最多包含100条付费项目。 如果传入,用户侧则显示此参数。
	PostDiscounts       []*PostDiscounts `json:"post_discounts,omitempty"`    // 后付费商户优惠,最多包含30条付费项目。 如果传入,用户侧则显示此参数。
	RiskFund            *RiskFund        `json:"risk_fund,omitempty"`         // 订单风险金信息
	TimeRange           *TimeRange       `json:"time_range,omitempty"`        // 服务时间范围
	Location            *Location        `json:"location,omitempty"`          // 服务位置信息
	Attach              string           `json:"attach,omitempty"`            // 商户数据包,可存放本订单所需信息,需要先urlencode后传入,总长度不大于256字符,超出报错处理。
	NotifyUrl           string           `json:"notify_url,omitempty"`        // 商户接收用户确认订单或扣款成功回调通知的地址。
	OrderId             string           `json:"order_id"`                    // 微信支付服务订单号,每个微信支付服务订单号与商户号下对应的商户服务订单号一一对应。
	NeedCollection      bool             `json:"need_collection,omitempty"`   // 是否需要收款
	Collection          *Collection      `json:"collection,omitempty"`        // 收款信息
	Openid              string           `json:"openid"`                      // 微信用户在商户对应appid下的唯一标识
}

type ScoreOrderSyncRsp

type ScoreOrderSyncRsp struct {
	Code     int             `json:"-"`
	SignInfo *SignInfo       `json:"-"`
	Response *ScoreOrderSync `json:"response,omitempty"`
	Error    string          `json:"-"`
}

同步服务订单信息 Rsp

type ScorePermission

type ScorePermission struct {
	ApplyPermissionsToken string `json:"apply_permissions_token"` // 用于跳转到微信侧小程序授权数据,跳转到微信侧小程序传入,时效性为1小时
}

type ScorePermissionOpenidQuery

type ScorePermissionOpenidQuery struct {
	Appid                    string `json:"appid"`                               // 调用接口提交的公众账号Id。
	Mchid                    string `json:"mchid"`                               // 调用接口提交的商户号。
	ServiceId                string `json:"service_id"`                          // 调用该接口提交的服务Id。
	Openid                   string `json:"openid,omitempty"`                    // 微信用户在商户对应appid下的唯一标识
	AuthorizationCode        string `json:"authorization_code"`                  // 预授权成功时的授权协议号。
	AuthorizationState       string `json:"authorization_state"`                 // 标识用户授权服务情况:UNAVAILABLE:用户未授权服务,AVAILABLE:用户已授权服务,UNBINDUSER:未绑定用户(已经预授权但未完成正式授权)
	CancelAuthorizationTime  string `json:"cancel_authorization_time,omitempty"` // 最近一次解除授权时间, 示例值:2015-05-20T13:29:35.120+08:00
	AuthorizationSuccessTime string `json:"authorization_success_time"`          // 最近一次授权成功时间, 示例值:2015-05-20T13:29:35.120+08:00
}

type ScorePermissionOpenidQueryRsp

type ScorePermissionOpenidQueryRsp struct {
	Code     int                         `json:"-"`
	SignInfo *SignInfo                   `json:"-"`
	Response *ScorePermissionOpenidQuery `json:"response,omitempty"`
	Error    string                      `json:"-"`
}

查询用户授权记录(openid) Rsp

type ScorePermissionQuery

type ScorePermissionQuery struct {
	Appid                    string `json:"appid"`                               // 调用接口提交的公众账号Id。
	Mchid                    string `json:"mchid"`                               // 调用接口提交的商户号。
	ServiceId                string `json:"service_id"`                          // 调用该接口提交的服务Id。
	Openid                   string `json:"openid,omitempty"`                    // 微信用户在商户对应appid下的唯一标识
	AuthorizationCode        string `json:"authorization_code"`                  // 预授权成功时的授权协议号。
	AuthorizationState       string `json:"authorization_state"`                 // 标识用户授权服务情况:UNAVAILABLE:用户未授权服务,AVAILABLE:用户已授权服务,UNBINDUSER:未绑定用户(已经预授权但未完成正式授权)
	NotifyUrl                string `json:"notify_url,omitempty"`                // 商户接收用户确认订单或扣款成功回调通知的地址。
	CancelAuthorizationTime  string `json:"cancel_authorization_time,omitempty"` // 最近一次解除授权时间, 示例值:2015-05-20T13:29:35.120+08:00
	AuthorizationSuccessTime string `json:"authorization_success_time"`          // 最近一次授权成功时间, 示例值:2015-05-20T13:29:35.120+08:00
}

type ScorePermissionQueryRsp

type ScorePermissionQueryRsp struct {
	Code     int                   `json:"-"`
	SignInfo *SignInfo             `json:"-"`
	Response *ScorePermissionQuery `json:"response,omitempty"`
	Error    string                `json:"-"`
}

查询用户授权记录(授权协议号) Rsp

type ScorePermissionRsp

type ScorePermissionRsp struct {
	Code     int              `json:"-"`
	SignInfo *SignInfo        `json:"-"`
	Response *ScorePermission `json:"response,omitempty"`
	Error    string           `json:"-"`
}

创单结单合并 Rsp

type SendCountInformation added in v1.5.55

type SendCountInformation struct {
	TotalSendNum    int `json:"total_send_num"`    // 已发放券张数
	TotalSendAmount int `json:"total_send_amount"` // 已发放券金额
	TodaySendNum    int `json:"today_send_num"`    // 单天已发放券张数
	TodaySendAmount int `json:"today_send_amount"` // 单天已发放券金额
}

type ServiceOrderInfo added in v1.5.92

type ServiceOrderInfo struct {
	OrderId    string `json:"order_id"`
	OutOrderNo string `json:"out_order_no"`
	State      string `json:"state"`
}

type SharePowerInfo added in v1.5.92

type SharePowerInfo struct {
	ReturnTime string `json:"return_time"`
}

type SignInfo

type SignInfo struct {
	HeaderTimestamp string `json:"Wechatpay-Timestamp"`
	HeaderNonce     string `json:"Wechatpay-Nonce"`
	HeaderSignature string `json:"Wechatpay-Signature"`
	HeaderSerial    string `json:"Wechatpay-Serial"`
	SignBody        string `json:"sign_body"`
}

type SmartGuide added in v1.5.46

type SmartGuide struct {
	GuideId string `json:"guide_id"`          // 服务人员在服务人员系统中的唯一标识
	StoreId int    `json:"store_id"`          // 门店在微信支付商户平台的唯一标识
	Name    string `json:"name"`              // 服务人员姓名
	Mobile  string `json:"mobile"`            // 员工在商户个人/企业微信通讯录上设置的手机号码(加密信息,需解密)
	Userid  string `json:"userid,omitempty"`  // 员工在商户企业微信通讯录使用的唯一标识,使用企业微信商家时返回
	WorkId  string `json:"work_id,omitempty"` // 服务人员通过小程序注册时填写的工号,使用个人微信商家时返回
}

type SmartGuideQuery added in v1.5.46

type SmartGuideQuery struct {
	Data       []*SmartGuide `json:"data"`        // 服务人员列表
	TotalCount int           `json:"total_count"` // 服务人员数量
	Limit      int           `json:"limit"`       // 该次请求可返回的最大资源条数,不大于10
	Offset     int           `json:"offset"`      // 该次请求资源的起始位置,默认值为0
}

type SmartGuideQueryRsp added in v1.5.46

type SmartGuideQueryRsp struct {
	Code     int              `json:"-"`
	SignInfo *SignInfo        `json:"-"`
	Response *SmartGuideQuery `json:"response,omitempty"`
	Error    string           `json:"-"`
}

服务人员查询 Rsp

type SmartGuideReg added in v1.5.46

type SmartGuideReg struct {
	GuideId string `json:"guide_id"` // 服务人员在服务人员系统中的唯一标识
}

type SmartGuideRegRsp added in v1.5.46

type SmartGuideRegRsp struct {
	Code     int            `json:"-"`
	SignInfo *SignInfo      `json:"-"`
	Response *SmartGuideReg `json:"response,omitempty"`
	Error    string         `json:"-"`
}

服务人员注册 Rsp

type StockSendRule added in v1.5.55

type StockSendRule struct {
	MaxAmount          int  `json:"max_amount"`           // 批次总预算
	MaxCoupons         int  `json:"max_coupons"`          // 批次最大发放个数
	MaxCouponsPerUser  int  `json:"max_coupons_per_user"` // 用户最大可领个数
	MaxAmountByDay     int  `json:"max_amount_by_day"`    // 单天发放上限金额
	MaxCouponsByDay    int  `json:"max_coupons_by_day"`   // 单天发放上限个数
	NaturalPersonLimit bool `json:"natural_person_limit"` // 是否开启自然人限制
	PreventApiAbuse    bool `json:"prevent_api_abuse"`    // 可疑账号拦截
	Transferable       bool `json:"transferable"`         // 是否允许转赠
	Shareable          bool `json:"shareable"`            // 是否允许分享链接
}

type StockUseRule added in v1.5.55

type StockUseRule struct {
	MaxCoupons        int                `json:"max_coupons"`          // 发放总上限
	MaxAmount         int                `json:"max_amount"`           // 总预算
	MaxAmountByDay    int                `json:"max_amount_by_day"`    // 当天发放上限金额
	FixedNormalCoupon *FixedNormalCoupon `json:"fixed_normal_coupon"`  // 固定面额发券批次特定信息
	MaxCouponsPerUser int                `json:"max_coupons_per_user"` // 单个用户可领个数
	CouponType        string             `json:"coupon_type"`          // 券类型
	GoodsTag          []string           `json:"goods_tag,omitempty"`  // 订单优惠标记
	TradeType         []string           `json:"trade_type"`           // 支付方式
	CombineUse        bool               `json:"combine_use"`          // 是否可叠加其他优惠
}

type SubOrders

type SubOrders struct {
	Mchid         string         `json:"mchid"`               // 子单发起方商户号,必须与发起方Appid有绑定关系
	TradeType     string         `json:"trade_type"`          // 交易类型,枚举值:NATIVE:扫码支付,JSAPI:公众号支付,APP:APP支付,MWEB:H5支付
	TradeState    string         `json:"trade_state"`         // 交易状态,枚举值:SUCCESS:支付成功, REFUND:转入退款, NOTPAY:未支付, CLOSED:已关闭, REVOKED:已撤销(付款码支付), USERPAYING:用户支付中(付款码支付), PAYERROR:支付失败(其他原因,如银行返回失败)
	BankType      string         `json:"bank_type,omitempty"` // 银行类型,采用字符串类型的银行标识
	Attach        string         `json:"attach"`              // 附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用
	SuccessTime   string         `json:"success_time"`        // 支付完成时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒
	TransactionId string         `json:"transaction_id"`      // 微信支付系统生成的订单号
	OutTradeNo    string         `json:"out_trade_no"`        // 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一
	SubMchid      string         `json:"sub_mchid"`           // 二级商户商户号,由微信支付生成并下发。服务商子商户的商户号,被合单方。直连商户不用传二级商户号
	Amount        *CombineAmount `json:"amount"`              // 订单金额信息,当支付成功时返回该字段
}

type TimeRange

type TimeRange struct {
	StartTime       string `json:"start_time"`                  // 服务开始时间,20091225091010
	StartTimeRemark string `json:"start_time_remark,omitempty"` // 服务开始时间备注
	EndTime         string `json:"end_time,omitempty"`          // 预计服务结束时间,20091225121010
	EndTimeRemark   string `json:"end_time_remark,omitempty"`   // 预计服务结束时间备注
}

type TradeBill

type TradeBill struct {
	HashType    string `json:"hash_type"`
	HashValue   string `json:"hash_value"`
	DownloadUrl string `json:"download_url"`
}

type Transfer added in v1.5.47

type Transfer struct {
	OutBatchNo string `json:"out_batch_no"` // 商户系统内部的商家批次单号
	BatchId    string `json:"batch_id"`     // 微信批次单号,微信商家转账系统返回的唯一标识
	CreateTime string `json:"create_time"`  // 批次受理成功时返回
}

type TransferBatch added in v1.5.47

type TransferBatch struct {
	Mchid         string `json:"mchid"`                    // 微信支付分配的商户号
	OutBatchNo    string `json:"out_batch_no"`             // 商户系统内部的商家批次单号
	BatchId       string `json:"batch_id"`                 // 微信批次单号,微信商家转账系统返回的唯一标识
	Appid         string `json:"appid"`                    // 申请商户号的appid或商户号绑定的appid(企业号corpid即为此appid)
	BatchStatus   string `json:"batch_status"`             // 批次状态
	BatchType     string `json:"batch_type"`               // 批次类型
	BatchName     string `json:"batch_name"`               // 该笔批量转账的名称
	BatchRemark   string `json:"batch_remark"`             // 转账说明,UTF8编码,最多允许32个字符
	CloseReason   string `json:"close_reason,omitempty"`   // 如果批次单状态为“CLOSED”(已关闭),则有关闭原因
	TotalAmount   int    `json:"total_amount"`             // 转账金额单位为分
	TotalNum      int    `json:"total_num"`                // 一个转账批次单最多发起三千笔转账
	CreateTime    string `json:"create_time,omitempty"`    // 批次受理成功时返回
	UpdateTime    string `json:"update_time,omitempty"`    // 批次最近一次状态变更的时间
	SuccessAmount int    `json:"success_amount,omitempty"` // 转账成功的金额,单位为分
	SuccessNum    int    `json:"success_num,omitempty"`    // 转账成功的笔数
	FailAmount    int    `json:"fail_amount,omitempty"`    // 转账失败的金额,单位为分
	FailNum       int    `json:"fail_num,omitempty"`       // 转账失败的笔数
}

type TransferDetail added in v1.5.47

type TransferDetail struct {
	DetailId     string `json:"detail_id"`     // 微信明细单号
	OutDetailNo  string `json:"out_detail_no"` // 商家明细单号
	DetailStatus string `json:"detail_status"` // 明细状态:PROCESSING:转账中,SUCCESS:转账成功,FAIL:转账失败
}

type TransferDetailQuery added in v1.5.47

type TransferDetailQuery struct {
	Mchid          string `json:"mchid"`                 // 微信支付分配的商户号
	OutBatchNo     string `json:"out_batch_no"`          // 商户系统内部的商家批次单号
	BatchId        string `json:"batch_id"`              // 微信批次单号,微信商家转账系统返回的唯一标识
	Appid          string `json:"appid"`                 // 申请商户号的appid或商户号绑定的appid(企业号corpid即为此appid)
	OutDetailNo    string `json:"out_detail_no"`         // 商家明细单号
	DetailId       string `json:"detail_id"`             // 微信明细单号
	DetailStatus   string `json:"detail_status"`         // 明细状态:PROCESSING:转账中,SUCCESS:转账成功,FAIL:转账失败
	TransferAmount int    `json:"transfer_amount"`       // 转账金额单位为分
	TransferRemark string `json:"transfer_remark"`       // 单条转账备注(微信用户会收到该备注),UTF8编码,最多允许32个字符
	FailReason     string `json:"fail_reason,omitempty"` // 如果转账失败则有失败原因
	Openid         string `json:"openid"`                // 用户在直连商户appid下的唯一标识
	UserName       string `json:"user_name"`             // 收款方姓名(加密)
	InitiateTime   string `json:"initiate_time"`         // 转账发起的时间
	UpdateTime     string `json:"update_time"`           // 明细最后一次状态变更的时间
}

type TransferDetailReceipt added in v1.5.47

type TransferDetailReceipt struct {
	AcceptType      string `json:"accept_type"`                // 电子回单受理类型
	OutBatchNo      string `json:"out_batch_no,omitempty"`     // 商户系统内部的商家批次单号
	OutDetailNo     string `json:"out_detail_no"`              // 商家明细单号
	SignatureNo     string `json:"signature_no"`               // 电子回单申请单号,申请单据的唯一标识
	SignatureStatus string `json:"signature_status,omitempty"` // 电子回单状态:ACCEPTED:已受理,电子签章已受理成功,FINISHED:已完成。电子签章已处理完成
	HashType        string `json:"hash_type,omitempty"`        // 电子回单文件的hash方法,回单状态为:FINISHED时返回。
	HashValue       string `json:"hash_value,omitempty"`       // 电子回单文件的hash值,用于下载之后验证文件的完整、正确性,回单状态为:FINISHED时返回。
	DownloadUrl     string `json:"download_url,omitempty"`     // 电子回单文件的下载地址,回单状态为:FINISHED时返回
}

type TransferDetailReceiptQuery added in v1.5.47

type TransferDetailReceiptQuery struct {
	AcceptType      string `json:"accept_type"`                // 电子回单受理类型
	OutBatchNo      string `json:"out_batch_no,omitempty"`     // 商户系统内部的商家批次单号
	OutDetailNo     string `json:"out_detail_no"`              // 商家明细单号
	SignatureNo     string `json:"signature_no"`               // 电子回单申请单号,申请单据的唯一标识
	SignatureStatus string `json:"signature_status,omitempty"` // 电子回单状态:ACCEPTED:已受理,电子签章已受理成功,FINISHED:已完成。电子签章已处理完成
	HashType        string `json:"hash_type,omitempty"`        // 电子回单文件的hash方法,回单状态为:FINISHED时返回。
	HashValue       string `json:"hash_value,omitempty"`       // 电子回单文件的hash值,用于下载之后验证文件的完整、正确性,回单状态为:FINISHED时返回。
	DownloadUrl     string `json:"download_url,omitempty"`     // 电子回单文件的下载地址,回单状态为:FINISHED时返回
}

type TransferDetailReceiptQueryRsp added in v1.5.47

type TransferDetailReceiptQueryRsp struct {
	Code     int                         `json:"-"`
	SignInfo *SignInfo                   `json:"-"`
	Response *TransferDetailReceiptQuery `json:"response,omitempty"`
	Error    string                      `json:"-"`
}

查询转账明细电子回单受理结果 Rsp

type TransferDetailReceiptRsp added in v1.5.47

type TransferDetailReceiptRsp struct {
	Code     int                    `json:"-"`
	SignInfo *SignInfo              `json:"-"`
	Response *TransferDetailReceipt `json:"response,omitempty"`
	Error    string                 `json:"-"`
}

转账明细电子回单受理 Rsp

type TransferDetailRsp added in v1.5.67

type TransferDetailRsp struct {
	Code     int                  `json:"-"`
	SignInfo *SignInfo            `json:"-"`
	Response *TransferDetailQuery `json:"response,omitempty"`
	Error    string               `json:"-"`
}

微信明细单号查询明细单 Rsp

type TransferMerchantDetail added in v1.5.67

type TransferMerchantDetail struct {
	OutBatchNo     string `json:"out_batch_no"`          // 商户系统内部的商家批次单号
	BatchId        string `json:"batch_id"`              // 微信批次单号,微信商家转账系统返回的唯一标识
	Appid          string `json:"appid"`                 // 申请商户号的appid或商户号绑定的appid(企业号corpid即为此appid)
	OutDetailNo    string `json:"out_detail_no"`         // 商家明细单号
	DetailId       string `json:"detail_id"`             // 微信明细单号
	DetailStatus   string `json:"detail_status"`         // 明细状态:PROCESSING:转账中,SUCCESS:转账成功,FAIL:转账失败
	TransferAmount int    `json:"transfer_amount"`       // 转账金额单位为分
	TransferRemark string `json:"transfer_remark"`       // 单条转账备注(微信用户会收到该备注),UTF8编码,最多允许32个字符
	FailReason     string `json:"fail_reason,omitempty"` // 如果转账失败则有失败原因
	Openid         string `json:"openid"`                // 用户在直连商户appid下的唯一标识
	UserName       string `json:"user_name"`             // 收款方姓名(加密)
	InitiateTime   string `json:"initiate_time"`         // 转账发起的时间
	UpdateTime     string `json:"update_time"`           // 明细最后一次状态变更的时间
}

type TransferMerchantDetailRsp added in v1.5.67

type TransferMerchantDetailRsp struct {
	Code     int                     `json:"-"`
	SignInfo *SignInfo               `json:"-"`
	Response *TransferMerchantDetail `json:"response,omitempty"`
	Error    string                  `json:"-"`
}

商家明细单号查询明细单 Rsp

type TransferMerchantQuery added in v1.5.47

type TransferMerchantQuery struct {
	TransferBatch      *TransferBatch    `json:"transfer_batch"`                 // 转账批次单基本信息
	TransferDetailList []*TransferDetail `json:"transfer_detail_list,omitempty"` // 当批次状态为“FINISHED”(已完成),且成功查询到转账明细单时返回
	Offset             int               `json:"offset,omitempty"`               // 该次请求资源(转账明细单)的起始位置
	Limit              int               `json:"limit,omitempty"`                // 该次请求可返回的最大资源(转账明细单)条数
}

type TransferMerchantQueryRsp added in v1.5.47

type TransferMerchantQueryRsp struct {
	Code     int                    `json:"-"`
	SignInfo *SignInfo              `json:"-"`
	Response *TransferMerchantQuery `json:"response,omitempty"`
	Error    string                 `json:"-"`
}

商家批次单号查询批次单 Rsp

type TransferQuery added in v1.5.47

type TransferQuery struct {
	TransferBatch      *TransferBatch    `json:"transfer_batch"`                 // 转账批次单基本信息
	TransferDetailList []*TransferDetail `json:"transfer_detail_list,omitempty"` // 当批次状态为“FINISHED”(已完成),且成功查询到转账明细单时返回
}

type TransferQueryRsp added in v1.5.47

type TransferQueryRsp struct {
	Code     int            `json:"-"`
	SignInfo *SignInfo      `json:"-"`
	Response *TransferQuery `json:"response,omitempty"`
	Error    string         `json:"-"`
}

微信批次单号查询批次单 Rsp

type TransferReceipt added in v1.5.47

type TransferReceipt struct {
	OutBatchNo      string `json:"out_batch_no"`               // 商户系统内部的商家批次单号
	SignatureNo     string `json:"signature_no"`               // 电子回单申请单号,申请单据的唯一标识
	SignatureStatus string `json:"signature_status,omitempty"` // 电子回单状态:ACCEPTED:已受理,电子签章已受理成功,FINISHED:已完成。电子签章已处理完成
	HashType        string `json:"hash_type,omitempty"`        // 电子回单文件的hash方法,回单状态为:FINISHED时返回。
	HashValue       string `json:"hash_value,omitempty"`       // 电子回单文件的hash值,用于下载之后验证文件的完整、正确性,回单状态为:FINISHED时返回。
	DownloadUrl     string `json:"download_url,omitempty"`     // 电子回单文件的下载地址,回单状态为:FINISHED时返回
	CreateTime      string `json:"create_time,omitempty"`      // 电子签章单创建时间
	UpdateTime      string `json:"update_time,omitempty"`      // 电子签章单最近一次状态变更的时间
}

type TransferReceiptQuery added in v1.5.47

type TransferReceiptQuery struct {
	OutBatchNo      string `json:"out_batch_no"`               // 商户系统内部的商家批次单号
	SignatureNo     string `json:"signature_no"`               // 电子回单申请单号,申请单据的唯一标识
	SignatureStatus string `json:"signature_status,omitempty"` // 电子回单状态:ACCEPTED:已受理,电子签章已受理成功,FINISHED:已完成。电子签章已处理完成
	HashType        string `json:"hash_type,omitempty"`        // 电子回单文件的hash方法,回单状态为:FINISHED时返回。
	HashValue       string `json:"hash_value,omitempty"`       // 电子回单文件的hash值,用于下载之后验证文件的完整、正确性,回单状态为:FINISHED时返回。
	DownloadUrl     string `json:"download_url,omitempty"`     // 电子回单文件的下载地址,回单状态为:FINISHED时返回
	CreateTime      string `json:"create_time,omitempty"`      // 电子签章单创建时间
	UpdateTime      string `json:"update_time,omitempty"`      // 电子签章单最近一次状态变更的时间
}

type TransferReceiptQueryRsp added in v1.5.47

type TransferReceiptQueryRsp struct {
	Code     int                   `json:"-"`
	SignInfo *SignInfo             `json:"-"`
	Response *TransferReceiptQuery `json:"response,omitempty"`
	Error    string                `json:"-"`
}

查询转账电子回单 Rsp

type TransferReceiptRsp added in v1.5.47

type TransferReceiptRsp struct {
	Code     int              `json:"-"`
	SignInfo *SignInfo        `json:"-"`
	Response *TransferReceipt `json:"response,omitempty"`
	Error    string           `json:"-"`
}

转账电子回单申请受理 Rsp

type TransferRsp added in v1.5.47

type TransferRsp struct {
	Code     int       `json:"-"`
	SignInfo *SignInfo `json:"-"`
	Response *Transfer `json:"response,omitempty"`
	Error    string    `json:"-"`
}

发起批量转账 Rsp

type UserCoupon added in v1.5.55

type UserCoupon struct {
	StockCreatorMchid       string                   `json:"stock_creator_mchid"` // 创建批次的商户号
	StockId                 string                   `json:"stock_id"`            // 批次号
	CouponId                string                   `json:"coupon_id"`
	CouponName              string                   `json:"coupon_name"`
	CouponType              string                   `json:"coupon_type"`
	CutToMessage            *CutToMessage            `json:"cut_to_message"`            // 单品优惠特定信息
	Status                  string                   `json:"status"`                    // 代金券状态
	Description             string                   `json:"description"`               // 使用说明
	CreateTime              string                   `json:"create_time"`               // 领券时间,遵循rfc3339标准格式
	NoCash                  bool                     `json:"no_cash"`                   // 是否无资金流
	AvailableBeginTime      string                   `json:"available_begin_time"`      // 可用开始时间,遵循rfc3339标准格式
	AvailableEndTime        string                   `json:"available_end_time"`        // 可用结束时间,遵循rfc3339标准格式
	Singleitem              bool                     `json:"singleitem"`                // 是否单品优惠
	NormalCouponInformation *NormalCouponInformation `json:"normal_coupon_information"` // 普通满减券面额、门槛信息
	ConsumeInformation      *ConsumeInformation      `json:"consume_information"`       // 已实扣代金券信息
}

type V3Apply4SubMerchantsApplication added in v1.5.93

type V3Apply4SubMerchantsApplication struct {
	AccountName      string `json:"account_name"`       // 开户名称
	AccountType      string `json:"account_type"`       // 账户类型
	AccountBank      string `json:"account_bank"`       // 开户银行
	BankName         string `json:"bank_name"`          // 开户银行全称(含支行)
	BankBranchId     string `json:"bank_branch_id"`     // 开户银行联行号
	AccountNumber    string `json:"account_number"`     // 银行账号
	VerifyResult     string `json:"verify_result"`      // 汇款验证结果
	VerifyFailReason string `json:"verify_fail_reason"` // 汇款验证失败原因
	VerifyFinishTime string `json:"verify_finish_time"` // 审核结果更新时间
}

type V3Apply4SubMerchantsApplicationRsp added in v1.5.93

type V3Apply4SubMerchantsApplicationRsp struct {
	Code     int                              `json:"-"`
	SignInfo *SignInfo                        `json:"-"`
	Response *V3Apply4SubMerchantsApplication `json:"response,omitempty"`
	Error    string                           `json:"-"`
}

查询结算账户修改申请状态 Rsp

type V3DecryptBusifavorResult added in v1.5.71

type V3DecryptBusifavorResult struct {
	EventType    string               `json:"event_type"`    // 事件类型
	CouponCode   string               `json:"coupon_code"`   // 券code
	StockId      string               `json:"stock_id"`      // 批次号
	SendTime     string               `json:"send_time"`     // 发放时间
	Openid       string               `json:"openid"`        // 用户标识
	Unionid      string               `json:"unionid"`       // 用户统一标识
	SendChannel  string               `json:"send_channel"`  // 发放渠道
	SendMerchant string               `json:"send_merchant"` // 发券商户号
	AttachInfo   *BusifavorAttachInfo `json:"attach_info"`   // 发券附加信息
}

func V3DecryptBusifavorNotifyCipherText added in v1.5.71

func V3DecryptBusifavorNotifyCipherText(ciphertext, nonce, additional, apiV3Key string) (result *V3DecryptBusifavorResult, err error)

解密商家券回调中的加密信息

type V3DecryptCombineResult

type V3DecryptCombineResult struct {
	CombineAppid      string       `json:"combine_appid"`
	CombineMchid      string       `json:"combine_mchid"`
	CombineOutTradeNo string       `json:"combine_out_trade_no"`
	SceneInfo         *SceneInfo   `json:"scene_info"`
	SubOrders         []*SubOrders `json:"sub_orders"`         // 最多支持子单条数:50
	CombinePayerInfo  *Payer       `json:"combine_payer_info"` // 支付者信息
}

func V3DecryptCombineNotifyCipherText

func V3DecryptCombineNotifyCipherText(ciphertext, nonce, additional, apiV3Key string) (result *V3DecryptCombineResult, err error)

解密 合单支付 回调中的加密信息

type V3DecryptPartnerRefundResult added in v1.5.57

type V3DecryptPartnerRefundResult struct {
	SpMchid             string        `json:"sp_mchid"`
	SubMchid            string        `json:"sub_mchid"`
	OutTradeNo          string        `json:"out_trade_no"`
	TransactionId       string        `json:"transaction_id"`
	OutRefundNo         string        `json:"out_refund_no"`
	RefundId            string        `json:"refund_id"`
	RefundStatus        string        `json:"refund_status"`
	SuccessTime         string        `json:"success_time"`
	UserReceivedAccount string        `json:"user_received_account"`
	Amount              *RefundAmount `json:"amount"`
}

func V3DecryptPartnerRefundNotifyCipherText added in v1.5.57

func V3DecryptPartnerRefundNotifyCipherText(ciphertext, nonce, additional, apiV3Key string) (result *V3DecryptPartnerRefundResult, err error)

解密 服务商退款 回调中的加密信息

type V3DecryptPartnerResult added in v1.5.57

type V3DecryptPartnerResult struct {
	SpAppid         string             `json:"sp_appid"`
	SpMchid         string             `json:"sp_mchid"`
	SubAppid        string             `json:"sub_appid"`
	SubMchid        string             `json:"sub_mchid"`
	OutTradeNo      string             `json:"out_trade_no"`
	TransactionId   string             `json:"transaction_id"`
	TradeType       string             `json:"trade_type"`
	TradeState      string             `json:"trade_state"`
	TradeStateDesc  string             `json:"trade_state_desc"`
	BankType        string             `json:"bank_type"`
	Attach          string             `json:"attach"`
	SuccessTime     string             `json:"success_time"`
	Payer           *PartnerPayer      `json:"payer"`
	Amount          *Amount            `json:"amount"`
	SceneInfo       *SceneInfo         `json:"scene_info"`
	PromotionDetail []*PromotionDetail `json:"promotion_detail"`
}

func V3DecryptPartnerNotifyCipherText added in v1.5.57

func V3DecryptPartnerNotifyCipherText(ciphertext, nonce, additional, apiV3Key string) (result *V3DecryptPartnerResult, err error)

解密 服务商支付 回调中的加密信息

type V3DecryptProfitShareResult added in v1.5.56

type V3DecryptProfitShareResult struct {
	SpMchid       string    `json:"sp_mchid"`       // 服务商商户号
	SubMchid      string    `json:"sub_mchid"`      // 子商户号
	TransactionId string    `json:"transaction_id"` // 微信订单号
	OrderId       string    `json:"order_id"`       // 微信分账/回退单号
	OutOrderNo    string    `json:"out_order_no"`   // 商户分账/回退单号
	Receiver      *Receiver `json:"receiver"`
	SuccessTime   string    `json:"success_time"` // 成功时间
}

func V3DecryptProfitShareNotifyCipherText added in v1.5.56

func V3DecryptProfitShareNotifyCipherText(ciphertext, nonce, additional, apiV3Key string) (result *V3DecryptProfitShareResult, err error)

解密分账动账回调中的加密信息

type V3DecryptRefundResult

type V3DecryptRefundResult struct {
	Mchid               string        `json:"mchid"`
	OutTradeNo          string        `json:"out_trade_no"`
	TransactionId       string        `json:"transaction_id"`
	OutRefundNo         string        `json:"out_refund_no"`
	RefundId            string        `json:"refund_id"`
	RefundStatus        string        `json:"refund_status"`
	SuccessTime         string        `json:"success_time"`
	UserReceivedAccount string        `json:"user_received_account"`
	Amount              *RefundAmount `json:"amount"`
}

func V3DecryptRefundNotifyCipherText

func V3DecryptRefundNotifyCipherText(ciphertext, nonce, additional, apiV3Key string) (result *V3DecryptRefundResult, err error)

解密 普通退款 回调中的加密信息

type V3DecryptResult

type V3DecryptResult struct {
	Appid           string             `json:"appid"`
	Mchid           string             `json:"mchid"`
	OutTradeNo      string             `json:"out_trade_no"`
	TransactionId   string             `json:"transaction_id"`
	TradeType       string             `json:"trade_type"`
	TradeState      string             `json:"trade_state"`
	TradeStateDesc  string             `json:"trade_state_desc"`
	BankType        string             `json:"bank_type"`
	Attach          string             `json:"attach"`
	SuccessTime     string             `json:"success_time"`
	Payer           *Payer             `json:"payer"`
	Amount          *Amount            `json:"amount"`
	SceneInfo       *SceneInfo         `json:"scene_info"`
	PromotionDetail []*PromotionDetail `json:"promotion_detail"`
}

func V3DecryptNotifyCipherText

func V3DecryptNotifyCipherText(ciphertext, nonce, additional, apiV3Key string) (result *V3DecryptResult, err error)

解密 普通支付 回调中的加密信息

type V3DecryptScoreResult added in v1.5.55

type V3DecryptScoreResult struct {
	Appid               string           `json:"appid"`
	Mchid               string           `json:"mchid"`
	OutOrderNo          string           `json:"out_order_no"`
	ServiceId           string           `json:"service_id"`
	Openid              string           `json:"openid"`
	State               string           `json:"state"`
	StateDescription    string           `json:"state_description"`
	TotalAmount         int              `json:"total_amount"`
	ServiceIntroduction string           `json:"service_introduction"`
	PostPayments        []*PostPayments  `json:"post_payments"`
	PostDiscounts       []*PostDiscounts `json:"post_discounts"`
	RiskFund            *RiskFund        `json:"risk_fund"`
	TimeRange           *TimeRange       `json:"time_range"`
	Location            *Location        `json:"location"`
	Attach              string           `json:"attach"`
	NotifyUrl           string           `json:"notify_url"`
	OrderId             string           `json:"order_id"`
	NeedCollection      bool             `json:"need_collection"`
	Collection          *Collection      `json:"collection"`
}

func V3DecryptScoreNotifyCipherText added in v1.5.55

func V3DecryptScoreNotifyCipherText(ciphertext, nonce, additional, apiV3Key string) (result *V3DecryptScoreResult, err error)

解密 支付分 回调中的加密信息

type V3NotifyReq

type V3NotifyReq struct {
	Id           string    `json:"id"`
	CreateTime   string    `json:"create_time"`
	ResourceType string    `json:"resource_type"`
	EventType    string    `json:"event_type"`
	Summary      string    `json:"summary"`
	Resource     *Resource `json:"resource"`
	SignInfo     *SignInfo `json:"-"`
}

func V3ParseNotify

func V3ParseNotify(req *http.Request) (notifyReq *V3NotifyReq, err error)

解析微信回调请求的参数到 V3NotifyReq 结构体

func (*V3NotifyReq) DecryptBusifavorCipherText added in v1.5.71

func (v *V3NotifyReq) DecryptBusifavorCipherText(apiV3Key string) (result *V3DecryptBusifavorResult, err error)

解密商家券回调中的加密信息

func (*V3NotifyReq) DecryptCipherText

func (v *V3NotifyReq) DecryptCipherText(apiV3Key string) (result *V3DecryptResult, err error)

解密 普通支付 回调中的加密信息

func (*V3NotifyReq) DecryptCombineCipherText

func (v *V3NotifyReq) DecryptCombineCipherText(apiV3Key string) (result *V3DecryptCombineResult, err error)

解密 合单支付 回调中的加密信息

func (*V3NotifyReq) DecryptPartnerCipherText added in v1.5.57

func (v *V3NotifyReq) DecryptPartnerCipherText(apiV3Key string) (result *V3DecryptPartnerResult, err error)

解密 服务商支付 回调中的加密信息

func (*V3NotifyReq) DecryptPartnerRefundCipherText added in v1.5.57

func (v *V3NotifyReq) DecryptPartnerRefundCipherText(apiV3Key string) (result *V3DecryptPartnerRefundResult, err error)

解密 服务商退款 回调中的加密信息

func (*V3NotifyReq) DecryptProfitShareCipherText added in v1.5.56

func (v *V3NotifyReq) DecryptProfitShareCipherText(apiV3Key string) (result *V3DecryptProfitShareResult, err error)

解密分账动账回调中的加密信息

func (*V3NotifyReq) DecryptRefundCipherText

func (v *V3NotifyReq) DecryptRefundCipherText(apiV3Key string) (result *V3DecryptRefundResult, err error)

解密 普通退款 回调中的加密信息

func (*V3NotifyReq) DecryptScoreCipherText added in v1.5.55

func (v *V3NotifyReq) DecryptScoreCipherText(apiV3Key string) (result *V3DecryptScoreResult, err error)

解密 支付分 回调中的加密信息

func (*V3NotifyReq) VerifySign

func (v *V3NotifyReq) VerifySign(wxPkContent string) (err error)

Deprecated 推荐使用 VerifySignByPK()

func (*V3NotifyReq) VerifySignByPK added in v1.5.62

func (v *V3NotifyReq) VerifySignByPK(wxPublicKey *rsa.PublicKey) (err error)

异步通知验签 wxPublicKey:微信平台证书公钥内容,通过 client.WxPublicKeyMap() 获取,然后根据 signInfo.HeaderSerial 获取相应的公钥 推荐使用 VerifySignByPKMap()

func (*V3NotifyReq) VerifySignByPKMap added in v1.5.86

func (v *V3NotifyReq) VerifySignByPKMap(wxPublicKeyMap map[string]*rsa.PublicKey) (err error)

异步通知验签 wxPublicKey:微信平台证书公钥内容,通过 client.WxPublicKeyMap() 获取

type V3NotifyRsp

type V3NotifyRsp struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type VehicleParkingFee added in v1.5.90

type VehicleParkingFee struct {
	Appid                 string             `json:"appid"`
	SubAppid              string             `json:"sub_appid,omitempty"`
	SpMchid               string             `json:"sp_mchid"`
	SubMchid              string             `json:"sub_mchid,omitempty"`
	Description           string             `json:"description"`
	CreateTime            string             `json:"create_time"`
	OutTradeNo            string             `json:"out_trade_no"`
	TransactionId         string             `json:"transaction_id"`
	TradeState            string             `json:"trade_state"`
	TradeStateDescription string             `json:"trade_state_description"`
	SuccessTime           string             `json:"success_time"`
	BankType              string             `json:"bank_type"`
	UserRepaid            string             `json:"user_repaid"`
	Attach                string             `json:"attach"`
	TradeScene            string             `json:"trade_scene"`
	ParkingInfo           *ParkingInfo       `json:"parking_info"`
	Payer                 *Payer             `json:"payer"`
	Amount                *Amount            `json:"amount"`
	PromotionDetail       []*PromotionDetail `json:"promotion_detail,omitempty"` // 优惠功能,享受优惠时返回该字段
}

type VehicleParkingFeeRsp added in v1.5.90

type VehicleParkingFeeRsp struct {
	Code     int                `json:"-"`
	SignInfo *SignInfo          `json:"-"`
	Response *VehicleParkingFee `json:"response,omitempty"`
	Error    string             `json:"-"`
}

type VehicleParkingIn added in v1.5.90

type VehicleParkingIn struct {
	Id           string `json:"id"`
	OutParkingNo string `json:"out_parking_no"` // 商户入场id
	PlateNumber  string `json:"plate_number"`   // 车牌号,仅包括省份+车牌,不包括特殊字符。
	PlateColor   string `json:"plate_color"`    // 车牌颜色,BLUE:蓝色,GREEN:绿色,YELLOW:黄色,BLACK:黑色,WHITE:白色,LIMEGREEN:黄绿色
	StartTime    string `json:"start_time"`     // 入场时间
	ParkingName  string `json:"parking_name"`   // 所在停车位车场的名称
	FreeDuration int    `json:"free_duration"`  // 停车场的免费停车时长,单位为秒
	State        string `json:"state"`
	BlockReason  string `json:"block_reason"`
}

type VehicleParkingInRsp added in v1.5.90

type VehicleParkingInRsp struct {
	Code     int               `json:"-"`
	SignInfo *SignInfo         `json:"-"`
	Response *VehicleParkingIn `json:"response,omitempty"`
	Error    string            `json:"-"`
}

type VehicleParkingOrder added in v1.5.90

type VehicleParkingOrder struct {
	Appid                 string             `json:"appid"`
	SubAppid              string             `json:"sub_appid,omitempty"`
	SpMchid               string             `json:"sp_mchid"`
	SubMchid              string             `json:"sub_mchid,omitempty"`
	Description           string             `json:"description"`
	CreateTime            string             `json:"create_time"`
	OutTradeNo            string             `json:"out_trade_no"`
	TransactionId         string             `json:"transaction_id"`
	TradeState            string             `json:"trade_state"`
	TradeStateDescription string             `json:"trade_state_description"`
	SuccessTime           string             `json:"success_time"`
	BankType              string             `json:"bank_type"`
	UserRepaid            string             `json:"user_repaid"`
	Attach                string             `json:"attach"`
	TradeScene            string             `json:"trade_scene"`
	ParkingInfo           *ParkingInfo       `json:"parking_info"`
	Payer                 *Payer             `json:"payer"`
	Amount                *Amount            `json:"amount"`
	PromotionDetail       []*PromotionDetail `json:"promotion_detail,omitempty"` // 优惠功能,享受优惠时返回该字段
}

type VehicleParkingOrderRsp added in v1.5.90

type VehicleParkingOrderRsp struct {
	Code     int                  `json:"-"`
	SignInfo *SignInfo            `json:"-"`
	Response *VehicleParkingOrder `json:"response,omitempty"`
	Error    string               `json:"-"`
}

type VehicleParkingQuery added in v1.5.90

type VehicleParkingQuery struct {
	PlateNumber     string `json:"plate_number"` // 车牌号,仅包括省份+车牌,不包括特殊字符。
	PlateColor      string `json:"plate_color"`  // 车牌颜色,BLUE:蓝色,GREEN:绿色,YELLOW:黄色,BLACK:黑色,WHITE:白色,LIMEGREEN:黄绿色
	ServiceOpenTime string `json:"service_open_time,omitempty"`
	Openid          string `json:"openid"`
	ServiceState    string `json:"service_state"`
}

type VehicleParkingQueryRsp added in v1.5.90

type VehicleParkingQueryRsp struct {
	Code     int                  `json:"-"`
	SignInfo *SignInfo            `json:"-"`
	Response *VehicleParkingQuery `json:"response,omitempty"`
	Error    string               `json:"-"`
}

type ViolationNotifyUrl added in v1.5.97

type ViolationNotifyUrl struct {
	NotifyUrl string `json:"notify_url"` // 通知地址,仅支持https。
}

type ViolationNotifyUrlRsp added in v1.5.97

type ViolationNotifyUrlRsp struct {
	Code     int                 `json:"-"`
	SignInfo *SignInfo           `json:"-"`
	Response *ViolationNotifyUrl `json:"response,omitempty"`
	Error    string              `json:"-"`
}

创建、查询、更新投诉通知回调地址 Rsp

type Withdraw added in v1.5.67

type Withdraw struct {
	SubMchid    string `json:"sub_mchid"`              // 服务商特约商户号,由微信支付生成并下发。
	WithdrawId  string `json:"withdraw_id"`            // 微信支付提现单号
	AccountType string `json:"account_type,omitempty"` // 出款账户类型
}

type WithdrawRsp added in v1.5.67

type WithdrawRsp struct {
	Code     int       `json:"-"`
	SignInfo *SignInfo `json:"-"`
	Response *Withdraw `json:"response,omitempty"`
	Error    string    `json:"-"`
}

特约商户余额提现 Rsp

type WithdrawStatus added in v1.5.67

type WithdrawStatus struct {
	SubMchid      string `json:"sub_mchid"`      // 服务商特约商户号,由微信支付生成并下发。
	SpMchid       string `json:"sp_mchid"`       // 服务商户号
	Status        string `json:"status"`         // 提现单状态:CREATE_SUCCESS:受理成功,SUCCESS:提现成功,FAIL:提现失败,REFUND:提现退票,CLOSE:关单,INIT:业务单已创建
	WithdrawId    string `json:"withdraw_id"`    // 微信支付提现单号
	OutRequestNo  string `json:"out_request_no"` // 商户提现单号
	Amount        int    `json:"amount"`         // 提现金额
	CreateTime    string `json:"create_time"`    // 创建时间
	UpdateTime    string `json:"update_time"`    // 更新时间
	Reason        string `json:"reason"`         // 提现失败原因,仅在提现失败、退票、关单时有值
	Remark        string `json:"remark"`         // 商户对提现单的备注,若发起提现时未传入相应值或输入不合法,则该值为空
	BankMemo      string `json:"bank_memo"`      // 展示在收款银行系统中的附言,由数字、字母、汉字组成(能否成功展示依赖银行系统支持)。若发起提现时未传入相应值或输入不合法,则该值为空
	AccountType   string `json:"account_type"`   // 出款账户类型
	AccountNumber string `json:"account_number"` // 服务商提现入账的银行账号,仅显示后四位。
	AccountBank   string `json:"account_bank"`   // 服务商提现入账的开户银行
	BankName      string `json:"bank_name"`      // 服务商提现入账的开户银行全称(含支行)
}

type WithdrawStatusRsp added in v1.5.67

type WithdrawStatusRsp struct {
	Code     int             `json:"-"`
	SignInfo *SignInfo       `json:"-"`
	Response *WithdrawStatus `json:"response,omitempty"`
	Error    string          `json:"-"`
}

查询特约商户提现状态 Rsp

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL