Documentation ¶
Index ¶
- type PaymentService
- func (ps *PaymentService) AvailablePaymentGateways() map[string]interfaces.WebCartPaymentGateway
- func (ps *PaymentService) Inject(webCartPaymentGatewayProvider interfaces.WebCartPaymentGatewayProvider)
- func (ps *PaymentService) PaymentGateway(paymentGatewayCode string) (interfaces.WebCartPaymentGateway, error)
- func (ps *PaymentService) PaymentGatewayByCart(cart cart.Cart) (interfaces.WebCartPaymentGateway, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PaymentService ¶
type PaymentService struct {
// contains filtered or unexported fields
}
PaymentService defines the payment service
func (*PaymentService) AvailablePaymentGateways ¶
func (ps *PaymentService) AvailablePaymentGateways() map[string]interfaces.WebCartPaymentGateway
AvailablePaymentGateways returns the list of registered WebCartPaymentGateway
func (*PaymentService) Inject ¶
func (ps *PaymentService) Inject( webCartPaymentGatewayProvider interfaces.WebCartPaymentGatewayProvider, )
Inject dependencies
func (*PaymentService) PaymentGateway ¶
func (ps *PaymentService) PaymentGateway(paymentGatewayCode string) (interfaces.WebCartPaymentGateway, error)
PaymentGateway tries to get the supplied payment gateway by code from the registered payment gateways
func (*PaymentService) PaymentGatewayByCart ¶
func (ps *PaymentService) PaymentGatewayByCart(cart cart.Cart) (interfaces.WebCartPaymentGateway, error)
PaymentGatewayByCart tries to get the payment gateway from the supllied cart
Click to show internal directories.
Click to hide internal directories.