Documentation
¶
Index ¶
- 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)
- func (a *Adapter) Snapshot() Snapshot
- type Option
- func WithAction(action payment.PaymentAction) Option
- func WithActions(actions ...payment.ActionType) Option
- func WithAllCoreCapabilities() Option
- func WithCapabilities(caps payment.Capabilities) Option
- func WithChannels(channels ...payment.Channel) Option
- func WithClosePayment(fn func(context.Context, payment.ClosePaymentRequest) error) Option
- func WithCreatePayment(...) Option
- func WithCurrencies(currencies ...string) Option
- func WithParseNotify(fn func(context.Context, payment.NotifyRequest) (*payment.NotifyResult, error)) Option
- func WithQueryPayment(...) Option
- func WithQueryRefund(...) Option
- func WithRefund(...) Option
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
CreateRequests []payment.CreatePaymentRequest
QueryRequests []payment.QueryPaymentRequest
CloseRequests []payment.ClosePaymentRequest
RefundRequests []payment.RefundRequest
QueryRefundRequests []payment.QueryRefundRequest
NotifyRequests []payment.NotifyRequest
// 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 Option ¶
type Option func(*Adapter)
func WithAction ¶
func WithAction(action payment.PaymentAction) Option
func WithActions ¶
func WithActions(actions ...payment.ActionType) Option
func WithAllCoreCapabilities ¶
func WithAllCoreCapabilities() Option
func WithCapabilities ¶
func WithCapabilities(caps payment.Capabilities) Option
func WithChannels ¶
func WithClosePayment ¶
func WithCreatePayment ¶
func WithCreatePayment(fn func(context.Context, payment.CreatePaymentRequest) (*payment.CreatePaymentResponse, error)) Option
func WithCurrencies ¶
func WithParseNotify ¶
func WithParseNotify(fn func(context.Context, payment.NotifyRequest) (*payment.NotifyResult, error)) Option
func WithQueryPayment ¶
func WithQueryPayment(fn func(context.Context, payment.QueryPaymentRequest) (*payment.QueryPaymentResponse, error)) Option
func WithQueryRefund ¶
func WithQueryRefund(fn func(context.Context, payment.QueryRefundRequest) (*payment.QueryRefundResponse, error)) Option
func WithRefund ¶
func WithRefund(fn func(context.Context, payment.RefundRequest) (*payment.RefundResponse, error)) Option
type Snapshot ¶
type Snapshot struct {
CreateRequests []payment.CreatePaymentRequest
QueryRequests []payment.QueryPaymentRequest
CloseRequests []payment.ClosePaymentRequest
RefundRequests []payment.RefundRequest
QueryRefundRequests []payment.QueryRefundRequest
NotifyRequests []payment.NotifyRequest
}
Click to show internal directories.
Click to hide internal directories.