Documentation ¶
Index ¶
- Constants
- type FakeGateway
- func (g *FakeGateway) CancelOrderPayment(ctx context.Context, cartPayment *placeorder.Payment) error
- func (g *FakeGateway) ConfirmResult(ctx context.Context, cart *cart.Cart, cartPayment *placeorder.Payment) error
- func (g *FakeGateway) FlowStatus(ctx context.Context, cart *cart.Cart, correlationID string) (*domain.FlowStatus, error)
- func (g *FakeGateway) Inject() *FakeGateway
- func (g *FakeGateway) Methods() []domain.Method
- func (g *FakeGateway) OrderPaymentFromFlow(ctx context.Context, cart *cart.Cart, correlationID string) (*placeorder.Payment, error)
- func (g *FakeGateway) StartFlow(ctx context.Context, cart *cart.Cart, correlationID string, returnURL *url.URL) (*domain.FlowResult, error)
- type Method
- type Module
Constants ¶
View Source
const (
// FakePaymentGateway gateway code
FakePaymentGateway = "fake_payment_gateway"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeGateway ¶
FakeGateway used for testing all payment states
func (*FakeGateway) CancelOrderPayment ¶
func (g *FakeGateway) CancelOrderPayment(ctx context.Context, cartPayment *placeorder.Payment) error
CancelOrderPayment does nothing
func (*FakeGateway) ConfirmResult ¶
func (g *FakeGateway) ConfirmResult(ctx context.Context, cart *cart.Cart, cartPayment *placeorder.Payment) error
ConfirmResult mark payment as completed
func (*FakeGateway) FlowStatus ¶
func (g *FakeGateway) FlowStatus(ctx context.Context, cart *cart.Cart, correlationID string) (*domain.FlowStatus, error)
FlowStatus returns a payment with a state depending on the supplied payment method
func (*FakeGateway) Methods ¶
func (g *FakeGateway) Methods() []domain.Method
Methods returns all payment gateway methods
func (*FakeGateway) OrderPaymentFromFlow ¶
func (g *FakeGateway) OrderPaymentFromFlow(ctx context.Context, cart *cart.Cart, correlationID string) (*placeorder.Payment, error)
OrderPaymentFromFlow return fake payment
Click to show internal directories.
Click to hide internal directories.