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 TransferData
- type TransferRes
Constants ¶
View Source
const ( PayUnifiedOrder = "pay/unifiedorder" // 微信下单 PayOrderQuery = "pay/orderquery" // 支付结果查询 PayRefund = "secapi/pay/refund" // 退款 PayProfitSharing = "secapi/pay/profitsharing" // 请求单次分账 PayProfitSharingFinish = "secapi/pay/profitsharingfinish" // 结束分账请求 BankPay = "mmpaysptrans/pay_bank" // 企业付款到银行卡 BankQuery = "mmpaysptrans/query_bank" // 付款到银行卡结果查询 RedPackSend = "mmpaymkttransfers/sendredpack" // 发红包 RedPackInfo = "mmpaymkttransfers/gethbinfo" // 红包状态查询 Transfer = "mmpaymkttransfers/promotion/transfers" // 企业付款至零钱 PublicKey = "https://fraud.mch.weixin.qq.com/risk/getpublickey" // 获取RSA公钥API获取RSA公钥 )
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 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"`
}
支付成功通知
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"`
}
分账结果中的接收者
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"`
OutTradeNo string `xml:"out_trade_no"`
OutRefundNo string `xml:"out_refund_no"`
TotalFee int64 `xml:"total_fee"`
RefundFee int64 `xml:"refund_fee"`
RefundDesc string `xml:"refund_desc"`
NotifyUrl string `xml:"notify_url"`
}
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
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"`
}
`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 TransferData ¶
type TransferData struct {
MchBase
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.