wechat

package
v1.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

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 Option

type Option func(*Options)

func WithAppid added in v1.0.0

func WithAppid(appid string) Option

func WithCertSerialNum

func WithCertSerialNum(certSerialNum string) Option

func WithMiniSecret

func WithMiniSecret(secret string) Option

func WithPayKey

func WithPayKey(key string) Option

func WithPayMchid

func WithPayMchid(mchid string) Option

func WithPayNotifyUrl

func WithPayNotifyUrl(notifyUrl string) Option

func WithPayPrivateKey

func WithPayPrivateKey(privateKey string) Option

func WithPayPrivateKeyFile

func WithPayPrivateKeyFile(privateKeyFile string) Option

type Options

type Options struct {
	MiniProgram
	payments.Options
	// contains filtered or unexported fields
}

type Wechat

type Wechat struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Wechat

func (*Wechat) MiniProgram

func (w *Wechat) MiniProgram() *miniprogram.MiniProgram

func (*Wechat) Notify

func (w *Wechat) Notify() (*notify.Handler, error)

func (*Wechat) Payment

func (w *Wechat) Payment(payType payments.PaymentType) (payments.Payment, error)

func (*Wechat) Provide

func (w *Wechat) Provide() interface{}

func (*Wechat) SetCache

func (w *Wechat) SetCache(cache cache.Cache)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL