Documentation
¶
Index ¶
- Constants
- func IsBillNoExist(err error) bool
- func QuickDebug()
- func SetAlert(a alert)
- func SetDebug(l logger)
- func SetTLSClient(pfxData []byte, password string) error
- func TimeExpire() string
- type BillEntry
- type BillStatistics
- type BrandWCPayRequest
- type Client
- func (c *Client) CloseOrder(request *CloseOrderRequest) (*CloseOrderResponse, error)
- func (c *Client) DownloadBill(request *DownloadBillRequest) (*DownloadBillResponse, error)
- func (c *Client) DownloadFundFlow(request *DownloadFundFlowRequest) (*DownloadFundFlowResponse, error)
- func (c *Client) GetBrandWCPayRequest(resp *UnifiedOrderResponse) string
- func (c *Client) GetTransferInfo(request *TransferInfoRequest) (*TransferInfoResponse, error)
- func (c *Client) OrderQuery(request *OrderQueryRequest) (*OrderQueryResponse, error)
- func (c *Client) PaidNotifyVerify(request *http.Request) (*PaidNotifyRequest, *PaidNotifyResponse, error)
- func (c *Client) PaidVerify(body []byte) (*PaidNotifyRequest, *PaidNotifyResponse, error)
- func (c *Client) Refund(request *RefundRequest) (*RefundResponse, error)
- func (c *Client) RefundQuery(request *RefundQueryRequest) (*RefundQueryResponse, error)
- func (c *Client) Reverse(request *ReverseRequest) (*ReverseResponse, error)
- func (c *Client) ShortURL(request *ShortURLRequest) (*ShortURLResponse, error)
- func (c *Client) Transfer(request *TransferRequest) (*TransferResponse, error)
- func (c *Client) UnifiedOrder(request *UnifiedOrderRequest) (*UnifiedOrderResponse, error)
- type CloseOrderRequest
- type CloseOrderResponse
- type DownloadBillRequest
- type DownloadBillResponse
- type DownloadFundFlowRequest
- type DownloadFundFlowResponse
- type Error
- type FundFlowEntry
- type FundFlowStatistics
- type Map
- type Meta
- func (meta *Meta) IsBizerrNeedRetry() bool
- func (meta *Meta) IsErrorNoAuth() bool
- func (meta *Meta) IsErrorNotFound() bool
- func (meta *Meta) IsErrorSendFailed() bool
- func (meta *Meta) IsErrorV2AccountSimpleBan() bool
- func (meta *Meta) IsNotEnough() bool
- func (meta *Meta) IsRefundNotExist() bool
- func (meta Meta) IsSystemErr() bool
- func (meta *Meta) IsTradeOverDue() bool
- func (meta *Meta) IsUserAccountAbnormal() bool
- func (meta Meta) ResultCodeSuccess() bool
- type OrderQueryRequest
- type OrderQueryResponse
- type PaidNotifyRequest
- type PaidNotifyResponse
- type RefundDetail
- type RefundQueryRequest
- type RefundQueryResponse
- type RefundRequest
- type RefundResponse
- type ReverseRequest
- type ReverseResponse
- type ShortURLRequest
- type ShortURLResponse
- type TransferInfoRequest
- type TransferInfoResponse
- type TransferRequest
- type TransferResponse
- type UnifiedOrderRequest
- type UnifiedOrderResponse
Constants ¶
const ( // BillTypeAll 返回当日所有订单信息,默认值 BillTypeAll = "ALL" // BillTypeSuccess 返回当日成功支付的订单 BillTypeSuccess = "SUCCESS" // BillTypeRefund 返回当日退款订单 BillTypeRefund = "REFUND" // BillTypeRechargeRefund 返回当日充值退款订单 BillTypeRechargeRefund = "RECHARGE_REFUND" )
const ( // BillTradeStatusSuccess 成功 BillTradeStatusSuccess = "SUCCESS" // BillTradeStatusRefund 退款 BillTradeStatusRefund = "REFUND" // BillTradeStatusRevoked 撤销 BillTradeStatusRevoked = "REVOKED" )
const ( // AccountTypeBasic 基本账户 AccountTypeBasic = "Basic" // AccountTypeOperation 运营账户 AccountTypeOperation = "Operation" // AccountTypeFees 手续费账户 AccountTypeFees = "Fees" )
账单的资金来源账户
const ( // RefundStatusSuccess 退款成功 RefundStatusSuccess = "SUCCESS" // RefundStatusRefundClose 退款关闭 RefundStatusRefundClose = "REFUNDCLOSE" // RefundStatusProcessing 退款处理中 RefundStatusProcessing = "PROCESSING" // RefundStatusChange 退款异常,退款到银行发现用户的卡作废或者冻结了,导致原路退款银行卡失败,可前往商户平台(pay.weixin.qq.com)-交易中心,手动处理 RefundStatusChange = "CHANGE" )
const ( // 默认加密方式 SignTypeDefault = "MD5" // MD5加密方式 SignTypeMD5 = "MD5" // SHA-256加密方式 SignTypeSHA256 = "HMAC-SHA256" )
const ( // TradeTypeJs 公众号支付 TradeTypeJs = "JSAPI" // TradeTypeNative 扫码支付 TradeTypeNative = "NATIVE" // TradeTypeMWeb h5支付 TradeTypeMWeb = "MWEB" // TradeTypeApp app支付 TradeTypeApp = "APP" // TradeTypeMicroPay 刷卡支付 TradeTypeMicroPay = "MICROPAY" )
Variables ¶
This section is empty.
Functions ¶
func SetTLSClient ¶ added in v1.2.0
SetTLSClient tls client
Types ¶
type BillEntry ¶
type BillEntry struct { TimeEnd string `csv:"交易时间"` AppID string `csv:"公众账号ID"` MchID string `csv:"商户号"` SubMchID string `csv:"子商户号"` DeviceInfo string `csv:"设备号"` TransactionID string `csv:"微信订单号"` OutTradeNo string `csv:"商户订单号"` OpenID string `csv:"用户标识"` TradeType string `csv:"交易类型"` TradeStatus string `csv:"交易状态"` BankType string `csv:"付款银行"` FeeType string `csv:"货币种类"` TotalFee string `csv:"总金额"` CouponFee string `csv:"企业红包金额"` RefundID string `csv:"微信退款单号"` OutRefundNo string `csv:"商户退款单号"` RefundFee string `csv:"退款金额"` CouponRefundFee string `csv:"企业红包退款金额"` RefundChannel string `csv:"退款类型"` RefundStatus string `csv:"退款状态"` Body string `csv:"商品名称"` Attach string `csv:"商户数据包"` HandlingCharge string `csv:"手续费"` Rate string `csv:"费率"` }
BillEntry 账单条目
type BillStatistics ¶
type BillStatistics struct { TradeOrderCount string `csv:"总交易单数"` TotalBusinessTransaction string `csv:"总交易额"` TotalRefundFee string `csv:"总退款金额"` TotalCouponFee string `csv:"总企业红包退款金额"` TotalHandlingCharge string `csv:"手续费总金额"` }
BillStatistics 账单统计
type BrandWCPayRequest ¶
type BrandWCPayRequest struct { AppID string `xml:"appId" json:"appId"` Timestamp string `xml:"timeStamp" json:"timeStamp"` NonceStr string `xml:"nonceStr" json:"nonceStr"` Package string `xml:"package" json:"package"` SignType string `xml:"signType" json:"signType"` PaySign string `xml:"paySign" json:"paySign"` }
BrandWCPayRequest 微信内H5调起支付 https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=7_7&index=6
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client 微信支付
func (*Client) CloseOrder ¶
func (c *Client) CloseOrder(request *CloseOrderRequest) (*CloseOrderResponse, error)
CloseOrder 关闭订单
func (*Client) DownloadBill ¶
func (c *Client) DownloadBill(request *DownloadBillRequest) (*DownloadBillResponse, error)
DownloadBill 下载账单
func (*Client) DownloadFundFlow ¶ added in v1.4.0
func (c *Client) DownloadFundFlow(request *DownloadFundFlowRequest) (*DownloadFundFlowResponse, error)
DownloadFundFlow 下载资金账单
func (*Client) GetBrandWCPayRequest ¶
func (c *Client) GetBrandWCPayRequest(resp *UnifiedOrderResponse) string
GetBrandWCPayRequest 生成微信内h5支付调用支付字符串
func (*Client) GetTransferInfo ¶ added in v1.4.0
func (c *Client) GetTransferInfo(request *TransferInfoRequest) (*TransferInfoResponse, error)
GetTransferInfo 企业付款查询
func (*Client) OrderQuery ¶
func (c *Client) OrderQuery(request *OrderQueryRequest) (*OrderQueryResponse, error)
OrderQuery 订单查询
func (*Client) PaidNotifyVerify ¶
func (c *Client) PaidNotifyVerify(request *http.Request) (*PaidNotifyRequest, *PaidNotifyResponse, error)
PaidNotifyVerify 付款通知验证
func (*Client) PaidVerify ¶
func (c *Client) PaidVerify(body []byte) (*PaidNotifyRequest, *PaidNotifyResponse, error)
PaidVerify 付款通知
func (*Client) Refund ¶
func (c *Client) Refund(request *RefundRequest) (*RefundResponse, error)
Refund 退款
func (*Client) RefundQuery ¶
func (c *Client) RefundQuery(request *RefundQueryRequest) (*RefundQueryResponse, error)
RefundQuery 退款查询
func (*Client) Reverse ¶
func (c *Client) Reverse(request *ReverseRequest) (*ReverseResponse, error)
Reverse 撤销交易 https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=9_11&index=3
func (*Client) ShortURL ¶ added in v1.2.0
func (c *Client) ShortURL(request *ShortURLRequest) (*ShortURLResponse, error)
ShortURL 二维码转短链接
func (*Client) Transfer ¶ added in v1.2.0
func (c *Client) Transfer(request *TransferRequest) (*TransferResponse, error)
Transfer 企业付款到零钱 NO_AUTH AMOUNT_LIMIT
func (*Client) UnifiedOrder ¶
func (c *Client) UnifiedOrder(request *UnifiedOrderRequest) (*UnifiedOrderResponse, error)
UnifiedOrder 下单
type CloseOrderRequest ¶
type CloseOrderRequest struct { XMLName xml.Name `xml:"xml"` AppID string `xml:"appid,omitempty"` MchID string `xml:"mch_id,omitempty"` OutTradeNo string `xml:"out_trade_no,omitempty"` NonceStr string `xml:"nonce_str,omitempty"` Sign string `xml:"sign,omitempty"` SignType string `xml:"sign_type,omitempty"` }
CloseOrderRequest 关闭订单
type CloseOrderResponse ¶
type CloseOrderResponse struct { Meta AppID string `xml:"appid"` MchID string `xml:"mch_id"` NonceStr string `xml:"nonce_str"` Sign string `xml:"sign"` }
CloseOrderResponse 关闭订单回复
type DownloadBillRequest ¶
type DownloadBillRequest struct { XMLName xml.Name `xml:"xml"` AppID string `xml:"appid,omitempty"` MchID string `xml:"mch_id,omitempty"` NonceStr string `xml:"nonce_str,omitempty"` Sign string `xml:"sign,omitempty"` SignType string `xml:"sign_type,omitempty"` BillDate string `xml:"bill_date,omitempty"` BillType string `xml:"bill_type,omitempty"` TarType string `xml:"tar_type,omitempty"` }
DownloadBillRequest 下载账单请求 https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=9_6
type DownloadBillResponse ¶
type DownloadBillResponse struct { EntryList []*BillEntry Statistics []*BillStatistics Bill string }
DownloadBillResponse 下载账单回复
type DownloadFundFlowRequest ¶ added in v1.4.0
type DownloadFundFlowRequest struct { XMLName xml.Name `xml:"xml"` AppID string `xml:"appid,omitempty"` MchID string `xml:"mch_id,omitempty"` NonceStr string `xml:"nonce_str,omitempty"` Sign string `xml:"sign,omitempty"` SignType string `xml:"sign_type,omitempty"` BillDate string `xml:"bill_date,omitempty"` AccountType string `xml:"account_type,omitempty"` TarType string `xml:"tar_type,omitempty"` }
DownloadFundFlowRequest 下载资金账单请求 https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=9_18
type DownloadFundFlowResponse ¶ added in v1.4.0
type DownloadFundFlowResponse struct { EntryList []*FundFlowEntry Statistics []*FundFlowStatistics FundFlow string }
DownloadFundFlowResponse 下载账单回复
type FundFlowEntry ¶ added in v1.4.0
type FundFlowEntry struct { TimeEnd string `csv:"记账时间"` TransactionID string `csv:"微信支付业务单号"` FundFlowID string `csv:"资金流水单号"` BusinessName string `csv:"业务名称"` BusinessType string `csv:"业务类型"` TradeType string `csv:"收支类型"` TradeFee string `csv:"收支金额(元)"` Balance string `csv:"账户结余(元)"` Operator string `csv:"资金变更提交申请人"` Remark string `csv:"备注"` BusinessID string `csv:"业务凭证号"` }
FundFlowEntry 账单条目
type FundFlowStatistics ¶ added in v1.4.0
type FundFlowStatistics struct { TradeOrderCount string `csv:"资金流水总笔数"` IncomeCount string `csv:"收入笔数"` TotalIncomeFee string `csv:"收入金额"` SpendCount string `csv:"支出笔数"` TotalSpendFee string `csv:"支出金额"` }
FundFlowStatistics 账单统计
type Map ¶
Map map
func (Map) MarshalXML ¶
MarshalXML 序列化
func (*Map) UnmarshalXML ¶
UnmarshalXML 反序列化
type Meta ¶
type Meta struct { ReturnCode string `xml:"return_code"` // SUCCESS/FAIL 此字段是通信标识,非交易标识,交易是否成功需要查看result_code来判断 ReturnMsg string `xml:"return_msg"` // 当return_code为FAIL时返回信息为错误原因 ,例如 签名失败 参数格式校验错误 ResultCode string `xml:"result_code"` // 业务结果 ErrCode string `xml:"err_code"` // 当result_code为FAIL时返回错误代码,详细参见下文错误列表 ErrCodeDes string `xml:"err_code_des"` // 当result_code为FAIL时返回错误描述,详细参见下文错误列表 }
Meta 公共回复
func (*Meta) IsErrorNoAuth ¶ added in v1.6.0
IsErrorNoAuth 没有账号权限或付款到的账号被风控或冻结
func (*Meta) IsErrorNotFound ¶ added in v1.5.0
IsErrorNotFound 指定单号数据不存在或超过查询有效期
func (*Meta) IsErrorSendFailed ¶ added in v1.6.0
IsErrorSendFailed 付款错误
func (*Meta) IsErrorV2AccountSimpleBan ¶ added in v1.5.0
IsErrorV2AccountSimpleBan 无法给未实名用户付款
func (*Meta) IsUserAccountAbnormal ¶ added in v1.3.1
IsUserAccountAbnormal 用户账户注销
type OrderQueryRequest ¶
type OrderQueryRequest struct { XMLName xml.Name `xml:"xml"` AppID string `xml:"appid,omitempty"` MchID string `xml:"mch_id,omitempty"` TransactionID string `xml:"transaction_id,omitempty"` OutTradeNo string `xml:"out_trade_no,omitempty"` NonceStr string `xml:"nonce_str,omitempty"` Sign string `xml:"sign,omitempty"` SignType string `xml:"sign_type,omitempty"` }
OrderQueryRequest 订单查询 transaction_id 和 out_trade_no 2选1
type OrderQueryResponse ¶
type OrderQueryResponse struct { Meta AppID string `xml:"appid"` MchID string `xml:"mch_id"` NonceStr string `xml:"nonce_str"` Sign string `xml:"sign"` DeviceInfo string `xml:"device_info"` OpenID string `xml:"openid"` IsSubscribe string `xml:"is_subscribe"` TradeType string `xml:"trade_type"` TradeState string `xml:"trade_state"` BankType string `xml:"bank_type"` TotalFee int64 `xml:"total_fee"` SettlementTotalFee int64 `xml:"settlement_total_fee"` FeeType string `xml:"fee_type"` CashFee int64 `xml:"cash_fee"` CashFeeType string `xml:"cash_fee_type"` CouponFee int64 `xml:"coupon_fee"` CouponCount int `xml:"coupon_count"` TransactionID string `xml:"transaction_id"` OutTradeNo string `xml:"out_trade_no"` Attach string `xml:"attach"` TimeEnd string `xml:"time_end"` TradeStateDesc string `xml:"trade_state_desc"` }
OrderQueryResponse 订单查询回复
type PaidNotifyRequest ¶
type PaidNotifyRequest struct { XMLName xml.Name `xml:"xml"` Meta AppID string `xml:"appid"` MchID string `xml:"mch_id"` DeviceInfo string `xml:"device_info"` NonceStr string `xml:"nonce_str"` Sign string `xml:"sign"` SignType string `xml:"sign_type"` OpenID string `xml:"openid"` IsSubscribe string `xml:"is_subscribe"` TradeType string `xml:"trade_type"` BankType string `xml:"bank_type"` TotalFee int64 `xml:"total_fee"` SettlementTotalFee int64 `xml:"settlement_total_fee"` // 应结订单金额 FeeType string `xml:"fee_type"` CashFee int64 `xml:"cash_fee"` CashFeeType string `xml:"cash_fee_type"` CouponFee int64 `xml:"coupon_fee"` // 总代金券金额 CouponCount int `xml:"coupon_count"` // 代金券使用数量 TransactionID string `xml:"transaction_id"` // 微信支付订单号 OutTradeNo string `xml:"out_trade_no"` // 商户订单号 Attach string `xml:"attach"` // 商家数据包 TimeEnd string `xml:"time_end"` // 支付完成时间 }
PaidNotifyRequest 付款通知请求
type PaidNotifyResponse ¶
type PaidNotifyResponse struct { XMLName xml.Name `xml:"xml"` ReturnCode string `xml:"return_code"` ReturnMsg string `xml:"return_msg"` }
PaidNotifyResponse 付款通知回复
type RefundDetail ¶
type RefundDetail struct { OutRefundNo string // 商户退款单号 RefundID string // 微信退款单号 RefundChannel string // 退款渠道 RefundFee int64 // 申请退款金额 SettlementRefundFee int64 // 退款金额 CouponRefundFee int64 // 总代金券退款金额 CouponRefundCount int // 退款代金券使用数量 RefundStatus string // 退款状态 RefundAccount string // 退款资金来源 RefundRecvAccount string // 退款入账账户 RefundSuccessTime string // 退款成功时间 }
RefundDetail 退款详情
type RefundQueryRequest ¶
type RefundQueryRequest struct { XMLName xml.Name `xml:"xml"` AppID string `xml:"appid,omitempty"` MchID string `xml:"mch_id,omitempty"` NonceStr string `xml:"nonce_str,omitempty"` Sign string `xml:"sign,omitempty"` SignType string `xml:"sign_type,omitempty"` TransactionID string `xml:"transaction_id,omitempty"` OutTradeNo string `xml:"out_trade_no,omitempty"` OutRefundNo string `xml:"out_refund_no,omitempty"` RefundID string `xml:"refund_id,omitempty"` Offset int `xml:"offset,omitempty"` }
RefundQueryRequest 退款查询请求
type RefundQueryResponse ¶
type RefundQueryResponse struct { Meta AppID string `xml:"appid"` MchID string `xml:"mch_id"` NonceStr string `xml:"nonce_str"` Sign string `xml:"sign"` TotalRefundCount int `xml:"total_refund_count"` // 订单总退款次数, 订单总共已发生的部分退款次数,当请求参数传入offset后有返回 TransactionID string `xml:"transaction_id"` OutTradeNo string `xml:"out_trade_no"` TotalFee int64 `xml:"total_fee"` SettlementTotalFee int64 `xml:"settlement_total_fee"` FeeType string `xml:"fee_type"` CashFee int64 `xml:"cash_fee"` RefundCount int `xml:"refund_count"` RefundDetails []*RefundDetail `xml:"-"` }
RefundQueryResponse 退款查询回复
type RefundRequest ¶
type RefundRequest struct { XMLName xml.Name `xml:"xml"` AppID string `xml:"appid,omitempty"` MchID string `xml:"mch_id,omitempty"` NonceStr string `xml:"nonce_str,omitempty"` Sign string `xml:"sign,omitempty"` SignType string `xml:"sign_type,omitempty"` TransactionID string `xml:"transaction_id,omitempty"` OutTradeNo string `xml:"out_trade_no,omitempty"` OutRefundNo string `xml:"out_refund_no,omitempty"` TotalFee int64 `xml:"total_fee,omitempty"` RefundFee int64 `xml:"refund_fee,omitempty"` RefundFeeType string `xml:"refund_fee_type,omitempty"` RefundDesc string `xml:"refund_desc,omitempty"` RefundAccount string `xml:"refund_account,omitempty"` NotifyURL string `xml:"notify_url,omitempty"` // 可以不传 }
RefundRequest 退款请求
type RefundResponse ¶
type RefundResponse struct { Meta AppID string `xml:"appid"` MchID string `xml:"mch_id"` NonceStr string `xml:"nonce_str"` Sign string `xml:"sign"` TransactionID string `xml:"transaction_id"` OutTradeNo string `xml:"out_trade_no"` OutRefundNo string `xml:"out_refund_no"` RefundID string `xml:"refund_id"` RefundFee int64 `xml:"refund_fee"` SettlementRefundFee int64 `xml:"settlement_refund_fee"` TotalFee int64 `xml:"total_fee"` SettlementTotalFee int64 `xml:"settlement_total_fee"` FeeType string `xml:"fee_type"` CashFee int64 `xml:"cash_fee"` CashFeeType string `xml:"cash_fee_type"` CashRefundFee int64 `xml:"cash_refund_fee"` CouponRefundFee int64 `xml:"coupon_refund_fee"` CouponRefundCount int `xml:"coupon_refund_count"` }
RefundResponse 退款回复
type ReverseRequest ¶
type ReverseRequest struct { XMLName xml.Name `xml:"xml"` AppID string `xml:"appid,omitempty"` MchID string `xml:"mch_id,omitempty"` TransactionID string `xml:"transaction_id,omitempty"` OutTradeNo string `xml:"out_trade_no,omitempty"` NonceStr string `xml:"nonce_str,omitempty"` Sign string `xml:"sign,omitempty"` SignType string `xml:"sign_type,omitempty"` }
ReverseRequest 撤销交易请求
type ReverseResponse ¶
type ReverseResponse struct { Meta AppID string `xml:"appid"` MchID string `xml:"mch_id"` NonceStr string `xml:"nonce_str"` Sign string `xml:"sign"` Recall string `xml:"recall"` }
ReverseResponse 撤销交易回复
type ShortURLRequest ¶ added in v1.2.0
type ShortURLRequest struct { XMLName xml.Name `xml:"xml"` AppID string `xml:"appid,omitempty"` MchID string `xml:"mch_id,omitempty"` NonceStr string `xml:"nonce_str,omitempty"` LongURL string `xml:"long_url,omitempty"` Sign string `xml:"sign,omitempty"` SignType string `xml:"sign_type,omitempty"` }
ShortURLRequest 转换短链接请求
type ShortURLResponse ¶ added in v1.2.0
type ShortURLResponse struct { Meta AppID string `xml:"appid"` MchID string `xml:"mch_id"` NonceStr string `xml:"nonce_str"` Sign string `xml:"sign"` ShortURL string `xml:"short_url"` }
ShortURLResponse 转换短链接回复
type TransferInfoRequest ¶ added in v1.4.0
type TransferInfoRequest struct { XMLName xml.Name `xml:"xml"` AppID string `xml:"appid,omitempty"` MchID string `xml:"mch_id,omitempty"` NonceStr string `xml:"nonce_str,omitempty"` Sign string `xml:"sign,omitempty"` PartnerTradeNo string `xml:"partner_trade_no,omitempty"` // 商户订单号 }
TransferInfoRequest 查询企业付款参数
type TransferInfoResponse ¶ added in v1.4.0
type TransferInfoResponse struct { Meta AppID string `xml:"appid"` MchID string `xml:"mch_id"` PartnerTradeNo string `xml:"partner_trade_no"` // 商户订单号 DetailId string `xml:"detail_id"` // 付款单号 Status string `xml:"status"` // 转账状态 Reason string `xml:"reason"` // 失败原因 OpenID string `xml:"openid"` // 收款用户openId TransferName string `xml:"transfer_name"` // 收款用户姓名 PaymentAmount string `xml:"payment_amount"` // 收款金额 TransferTime string `xml:"transfer_time"` // 转账时间 PaymentTime string `xml:"payment_time"` // 付款成功时间 Remark string `xml:"desc"` // 企业付款备注 }
TransferInfoResponse 企业付款响应
func (*TransferInfoResponse) PaidFail ¶ added in v1.5.0
func (resp *TransferInfoResponse) PaidFail() bool
func (*TransferInfoResponse) PaidSuccess ¶ added in v1.5.0
func (resp *TransferInfoResponse) PaidSuccess() bool
func (*TransferInfoResponse) PayProcessing ¶ added in v1.5.0
func (resp *TransferInfoResponse) PayProcessing() bool
type TransferRequest ¶ added in v1.2.0
type TransferRequest struct { XMLName xml.Name `xml:"xml"` AppID string `xml:"mch_appid,omitempty"` MchID string `xml:"mchid,omitempty"` DeviceInfo string `xml:"device_info,omitempty"` NonceStr string `xml:"nonce_str,omitempty"` Sign string `xml:"sign,omitempty"` PartnerTradeNo string `xml:"partner_trade_no,omitempty"` // 商户订单号 OpenID string `xml:"openid,omitempty"` CheckName string `xml:"check_name,omitempty"` // NO_CHECK:不校验真实姓名, FORCE_CHECK:强校验真实姓名 ReUserName string `xml:"re_user_name,omitempty"` Amount string `xml:"amount,omitempty"` // 单位分 Desc string `xml:"desc,omitempty"` // 企业付款备注 SpBillCreateIP string `xml:"spbill_create_ip,omitempty"` }
TransferRequest 企业付款参数
type TransferResponse ¶ added in v1.2.0
type TransferResponse struct { Meta AppID string `xml:"mch_appid"` MchID string `xml:"mchid"` DeviceInfo string `xml:"device_info"` NonceStr string `xml:"nonce_str"` PartnerTradeNo string `xml:"partner_trade_no"` // 商户订单号 PaymentNo string `xml:"payment_no"` // 微信付款单号 PaymentTime string `xml:"payment_time"` // 付款成功时间 }
TransferResponse 企业付款回复
type UnifiedOrderRequest ¶
type UnifiedOrderRequest struct { XMLName xml.Name `xml:"xml"` AppID string `xml:"appid,omitempty"` MchID string `xml:"mch_id,omitempty"` DeviceInfo string `xml:"device_info,omitempty"` NonceStr string `xml:"nonce_str,omitempty"` Sign string `xml:"sign,omitempty"` SignType string `xml:"sign_type,omitempty"` Body string `xml:"body,omitempty"` Detail string `xml:"detail,omitempty"` Attach string `xml:"attach,omitempty"` OutTradeNo string `xml:"out_trade_no,omitempty"` FeeType string `xml:"fee_type,omitempty"` TotalFee int64 `xml:"total_fee,omitempty"` SpBillCreateIP string `xml:"spbill_create_ip,omitempty"` TimeStart string `xml:"time_start,omitempty"` TimeExpire string `xml:"time_expire,omitempty"` GoodsTag string `xml:"goods_tag,omitempty"` NotifyURL string `xml:"notify_url,omitempty"` TradeType string `xml:"trade_type,omitempty"` ProductID string `xml:"product_id,omitempty"` LimitPay string `xml:"limit_pay,omitempty"` OpenID string `xml:"openid,omitempty"` SceneInfo string `xml:"scene_info,omitempty"` }
UnifiedOrderRequest 下单请求
type UnifiedOrderResponse ¶
type UnifiedOrderResponse struct { Meta AppID string `xml:"appid"` MchID string `xml:"mch_id"` DeviceInfo string `xml:"device_info"` NonceStr string `xml:"nonce_str"` Sign string `xml:"sign"` PrepayID string `xml:"prepay_id"` TradeType string `xml:"trade_type"` CodeURL string `xml:"code_url"` MWebURL string `xml:"mweb_url"` }
UnifiedOrderResponse 下单回复
Source Files
¶
- alert.go
- client.go
- closeorder.go
- do_request.go
- downloadbill.go
- downloadfundflow.go
- error.go
- http_client.go
- logger.go
- map.go
- meta.go
- nonce.go
- orderquery.go
- paid_notify.go
- refund.go
- refundquery.go
- reverse.go
- shorturl.go
- sign.go
- sign_type_enum.go
- trade_type_enum.go
- transfer.go
- transferinfo.go
- unifiedorder.go