Documentation ¶
Index ¶
- Constants
- type MiniProgram
- type OfficialAccount
- type Option
- func WithAppId(appId string) Option
- func WithCertSerialNum(certSerialNum string) Option
- func WithMiniAppId(appId string) Option
- func WithMiniSecret(secret string) Option
- func WithOfficialAppId(appId string) Option
- func WithOfficialEncodingAesKey(key string) Option
- func WithOfficialSecret(secret string) Option
- func WithOfficialToken(token string) Option
- func WithPayAppId(appId string) Option
- func WithPayKey(key string) Option
- func WithPayMchid(mchid string) Option
- func WithPayNotifyUrl(notifyUrl string) Option
- func WithPayPrivateKey(privateKey string) Option
- func WithPayPrivateKeyFile(privateKeyFile string) Option
- type Options
- type Wechat
- func (w *Wechat) MiniProgram() *miniprogram.MiniProgram
- func (w *Wechat) Notify() (*notify.Handler, error)
- func (w *Wechat) OfficialAccount() *officialaccount.OfficialAccount
- func (w *Wechat) Pay() *pay.Pay
- func (w *Wechat) Payment(payType payments.PaymentType) (payments.Payment, error)
- func (w *Wechat) Provide(ctx context.Context) interface{}
- func (w *Wechat) Refund() (*refunddomestic.RefundsApiService, error)
- func (w *Wechat) SetCache(cache cache.Cache)
Constants ¶
View Source
const ( TradeSuccess = "SUCCESS" // 支付成功 TradeRefund = "REFUND" // 转入退款 TradeNotPay = "NOTPAY" // 未支付 TradeClosed = "CLOSED" // 已关闭 TradeRevoked = "REVOKED" // 已撤销 TradeUserPaying = "USERPAYING" // 用户支付中 TradePayError = "PAYERROR" // 支付失败 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MiniProgram ¶
type MiniProgram struct {
// contains filtered or unexported fields
}
type OfficialAccount ¶
type OfficialAccount struct {
// contains filtered or unexported fields
}
type Option ¶
type Option func(*Options)
func WithCertSerialNum ¶
func WithMiniAppId ¶
func WithMiniSecret ¶
func WithOfficialAppId ¶
func WithOfficialSecret ¶
func WithOfficialToken ¶
func WithPayAppId ¶
func WithPayKey ¶
func WithPayMchid ¶
func WithPayNotifyUrl ¶
func WithPayPrivateKey ¶
func WithPayPrivateKeyFile ¶
type Options ¶
type Options struct { MiniProgram // 小程序配置 OfficialAccount // 公众号配置 payments.Options // 支付配置 // contains filtered or unexported fields }
type Wechat ¶
type Wechat struct {
// contains filtered or unexported fields
}
func (*Wechat) MiniProgram ¶
func (w *Wechat) MiniProgram() *miniprogram.MiniProgram
MiniProgram 微信小程序
func (*Wechat) OfficialAccount ¶
func (w *Wechat) OfficialAccount() *officialaccount.OfficialAccount
OfficialAccount 公众号
func (*Wechat) Refund ¶
func (w *Wechat) Refund() (*refunddomestic.RefundsApiService, error)
Click to show internal directories.
Click to hide internal directories.