Documentation
¶
Index ¶
- type AliQueryResult
- type AliWebAppQueryResult
- type AliWebPayResult
- type AliWebQueryResult
- type BaseResult
- type CallbackReturn
- type Charge
- type FundBill
- type PayCallback
- type PayClient
- type WeChatPayResult
- type WeChatQueryResult
- type WeChatReResult
- type WechatBaseResult
- type WechatResultData
- type WechatReturnData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliQueryResult ¶
type AliQueryResult struct {
TradeNo string `json:"trade_no"`
OutTradeNo string `json:"out_trade_no"`
OpenID string `json:"open_id"`
BuyerLogonID string `json:"buyer_logon_id"`
TradeStatus string `json:"trade_status"`
TotalAmount string `json:"total_amount"`
ReceiptAmount string `json:"receipt_amount"`
BuyerPayAmount string `json:"BuyerPayAmount"`
PointAmount string `json:"point_amount"`
InvoiceAmount string `json:"invoice_amount"`
SendPayDate string `json:"send_pay_date"`
AlipayStoreID string `json:"alipay_store_id"`
StoreID string `json:"store_id"`
TerminalID string `json:"terminal_id"`
FundBillListStr string `json:"fund_bill_list"`
FundBillList []FundBill `json:"-"`
StoreName string `json:"store_name"`
BuyerUserID string `json:"buyer_user_id"`
DiscountGoodsDetail string `json:"discount_goods_detail"`
IndustrySepcDetail string `json:"industry_sepc_detail"`
PassbackParams string `json:"passback_params"`
}
type AliWebAppQueryResult ¶
type AliWebAppQueryResult struct {
AlipayTradeQueryResponse struct {
Code string `json:"code"`
Msg string `json:"msg"`
SubCode string `json:"sub_code"`
SubMsg string `json:"sub_msg"`
TradeNo string `json:"trade_no"`
OutTradeNo string `json:"out_trade_no"`
OpenId string `json:"open_id"`
BuyerLogonId string `json:"buyer_logon_id"`
TradeStatus string `json:"trade_status"`
TotalAmount string `json:"total_amount"`
ReceiptAmount string `json:"receipt_amount"`
BuyerPayAmount string `json:"buyer_pay_amount"`
PointAmount string `json:"point_amount"`
InvoiceAmount string `json:"invoice_amount"`
SendPayDate string `json:"send_pay_date"`
AlipayStoreId string `json:"alipay_store_id"`
StoreId string `json:"store_id"`
TerminalId string `json:"terminal_id"`
StoreName string `json:"store_name"`
BuyerUserId string `json:"buyer_user_id"`
DiscountGoodsDetail string `json:"discount_goods_detail"`
IndustrySepcDetail string `json:"industry_sepc_detail"`
} `json:"alipay_trade_query_response"`
Sign string `json:"sign"`
}
type AliWebPayResult ¶
type AliWebPayResult struct {
NotifyTime string `json:"notify_time"`
NotifyType string `json:"notify_type"`
NotifyID string `json:"notify_id"`
AppId string `json:"app_id"`
Charset string `json:"charset"`
Version string `json:"version"`
SignType string `json:"sign_type"`
Sign string `json:"sign"`
TradeNum string `json:"trade_no"`
OutTradeNum string `json:"out_trade_no"`
OutBizNo string `json:"out_biz_no"`
BuyerID string `json:"buyer_id"`
BuyerPayAmount string `json:"buyer_pay_amount"`
RefundFee string `json:"refund_fee"`
Subject string `json:"subject"`
PayMentType string `json:"payment_type"`
GmtPayMent string `json:"gmt_payment"`
GmtClose string `json:"gmt_close"`
SellerEmail string `json:"seller_email"`
BuyerEmail string `json:"buyer_email"`
SellerID string `json:"seller_id"`
Price string `json:"price"`
TotalFee string `json:"total_fee"`
Quantity string `json:"quantity"`
Body string `json:"body"`
Discount string `json:"discount"`
IsTotalFeeAdjust string `json:"is_total_fee_adjust"`
UseCoupon string `json:"use_coupon"`
RefundStatus string `json:"refund_status"`
GmtRefund string `json:"gmt_refund"`
AliQueryResult
}
AliWebPayResult 支付宝支付结果回调
type AliWebQueryResult ¶
type AliWebQueryResult struct {
IsSuccess string `xml:"is_success"`
ErrorMsg string `xml:"error"`
SignType string `xml:"sign_type"`
Sign string `xml:"sign"`
Response struct {
Trade struct {
BuyerEmail string `xml:"buyer_email"`
BuyerId string `xml:"buyer_id"`
SellerID string `xml:"seller_id"`
TradeStatus string `xml:"trade_status"`
IsTotalFeeAdjust string `xml:"is_total_fee_adjust"`
OutTradeNum string `xml:"out_trade_no"`
Subject string `xml:"subject"`
FlagTradeLocked string `xml:"flag_trade_locked"`
Body string `xml:"body"`
GmtCreate string `xml:"gmt_create"`
GmtPayment string `xml:"gmt_payment"`
GmtLastModifiedTime string `xml:"gmt_last_modified_time"`
SellerEmail string `xml:"seller_email"`
TotalFee string `xml:"total_fee"`
TradeNum string `xml:"trade_no"`
} `xml:"trade"`
} `xml:"response"`
}
type BaseResult ¶
type BaseResult struct {
IsSucceed bool // 是否交易成功
TradeNum string // 交易流水号
MoneyFee int64 // 支付金额
TradeTime string // 交易时间
ContractNum string // 交易单号
UserInfo string // 支付账号信息(有可能有,有可能没有)
ThirdDiscount int64 // 第三方优惠
}
BaseResult 支付结果
type CallbackReturn ¶
type CallbackReturn struct {
IsSucceed bool `json:"isSucceed"`
OrderNum string `json:"orderNum"`
TradeNum string `json:"tradeNum"`
UserID string `json:"userID"`
MoneyFee int64 `json:"moneyFee"`
Sign string `json:"sign"`
ThirdDiscount int64 `json:"thirdDiscount"`
}
CallbackReturn 回调业务代码时的参数
type Charge ¶
type Charge struct {
APPID string `json:"-"`
TradeNum string `json:"tradeNum,omitempty"`
Origin string `json:"origin,omitempty"`
UserID string `json:"userId,omitempty"`
PayMethod int64 `json:"payMethod,omitempty"`
MoneyFee float64 `json:"MoneyFee,omitempty"`
CallbackURL string `json:"callbackURL,omitempty"`
ReturnURL string `json:"returnURL,omitempty"`
ShowURL string `json:"showURL,omitempty"`
Describe string `json:"describe,omitempty"`
OpenID string `json:"openid,omitempty"`
CheckName bool `json:"check_name,omitempty"`
ReUserName string `json:"re_user_name,omitempty"`
// 阿里提现
AliAccount string `json:"ali_account"`
AliAccountType string `json:"ali_account_type"`
}
Charge 支付参数
type PayCallback ¶
type PayCallback struct {
Origin string `json:"origin"`
TradeNum string `json:"trade_num"`
OrderNum string `json:"order_num"`
CallBackURL string `json:"callback_url"`
Status int64 `json:"status"`
}
PayCallback 支付返回
type PayClient ¶
type PayClient interface {
// 用户下单付款
Pay(charge *Charge) (map[string]string, error)
// 付款给用户
PayToClient(charge *Charge) (map[string]string, error)
}
PayClient 支付客户端接口
type WeChatPayResult ¶
type WeChatPayResult struct {
WechatBaseResult
WechatReturnData
WechatResultData
}
type WeChatQueryResult ¶
type WeChatQueryResult struct {
WechatBaseResult
WeChatReResult
WechatReturnData
WechatResultData
TradeState string `xml:"trade_state" json:"trade_state,omitempty"`
TradeStateDesc string `xml:"trade_state_desc" json:"trade_state_desc,omitempty"`
}
type WeChatReResult ¶
type WeChatReResult struct {
PrepayID string `xml:"prepay_id" json:"prepay_id,omitempty"`
CodeURL string `xml:"code_url" json:"code_url,omitempty"`
}
WeChatResult 微信支付返回
type WechatBaseResult ¶
type WechatBaseResult struct {
ReturnCode string `xml:"return_code" json:"return_code,omitempty"`
ReturnMsg string `xml:"return_msg" json:"return_msg,omitempty"`
}
WechatBaseResult 基本信息
type WechatResultData ¶
type WechatResultData 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"`
}
WechatResultData 结果通用数据
type WechatReturnData ¶
type WechatReturnData 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"`
}
WechatReturnData 返回通用数据
Click to show internal directories.
Click to hide internal directories.