paypal

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OtherParam

type OtherParam struct {
	Currency  string
	Content   string
	ReturnUrl string
	CancelUrl string
	LinkRel   string
}

OtherParam 支付其他参数

type SPayPal

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

func (*SPayPal) Client

func (p *SPayPal) Client(ctx context.Context) (*paypal.Client, error)

Client 实例PayPal支付客户端

func (*SPayPal) Config

func (p *SPayPal) Config(config map[string]*gvar.Var) error

Config 获取配置

func (*SPayPal) ConfirmPayment

func (p *SPayPal) ConfirmPayment(ctx context.Context, payNo string) (res *models.ConfirmPayResponse, err error)

ConfirmPayment 回调PayPal创建订单确认订单是否支付成功(很重要,不回调此方法,用户无法完成支付)

func (*SPayPal) Notify

func (p *SPayPal) Notify(ctx context.Context, f func(ctx context.Context, payNo, tradeNo, event string, arg ...interface{}) error) (res *models.PayNotifyResponse, err error)

Notify 回调支付信息

func (*SPayPal) Payment

func (p *SPayPal) Payment(ctx context.Context, tradeNo string, amount float64, other interface{}) (res interface{}, err error)

Payment 使用PayPal支付创建订单

Jump to

Keyboard shortcuts

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