1 Star 0 Fork 0

h79/goutils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
wx.go 2.71 KB
一键复制 编辑 原始数据 按行查看 历史
huqiuyun 提交于 2022-06-01 16:22 . init
package common
// WeChatResult 微信支付返回
type WxReResult struct {
PrepayID string `xml:"prepay_id" json:"prepay_id,omitempty"`
CodeURL string `xml:"code_url" json:"code_url,omitempty"`
}
// WxBaseResult 基本信息
type WxBaseResult struct {
ReturnCode string `xml:"return_code" json:"return_code,omitempty"`
ReturnMsg string `xml:"return_msg" json:"return_msg,omitempty"`
}
// WxReturnData 返回通用数据
type WxReturnData struct {
AppID string `xml:"appid,omitempty" json:"appid,omitempty"`
MchID string `xml:"mch_id,omitempty" json:"mch_id,omitempty"`
MchAppid string `xml:"mch_appid,omitempty" json:"mch_appid,omitempty"`
DeviceInfo string `xml:"device_info,omitempty" json:"device_info,omitempty"`
NonceStr string `xml:"nonce_str,omitempty" json:"nonce_str,omitempty"`
Sign string `xml:"sign,omitempty" json:"sign,omitempty"`
ResultCode string `xml:"result_code,omitempty" json:"result_code,omitempty"`
ErrCode string `xml:"err_code,omitempty" json:"err_code,omitempty"`
ErrCodeDes string `xml:"err_code_des,omitempty" json:"err_code_des,omitempty"`
}
// WxResultData 结果通用数据
type WxResultData struct {
OpenID string `xml:"openid,omitempty" json:"openid,omitempty"`
IsSubscribe string `xml:"is_subscribe,omitempty" json:"is_subscribe,omitempty"`
TradeType string `xml:"trade_type,omitempty" json:"trade_type,omitempty"`
BankType string `xml:"bank_type,omitempty" json:"bank_type,omitempty"`
FeeType string `xml:"fee_type,omitempty" json:"fee_type,omitempty"`
TotalFee string `xml:"total_fee,omitempty" json:"total_fee,omitempty"`
CashFeeType string `xml:"cash_fee_type,omitempty" json:"cash_fee_type,omitempty"`
CashFee string `xml:"cash_fee,omitempty" json:"cash_fee,omitempty"`
TransactionID string `xml:"transaction_id,omitempty" json:"transaction_id,omitempty"`
OutTradeNO string `xml:"out_trade_no,omitempty" json:"out_trade_no,omitempty"`
Attach string `xml:"attach,omitempty" json:"attach,omitempty"`
TimeEnd string `xml:"time_end,omitempty" json:"time_end,omitempty"`
PartnerTradeNo string `xml:"partner_trade_no,omitempty" json:"partner_trade_no,omitempty"`
PaymentNo string `xml:"payment_no,omitempty" json:"payment_no,omitempty"`
PaymentTime string `xml:"payment_time,omitempty" json:"payment_time,omitempty"`
DetailId string `xml:"detail_id,omitempty" json:"detail_id,omitempty"`
}
type WxPayResult struct {
WxBaseResult
WxReturnData
WxResultData
}
type WxQueryResult struct {
WxBaseResult
WxReResult
WxReturnData
WxResultData
TradeState string `xml:"trade_state" json:"trade_state,omitempty"`
TradeStateDesc string `xml:"trade_state_desc" json:"trade_state_desc,omitempty"`
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/h79/goutils.git
git@gitee.com:h79/goutils.git
h79
goutils
goutils
v1.5.0

搜索帮助

Cb406eda 1850385 E526c682 1850385