aggregate

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ExtraGatewayKey = "gateway"

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

func New

func New(cfg Config) (*Adapter, error)

func (*Adapter) Capabilities

func (a *Adapter) Capabilities() payment.Capabilities

func (*Adapter) ClosePayment

func (a *Adapter) ClosePayment(ctx context.Context, req payment.ClosePaymentRequest) error

func (*Adapter) CreatePayment

func (*Adapter) Name

func (a *Adapter) Name() payment.Provider

func (*Adapter) ParseNotify

func (a *Adapter) ParseNotify(ctx context.Context, req payment.NotifyRequest) (*payment.NotifyResult, error)

func (*Adapter) QueryPayment

func (*Adapter) QueryRefund

func (*Adapter) Refund

type CloseGateway

type CloseGateway interface {
	ClosePayment(ctx context.Context, req payment.ClosePaymentRequest) error
}

type Config

type Config struct {
	DefaultGateway string
	Gateways       map[string]Gateway
	Capabilities   payment.Capabilities
}

type Gateway

type Gateway interface {
	CreatePayment(ctx context.Context, req payment.CreatePaymentRequest) (*payment.CreatePaymentResponse, error)
}

type NotifyGateway

type NotifyGateway interface {
	ParseNotify(ctx context.Context, req payment.NotifyRequest) (*payment.NotifyResult, error)
}

type QueryGateway

type QueryGateway interface {
	QueryPayment(ctx context.Context, req payment.QueryPaymentRequest) (*payment.QueryPaymentResponse, error)
}

type QueryRefundGateway

type QueryRefundGateway interface {
	QueryRefund(ctx context.Context, req payment.QueryRefundRequest) (*payment.QueryRefundResponse, error)
}

type RefundGateway

type RefundGateway interface {
	Refund(ctx context.Context, req payment.RefundRequest) (*payment.RefundResponse, error)
}

Jump to

Keyboard shortcuts

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