Documentation ¶
Index ¶
- func NewPostRedirectStateData(url *url.URL, formParameter map[string]FormField) process.StateData
- func NewRedirectStateData(url *url.URL) process.StateData
- func NewShowHTMLStateData(html string) process.StateData
- func NewShowIframeStateData(url *url.URL) process.StateData
- func NewShowWalletPaymentStateData(walletDetails ShowWalletPaymentData) process.StateData
- func NewTriggerClientSDKStateData(url *url.URL, data string) process.StateData
- type CompleteCart
- func (c *CompleteCart) Inject(cartService *application.CartService, ...) *CompleteCart
- func (c CompleteCart) IsFinal() bool
- func (CompleteCart) Name() string
- func (c CompleteCart) Rollback(ctx context.Context, data process.RollbackData) error
- func (c CompleteCart) Run(ctx context.Context, p *process.Process) process.RunResult
- type CompleteCartRollbackData
- type CompletePayment
- func (c *CompletePayment) Inject(paymentService *application.PaymentService) *CompletePayment
- func (c CompletePayment) IsFinal() bool
- func (CompletePayment) Name() string
- func (c CompletePayment) Rollback(ctx context.Context, _ process.RollbackData) error
- func (c CompletePayment) Run(ctx context.Context, p *process.Process) process.RunResult
- type CreatePayment
- func (c *CreatePayment) Inject(paymentService *application.PaymentService) *CreatePayment
- func (c CreatePayment) IsFinal() bool
- func (CreatePayment) Name() string
- func (c CreatePayment) Rollback(ctx context.Context, data process.RollbackData) error
- func (c CreatePayment) Run(ctx context.Context, p *process.Process) process.RunResult
- type CreatePaymentRollbackData
- type Failed
- type FailedEvent
- type FormField
- type New
- type PlaceOrder
- func (po *PlaceOrder) Inject(orderService *application.OrderService, ...) *PlaceOrder
- func (po PlaceOrder) IsFinal() bool
- func (PlaceOrder) Name() string
- func (po PlaceOrder) Rollback(ctx context.Context, data process.RollbackData) error
- func (po PlaceOrder) Run(ctx context.Context, p *process.Process) process.RunResult
- type PlaceOrderRollbackData
- type PostRedirect
- func (pr *PostRedirect) Inject(paymentService *application.PaymentService, ...) *PostRedirect
- func (pr PostRedirect) IsFinal() bool
- func (PostRedirect) Name() string
- func (pr PostRedirect) Rollback(ctx context.Context, _ process.RollbackData) error
- func (pr PostRedirect) Run(ctx context.Context, p *process.Process) process.RunResult
- type PostRedirectData
- type PrepareCart
- func (v *PrepareCart) Inject(cartService *application.CartService) *PrepareCart
- func (v PrepareCart) IsFinal() bool
- func (PrepareCart) Name() string
- func (v PrepareCart) Rollback(context.Context, process.RollbackData) error
- func (v PrepareCart) Run(ctx context.Context, p *process.Process) process.RunResult
- type Redirect
- func (r *Redirect) Inject(paymentService *application.PaymentService, ...) *Redirect
- func (r Redirect) IsFinal() bool
- func (Redirect) Name() string
- func (r Redirect) Rollback(ctx context.Context, _ process.RollbackData) error
- func (r Redirect) Run(ctx context.Context, p *process.Process) process.RunResult
- type ShowHTML
- func (sh *ShowHTML) Inject(paymentService *application.PaymentService, ...) *ShowHTML
- func (sh ShowHTML) IsFinal() bool
- func (ShowHTML) Name() string
- func (sh ShowHTML) Rollback(ctx context.Context, _ process.RollbackData) error
- func (sh ShowHTML) Run(ctx context.Context, p *process.Process) process.RunResult
- type ShowIframe
- func (si *ShowIframe) Inject(paymentService *application.PaymentService, ...) *ShowIframe
- func (si ShowIframe) IsFinal() bool
- func (ShowIframe) Name() string
- func (si ShowIframe) Rollback(ctx context.Context, _ process.RollbackData) error
- func (si ShowIframe) Run(ctx context.Context, p *process.Process) process.RunResult
- type ShowWalletPayment
- func (pr *ShowWalletPayment) Inject(paymentService *application.PaymentService, ...) *ShowWalletPayment
- func (pr ShowWalletPayment) IsFinal() bool
- func (ShowWalletPayment) Name() string
- func (pr ShowWalletPayment) Rollback(ctx context.Context, _ process.RollbackData) error
- func (pr ShowWalletPayment) Run(ctx context.Context, p *process.Process) process.RunResult
- type ShowWalletPaymentData
- type Success
- type SuccessEvent
- type TriggerClientSDK
- func (r *TriggerClientSDK) Inject(paymentService *application.PaymentService, ...) *TriggerClientSDK
- func (r TriggerClientSDK) IsFinal() bool
- func (TriggerClientSDK) Name() string
- func (r TriggerClientSDK) Rollback(_ context.Context, _ process.RollbackData) error
- func (r TriggerClientSDK) Run(ctx context.Context, p *process.Process) process.RunResult
- type TriggerClientSDKData
- type ValidateCart
- func (v *ValidateCart) Inject(cartService *application.CartService) *ValidateCart
- func (v ValidateCart) IsFinal() bool
- func (ValidateCart) Name() string
- func (v ValidateCart) Rollback(context.Context, process.RollbackData) error
- func (v ValidateCart) Run(ctx context.Context, p *process.Process) process.RunResult
- type ValidatePayment
- func (v *ValidatePayment) Inject(paymentService *application.PaymentService, ...) *ValidatePayment
- func (v ValidatePayment) IsFinal() bool
- func (ValidatePayment) Name() string
- func (v ValidatePayment) Rollback(ctx context.Context, _ process.RollbackData) error
- func (v ValidatePayment) Run(ctx context.Context, p *process.Process) process.RunResult
- type ValidatePaymentSelection
- func (v *ValidatePaymentSelection) Inject(cartDecoratorFactory *decorator.DecoratedCartFactory, opts ...) *ValidatePaymentSelection
- func (v ValidatePaymentSelection) IsFinal() bool
- func (ValidatePaymentSelection) Name() string
- func (v ValidatePaymentSelection) Rollback(context.Context, process.RollbackData) error
- func (v ValidatePaymentSelection) Run(ctx context.Context, p *process.Process) process.RunResult
- type WaitForCustomer
- func (wc *WaitForCustomer) Inject(paymentService *application.PaymentService, ...) *WaitForCustomer
- func (wc WaitForCustomer) IsFinal() bool
- func (WaitForCustomer) Name() string
- func (wc WaitForCustomer) Rollback(ctx context.Context, _ process.RollbackData) error
- func (wc WaitForCustomer) Run(ctx context.Context, p *process.Process) process.RunResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostRedirectStateData ¶
NewPostRedirectStateData creates new StateData with (persisted) Data required for this state
func NewRedirectStateData ¶
NewRedirectStateData creates data required for this state
func NewShowHTMLStateData ¶
NewShowHTMLStateData creates new StateData required for this ShowHTML state
func NewShowIframeStateData ¶
NewShowIframeStateData creates new state data for this state
func NewShowWalletPaymentStateData ¶ added in v3.4.0
func NewShowWalletPaymentStateData(walletDetails ShowWalletPaymentData) process.StateData
NewShowWalletPaymentStateData creates new StateData with (persisted) Data required for this state
Types ¶
type CompleteCart ¶
type CompleteCart struct {
// contains filtered or unexported fields
}
CompleteCart state
func (*CompleteCart) Inject ¶
func (c *CompleteCart) Inject( cartService *application.CartService, cartReceiverService *application.CartReceiverService, ) *CompleteCart
Inject dependencies
func (CompleteCart) IsFinal ¶
func (c CompleteCart) IsFinal() bool
IsFinal if state is a final state
func (CompleteCart) Rollback ¶
func (c CompleteCart) Rollback(ctx context.Context, data process.RollbackData) error
Rollback the state operations
type CompleteCartRollbackData ¶
CompleteCartRollbackData for later rollbacks
type CompletePayment ¶
type CompletePayment struct {
// contains filtered or unexported fields
}
CompletePayment state
func (*CompletePayment) Inject ¶
func (c *CompletePayment) Inject( paymentService *application.PaymentService, ) *CompletePayment
Inject dependencies
func (CompletePayment) IsFinal ¶
func (c CompletePayment) IsFinal() bool
IsFinal if state is a final state
func (CompletePayment) Rollback ¶
func (c CompletePayment) Rollback(ctx context.Context, _ process.RollbackData) error
Rollback the state operations
type CreatePayment ¶
type CreatePayment struct {
// contains filtered or unexported fields
}
CreatePayment state
func (*CreatePayment) Inject ¶
func (c *CreatePayment) Inject( paymentService *application.PaymentService, ) *CreatePayment
Inject dependencies
func (CreatePayment) IsFinal ¶
func (c CreatePayment) IsFinal() bool
IsFinal if state is a final state
func (CreatePayment) Rollback ¶
func (c CreatePayment) Rollback(ctx context.Context, data process.RollbackData) error
Rollback the state operations
type CreatePaymentRollbackData ¶
type CreatePaymentRollbackData struct { PaymentID string Gateway string RawTransactionData interface{} }
CreatePaymentRollbackData needed for rollback
type Failed ¶
type Failed struct {
// contains filtered or unexported fields
}
Failed state
func (*Failed) Inject ¶ added in v3.5.0
func (f *Failed) Inject( eventRouter flamingo.EventRouter, ) *Failed
Inject dependencies
type FailedEvent ¶ added in v3.5.0
FailedEvent is dispatched when the final failed state runs
type FormField ¶
type FormField struct {
Value []string
}
FormField represents a form field to be displayed to the user
type PlaceOrder ¶
type PlaceOrder struct {
// contains filtered or unexported fields
}
PlaceOrder state
func (*PlaceOrder) Inject ¶
func (po *PlaceOrder) Inject( orderService *application.OrderService, cartService *cartApplication.CartService, cartDecoratorFactory *decorator.DecoratedCartFactory, paymentService *paymentApplication.PaymentService, cfg *struct { CancelOrdersDuringRollback bool `inject:"config:commerce.checkout.placeorder.states.placeorder.cancelOrdersDuringRollback"` }, ) *PlaceOrder
Inject dependencies
func (PlaceOrder) Rollback ¶
func (po PlaceOrder) Rollback(ctx context.Context, data process.RollbackData) error
Rollback the state operations
type PlaceOrderRollbackData ¶
type PlaceOrderRollbackData struct {
OrderInfos application.PlaceOrderInfo
}
PlaceOrderRollbackData needed for rollbacks
type PostRedirect ¶
type PostRedirect struct {
// contains filtered or unexported fields
}
PostRedirect state
func (*PostRedirect) Inject ¶
func (pr *PostRedirect) Inject( paymentService *application.PaymentService, validator process.PaymentValidatorFunc, ) *PostRedirect
Inject dependencies
func (PostRedirect) IsFinal ¶
func (pr PostRedirect) IsFinal() bool
IsFinal if state is a final state
func (PostRedirect) Rollback ¶
func (pr PostRedirect) Rollback(ctx context.Context, _ process.RollbackData) error
Rollback the state operations
type PostRedirectData ¶
PostRedirectData holds details regarding the redirect
type PrepareCart ¶
type PrepareCart struct {
// contains filtered or unexported fields
}
PrepareCart state
func (*PrepareCart) Inject ¶
func (v *PrepareCart) Inject( cartService *application.CartService, ) *PrepareCart
Inject dependencies
func (PrepareCart) Rollback ¶
func (v PrepareCart) Rollback(context.Context, process.RollbackData) error
Rollback the state operations
type Redirect ¶
type Redirect struct {
// contains filtered or unexported fields
}
Redirect state
func (*Redirect) Inject ¶
func (r *Redirect) Inject( paymentService *application.PaymentService, validator process.PaymentValidatorFunc, ) *Redirect
Inject dependencies
type ShowHTML ¶
type ShowHTML struct {
// contains filtered or unexported fields
}
ShowHTML state
func (*ShowHTML) Inject ¶
func (sh *ShowHTML) Inject( paymentService *application.PaymentService, validator process.PaymentValidatorFunc, ) *ShowHTML
Inject dependencies
type ShowIframe ¶
type ShowIframe struct {
// contains filtered or unexported fields
}
ShowIframe state
func (*ShowIframe) Inject ¶
func (si *ShowIframe) Inject( paymentService *application.PaymentService, validator process.PaymentValidatorFunc, ) *ShowIframe
Inject dependencies
func (ShowIframe) Rollback ¶
func (si ShowIframe) Rollback(ctx context.Context, _ process.RollbackData) error
Rollback the state operations
type ShowWalletPayment ¶ added in v3.4.0
type ShowWalletPayment struct {
// contains filtered or unexported fields
}
ShowWalletPayment state
func (*ShowWalletPayment) Inject ¶ added in v3.4.0
func (pr *ShowWalletPayment) Inject( paymentService *application.PaymentService, validator process.PaymentValidatorFunc, ) *ShowWalletPayment
Inject dependencies
func (ShowWalletPayment) IsFinal ¶ added in v3.4.0
func (pr ShowWalletPayment) IsFinal() bool
IsFinal if state is a final state
func (ShowWalletPayment) Name ¶ added in v3.4.0
func (ShowWalletPayment) Name() string
Name get state name
func (ShowWalletPayment) Rollback ¶ added in v3.4.0
func (pr ShowWalletPayment) Rollback(ctx context.Context, _ process.RollbackData) error
Rollback the state operations
type ShowWalletPaymentData ¶ added in v3.4.0
type ShowWalletPaymentData domain.WalletDetails
ShowWalletPaymentData holds details regarding the wallet payment
type Success ¶
type Success struct {
// contains filtered or unexported fields
}
Success state
func (*Success) Inject ¶ added in v3.5.0
func (s *Success) Inject( eventRouter flamingo.EventRouter, ) *Success
Inject dependencies
type SuccessEvent ¶ added in v3.5.0
SuccessEvent is dispatched when the final success state runs
type TriggerClientSDK ¶ added in v3.5.0
type TriggerClientSDK struct {
// contains filtered or unexported fields
}
TriggerClientSDK state
func (*TriggerClientSDK) Inject ¶ added in v3.5.0
func (r *TriggerClientSDK) Inject( paymentService *application.PaymentService, validator process.PaymentValidatorFunc, ) *TriggerClientSDK
Inject dependencies
func (TriggerClientSDK) IsFinal ¶ added in v3.5.0
func (r TriggerClientSDK) IsFinal() bool
IsFinal if state is a final state
func (TriggerClientSDK) Name ¶ added in v3.5.0
func (TriggerClientSDK) Name() string
Name get state name
func (TriggerClientSDK) Rollback ¶ added in v3.5.0
func (r TriggerClientSDK) Rollback(_ context.Context, _ process.RollbackData) error
Rollback the state operations
type TriggerClientSDKData ¶ added in v3.6.0
TriggerClientSDKData holds the data which must be sent to the client via SDK
type ValidateCart ¶
type ValidateCart struct {
// contains filtered or unexported fields
}
ValidateCart state
func (*ValidateCart) Inject ¶
func (v *ValidateCart) Inject( cartService *application.CartService, ) *ValidateCart
Inject dependencies
func (ValidateCart) IsFinal ¶
func (v ValidateCart) IsFinal() bool
IsFinal if state is a final state
func (ValidateCart) Rollback ¶
func (v ValidateCart) Rollback(context.Context, process.RollbackData) error
Rollback the state operations
type ValidatePayment ¶
type ValidatePayment struct {
// contains filtered or unexported fields
}
ValidatePayment state
func (*ValidatePayment) Inject ¶
func (v *ValidatePayment) Inject( paymentService *application.PaymentService, validator process.PaymentValidatorFunc, ) *ValidatePayment
Inject dependencies
func (ValidatePayment) IsFinal ¶
func (v ValidatePayment) IsFinal() bool
IsFinal if state is a final state
func (ValidatePayment) Rollback ¶
func (v ValidatePayment) Rollback(ctx context.Context, _ process.RollbackData) error
Rollback the state operations
type ValidatePaymentSelection ¶ added in v3.3.0
type ValidatePaymentSelection struct {
// contains filtered or unexported fields
}
ValidatePaymentSelection state
func (*ValidatePaymentSelection) Inject ¶ added in v3.3.0
func (v *ValidatePaymentSelection) Inject( cartDecoratorFactory *decorator.DecoratedCartFactory, opts *struct { Validator validation.PaymentSelectionValidator `inject:",optional"` }, ) *ValidatePaymentSelection
Inject dependencies
func (ValidatePaymentSelection) IsFinal ¶ added in v3.3.0
func (v ValidatePaymentSelection) IsFinal() bool
IsFinal if state is a final state
func (ValidatePaymentSelection) Name ¶ added in v3.3.0
func (ValidatePaymentSelection) Name() string
Name get state name
func (ValidatePaymentSelection) Rollback ¶ added in v3.3.0
func (v ValidatePaymentSelection) Rollback(context.Context, process.RollbackData) error
Rollback the state operations
type WaitForCustomer ¶
type WaitForCustomer struct {
// contains filtered or unexported fields
}
WaitForCustomer state
func (*WaitForCustomer) Inject ¶
func (wc *WaitForCustomer) Inject( paymentService *application.PaymentService, validator process.PaymentValidatorFunc, ) *WaitForCustomer
Inject dependencies
func (WaitForCustomer) IsFinal ¶
func (wc WaitForCustomer) IsFinal() bool
IsFinal if state is a final state
func (WaitForCustomer) Rollback ¶
func (wc WaitForCustomer) Rollback(ctx context.Context, _ process.RollbackData) error
Rollback the state operations
Source Files ¶
- complete_cart.go
- complete_payment.go
- create_payment.go
- failed.go
- new.go
- place_order.go
- post_redirect.go
- prepare_cart.go
- redirect.go
- show_html.go
- show_iframe.go
- show_wallet_payment.go
- success.go
- trigger_client_sdk.go
- validate_cart.go
- validate_payment.go
- validate_payment_selection.go
- wait_for_customer.go