Documentation ¶
Index ¶
Constants ¶
View Source
const SUCCESS = "SUCCESS"
SUCCESS 表示支付成功
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Timestamp string `json:"timestamp"` NonceStr string `json:"nonceStr"` PrePayID string `json:"prePayId"` SignType string `json:"signType"` Package string `json:"package"` PaySign string `json:"paySign"` }
Config 是传出用于 js sdk 用的参数
type Order ¶
Order struct extends context
func (*Order) BridgeConfig ¶
BridgeConfig get js bridge config
func (*Order) PrePayID ¶
PrePayID will request wechat merchant api and request for a pre payment order id
func (*Order) PrePayOrder ¶
PrePayOrder return data for invoke wechat payment
func (*Order) QueryOrder ¶
func (o *Order) QueryOrder(p *QueryParams) (paidResult notify.PaidResult, err error)
QueryOrder 查询订单
type Params ¶
type Params struct { TotalFee string CreateIP string Body string OutTradeNo string OpenID string TradeType string SignType string Detail string Attach string GoodsTag string NotifyURL string }
Params was NEEDED when request Unified order 传入的参数,用于生成 prepay_id 的必需参数
type PreOrder ¶
type PreOrder struct { ReturnCode string `xml:"return_code"` ReturnMsg string `xml:"return_msg"` AppID string `xml:"appid,omitempty"` MchID string `xml:"mch_id,omitempty"` NonceStr string `xml:"nonce_str,omitempty"` Sign string `xml:"sign,omitempty"` ResultCode string `xml:"result_code,omitempty"` TradeType string `xml:"trade_type,omitempty"` PrePayID string `xml:"prepay_id,omitempty"` CodeURL string `xml:"code_url,omitempty"` MWebURL string `xml:"mweb_url,omitempty"` ErrCode string `xml:"err_code,omitempty"` ErrCodeDes string `xml:"err_code_des,omitempty"` }
PreOrder 是 Unified order 接口的返回
type QueryParams ¶
type QueryParams struct { OutTradeNo string // 商户订单号 SignType string // 签名类型 TransactionID string // 微信订单号 }
QueryParams 传入的参数
Click to show internal directories.
Click to hide internal directories.