Documentation
¶
Index ¶
- Constants
- type Adapter
- func (a *Adapter) Capabilities() payment.Capabilities
- func (a *Adapter) ClosePayment(ctx context.Context, req payment.ClosePaymentRequest) error
- func (a *Adapter) CreatePayment(ctx context.Context, req payment.CreatePaymentRequest) (*payment.CreatePaymentResponse, error)
- func (a *Adapter) Name() payment.Provider
- func (a *Adapter) ParseNotify(ctx context.Context, req payment.NotifyRequest) (*payment.NotifyResult, error)
- func (a *Adapter) QueryPayment(ctx context.Context, req payment.QueryPaymentRequest) (*payment.QueryPaymentResponse, error)
- func (a *Adapter) QueryRefund(ctx context.Context, req payment.QueryRefundRequest) (*payment.QueryRefundResponse, error)
- func (a *Adapter) Refund(ctx context.Context, req payment.RefundRequest) (*payment.RefundResponse, error)
- type CloseGateway
- type Config
- type Gateway
- type NotifyGateway
- type QueryGateway
- type QueryRefundGateway
- type RefundGateway
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 (*Adapter) Capabilities ¶
func (a *Adapter) Capabilities() payment.Capabilities
func (*Adapter) ClosePayment ¶
func (*Adapter) CreatePayment ¶
func (a *Adapter) CreatePayment(ctx context.Context, req payment.CreatePaymentRequest) (*payment.CreatePaymentResponse, error)
func (*Adapter) ParseNotify ¶
func (a *Adapter) ParseNotify(ctx context.Context, req payment.NotifyRequest) (*payment.NotifyResult, error)
func (*Adapter) QueryPayment ¶
func (a *Adapter) QueryPayment(ctx context.Context, req payment.QueryPaymentRequest) (*payment.QueryPaymentResponse, error)
func (*Adapter) QueryRefund ¶
func (a *Adapter) QueryRefund(ctx context.Context, req payment.QueryRefundRequest) (*payment.QueryRefundResponse, error)
func (*Adapter) Refund ¶
func (a *Adapter) Refund(ctx context.Context, req payment.RefundRequest) (*payment.RefundResponse, error)
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)
}
Click to show internal directories.
Click to hide internal directories.