Documentation ¶
Index ¶
- Constants
- type BankPayData
- type BankPayRes
- type BankQueryData
- type BankQueryRes
- type MchApi
- type MchBase
- type MchBaseResponse
- type MchSignType
- type PayNotify
- type PayNotifyRes
- type PayOrderQueryData
- type PayOrderQueryRes
- type PayProfitSharingData
- type PayProfitSharingFinishData
- type PayProfitSharingFinishRes
- type PayProfitSharingReceiver
- type PayProfitSharingRes
- type PayRefundData
- type PayRefundRes
- type PayUnifiedOrderData
- type PayUnifiedOrderRes
- type PublicKeyData
- type PublicKeyRes
- type RedPackInfoData
- type RedPackInfoRes
- type RedPackSendData
- type RedPackSendRes
- type RefundNotify
- type RefundNotifyBody
- type TransferData
- type TransferRes
Constants ¶
View Source
const ( // PayUnifiedOrder 微信下单 PayUnifiedOrder = "pay/unifiedorder" // PayOrderQuery 支付结果查询 PayOrderQuery = "pay/orderquery" // PayRefund 退款 PayRefund = "secapi/pay/refund" // PayProfitSharing 请求单次分账 PayProfitSharing = "secapi/pay/profitsharing" // PayProfitSharingFinish 结束分账请求 PayProfitSharingFinish = "secapi/pay/profitsharingfinish" // BankPay 企业付款到银行卡 BankPay = "mmpaysptrans/pay_bank" // BankQuery 付款到银行卡结果查询 BankQuery = "mmpaysptrans/query_bank" // RedPackSend 发红包 RedPackSend = "mmpaymkttransfers/sendredpack" // RedPackInfo 红包状态查询 RedPackInfo = "mmpaymkttransfers/gethbinfo" // Transfer 企业付款至零钱 Transfer = "mmpaymkttransfers/promotion/transfers" // PublicKey 获取RSA公钥API获取RSA公钥 PublicKey = "https://fraud.mch.weixin.qq.com/risk/getpublickey" )
View Source
const ( MchSignTypeMD5 = "MD5" MchSignTypeHMACSHA256 = "HMAC-SHA256" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BankPayData ¶
type BankPayRes ¶
type BankPayRes struct { MchBaseResponse PartnerTradeNo string `xml:"partner_trade_no"` AmountFen int64 `xml:"amount"` PaymentNo string `xml:"payment_no"` CMmsAmt int64 `xml:"cmms_amt"` }
type BankQueryData ¶
type BankQueryRes ¶
type BankQueryRes struct { MchBaseResponse PartnerTradeNo string `xml:"partner_trade_no"` PaymentNo string `xml:"payment_no"` AmountFen int64 `xml:"amount"` Status string `xml:"status"` CMmsAmtFen int64 `xml:"cmms_amt"` CreateTime string `xml:"create_time"` PaySuccessTime string `xml:"pay_succ_time"` Reason string `xml:"reason"` }
type MchBaseResponse ¶
type MchBaseResponse struct { XMLName xml.Name `xml:"xml"` ReturnCode string `xml:"return_code"` ReturnMsg string `xml:"return_msg"` ResultCode string `xml:"result_code,omitempty"` ErrCode string `xml:"err_code,omitempty"` ErrCodeDes string `xml:"err_code_des,omitempty"` }
func (MchBaseResponse) IsUnCertain ¶
func (m MchBaseResponse) IsUnCertain() bool
IsUnCertain 如果出错,是否是微信程序错误
type MchSignType ¶
type MchSignType string
type PayNotify ¶
type PayNotify struct { MchBaseResponse MchBase DeviceInfo string `xml:"device_info"` 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 int64 `xml:"coupon_count"` CouponType0 string `xml:"coupon_type_0"` CouponId0 string `xml:"coupon_id_0"` CouponFee0 int64 `xml:"coupon_fee_0"` CouponType1 string `xml:"coupon_type_1"` CouponId1 string `xml:"coupon_id_1"` CouponFee1 int64 `xml:"coupon_fee_1"` CouponType2 string `xml:"coupon_type_2"` CouponId2 string `xml:"coupon_id_2"` CouponFee2 int64 `xml:"coupon_fee_2"` CouponType3 string `xml:"coupon_type_3"` CouponId3 string `xml:"coupon_id_3"` CouponFee3 int64 `xml:"coupon_fee_3"` TransactionId string `xml:"transaction_id"` OutTradeNo string `xml:"out_trade_no"` Attach string `xml:"attach"` TimeEnd string `xml:"time_end"` }
PayNotify 支付成功通知
type PayOrderQueryData ¶
type PayOrderQueryRes ¶
type PayOrderQueryRes PayNotify
type PayProfitSharingData ¶
type PayProfitSharingData struct { MchBase TransactionId string `xml:"transaction_id"` OutOrderNo string `xml:"out_order_no"` Receivers string `xml:"receivers"` }
func (*PayProfitSharingData) SerReceivers ¶
func (ppsd *PayProfitSharingData) SerReceivers(list []PayProfitSharingReceiver) (err error)
type PayProfitSharingFinishRes ¶
type PayProfitSharingFinishRes PayProfitSharingRes
type PayProfitSharingReceiver ¶
type PayProfitSharingReceiver struct { Type string `json:"type"` Account string `json:"account"` Amount int64 `json:"amount"` Description string `json:"description"` }
PayProfitSharingReceiver 分账结果中的接收者
type PayProfitSharingRes ¶
type PayProfitSharingRes struct { MchBaseResponse MchBase TransactionId string `xml:"transaction_id"` OutOrderNo string `xml:"out_order_no"` OrderId string `xml:"order_id"` }
type PayRefundData ¶
type PayRefundData struct { MchBase TransactionId string `xml:"transaction_id,omitempty"` OutTradeNo string `xml:"out_trade_no,omitempty"` OutRefundNo string `xml:"out_refund_no"` TotalFee int64 `xml:"total_fee"` RefundFee int64 `xml:"refund_fee"` RefundDesc string `xml:"refund_desc,omitempty"` NotifyUrl string `xml:"notify_url,omitempty"` }
type PayRefundRes ¶
type PayRefundRes struct { MchBaseResponse MchBase 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"` TotalFee int64 `xml:"total_fee"` CashFee int64 `xml:"cash_fee"` }
type PayUnifiedOrderData ¶
type PayUnifiedOrderData struct { MchBase Openid string `xml:"openid,omitempty"` DeviceInfo string `xml:"device_info"` Body string `xml:"body"` OutTradeNo string `xml:"out_trade_no"` TotalFee int64 `xml:"total_fee"` SpBillCreateIp string `xml:"spbill_create_ip"` NotifyUrl string `xml:"notify_url"` TradeType string `xml:"trade_type"` Attach string `xml:"attach"` ProfitSharing string `xml:"profit_sharing,omitempty"` }
PayUnifiedOrderData `ProfitSharing`设置为"Y"为分账定单标记。 不设置,或设置为"N",为普通定单
type PayUnifiedOrderRes ¶
type PayUnifiedOrderRes struct { MchBaseResponse MchBase PrepayId string `xml:"prepay_id"` }
type PublicKeyData ¶
type PublicKeyData struct {
MchBase
}
type PublicKeyRes ¶
type PublicKeyRes struct { MchBaseResponse PubKey string `xml:"pub_key"` }
type RedPackInfoData ¶
type RedPackInfoRes ¶
type RedPackInfoRes struct { MchBaseResponse MchBillNo string `xml:"mch_billno"` MchId string `xml:"mch_id"` Status string `xml:"status"` SendType string `xml:"send_type"` HbType string `xml:"hb_type"` Reason *string `xml:"reason"` SendTime string `xml:"send_time"` RefundTime *string `xml:"refund_time"` RefundAmount *int `xml:"refund_amount"` Wishing *string `xml:"wishing"` Remark *string `xml:"remark"` ActName *string `xml:"act_name"` HbList []struct { HbInfo []struct { OpenId string `xml:"openid"` Amount int `xml:"amount"` RcvTime string `xml:"rcv_time"` } `xml:"hbinfo"` } `xml:"hblist"` }
type RedPackSendData ¶
type RedPackSendData struct { MchBase MchBillNo string `xml:"mch_billno"` WxAppId string `xml:"wxappid"` SendName string `xml:"send_name"` ReOpenId string `xml:"re_openid"` TotalAmount int `xml:"total_amount"` TotalNum int `xml:"total_num"` Wishing string `xml:"wishing"` ClientIp string `xml:"client_ip"` ActName string `xml:"act_name"` Remark string `xml:"remark"` }
type RedPackSendRes ¶
type RefundNotify ¶ added in v1.2.3
type RefundNotify struct { MchBaseResponse MchBase ReqInfo string `xml:"req_info"` }
RefundNotify 退款状态通知消息
type RefundNotifyBody ¶ added in v1.2.3
type RefundNotifyBody struct { XMLName xml.Name `xml:"root"` TransactionId string `xml:"transaction_id"` OutTradeNo string `xml:"out_trade_no"` RefundId string `xml:"refund_id"` OutRefundNo string `xml:"out_refund_no"` TotalFee int64 `xml:"total_fee"` SettlementTotalFee int64 `xml:"settlement_total_fee,omitempty"` RefundFee int64 `xml:"refund_fee"` SettlementRefundFee int64 `xml:"settlement_refund_fee"` RefundStatus string `xml:"refund_status"` SuccessTime string `xml:"success_time,omitempty"` RefundRecvAccount string `xml:"refund_recv_account"` RefundAccount string `xml:"refund_account"` RefundRequestSource string `xml:"refund_request_source"` }
RefundNotifyBody 退款状态通知内容
type TransferData ¶
type TransferData struct { XMLName xml.Name `xml:"xml"` NonceStr string `xml:"nonce_str"` Sign string `xml:"sign"` SignType string `xml:"sign_type,omitempty"` MchId string `xml:"mchid"` MchAppId string `xml:"mch_appid"` PartnerTradeNo string `xml:"partner_trade_no"` OpenId string `xml:"openid"` CheckName string `xml:"check_name"` ReUserName string `xml:"re_user_name"` Amount int `xml:"amount"` Desc string `xml:"desc"` SpBillCreateIp string `xml:"spbill_create_ip"` }
type TransferRes ¶
Click to show internal directories.
Click to hide internal directories.