Documentation ¶
Index ¶
- Constants
- type Config
- type PayConfig
- type Wechat
- func (w *Wechat) GetAccessToken(ctx context.Context) (string, error)
- func (w *Wechat) GetUserPhone(ctx context.Context, code string) (string, string, error)
- func (w *Wechat) ParseNotifyReqParams(ctx context.Context, request *http.Request) (*payments.Transaction, error)
- func (w *Wechat) Prepay(ctx context.Context, prepayRequest jsapi.PrepayRequest) (string, *model.PrepaySign, error)
- func (w *Wechat) QueryOrderByOutTradeNo(ctx context.Context, orderID int64) (*payments.Transaction, error)
- func (w *Wechat) QueryWxSession(ctx context.Context, code string) (*model.WXSessionRet, error)
Constants ¶
View Source
const ( TradeStateSucc = "SUCCESS" TradeStateNotPay = "NOTPAY" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Wechat ¶
type Wechat struct { Conf *Config // contains filtered or unexported fields }
func (*Wechat) GetAccessToken ¶
func (*Wechat) GetUserPhone ¶
func (*Wechat) ParseNotifyReqParams ¶
func (*Wechat) Prepay ¶
func (w *Wechat) Prepay(ctx context.Context, prepayRequest jsapi.PrepayRequest) (string, *model.PrepaySign, error)
func (*Wechat) QueryOrderByOutTradeNo ¶
func (*Wechat) QueryWxSession ¶
Click to show internal directories.
Click to hide internal directories.