alipay

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProductCodeQuickMsecurityPay   = "QUICK_MSECURITY_PAY"    // 无线快捷支付
	ProductCodeCyclePayAuth        = "CYCLE_PAY_AUTH"         // 周期扣款产品
	ProductCodeFastInstantTradePay = "FAST_INSTANT_TRADE_PAY" // pc 网页端支付的支付方式
)
View Source
const (
	PayStatusTradeSuccess  = "TRADE_SUCCESS"  // 交易成功
	PayStatusTradeClose    = "TRADE_CLOSED"   // 交易关闭
	PayStatusTradeFinished = "TRADE_FINISHED" // 交易完成(不可退款)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Alipay

type Alipay struct {
	*alipay.Client
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Alipay

func (*Alipay) Init

func (pay *Alipay) Init() error

func (*Alipay) Provide

func (pay *Alipay) Provide(ctx context.Context) interface{}

type Option

type Option func(*Options)

func WithAliPublicCert

func WithAliPublicCert(publicCert string) Option

func WithAliPublicCertFile

func WithAliPublicCertFile(publicCertFile string) Option

func WithAliRootCert

func WithAliRootCert(rootCert string) Option

func WithAliRootCertFile

func WithAliRootCertFile(rootCertFile string) Option

func WithAppId

func WithAppId(appId string) Option

func WithAppPublicCert

func WithAppPublicCert(publicCert string) Option

func WithAppPublicCertFile

func WithAppPublicCertFile(publicCertFile string) Option

func WithIsProduct

func WithIsProduct(isProduct bool) Option

func WithPrivateKey

func WithPrivateKey(privateKey string) Option

type Options

type Options struct {
	AppId             string
	PrivateKey        string
	AppPublicCert     string
	AppPublicCertFile string
	AliRootCert       string
	AliRootCertFile   string
	AliPublicCert     string
	AliPublicCertFile string
	IsProduct         bool
}

Jump to

Keyboard shortcuts

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