Documentation ¶
Index ¶
- Constants
- func NewBrainTreePaymentGateway(cfg map[string]interface{}) (*brainTreePaymentGateway, error)
- func NewPaddlePaymentGateway(cfg map[string]interface{}) (*paddlePaymentGateway, error)
- func NewSSLCommerzPaymentGateway(cfg map[string]interface{}) (*sslCommerzPaymentGateway, error)
- func NewStripePaymentGateway(cfg map[string]interface{}) (*stripePaymentGateway, error)
- func NewTwoCheckoutPaymentGateway(cfg map[string]interface{}) (*twoCheckoutPaymentGateway, error)
- func SetActivePaymentGateway(cfg config.PaymentGatewayCfg) error
- type BrainTreeTransactionType
- type PaymentGateway
- type PaymentGatewayResponse
Constants ¶
View Source
const (
BrainTreePaymentGatewayName = "brain_tree"
)
View Source
const (
PaddlePaymentGatewayName = "paddle"
)
View Source
const (
SSLCommerzPaymentGatewayName = "ssl"
)
View Source
const (
StripePaymentGatewayName = "stripe"
)
View Source
const (
TwoCheckoutPaymentGatewayName = "2co"
)
Variables ¶
This section is empty.
Functions ¶
func NewPaddlePaymentGateway ¶
func NewStripePaymentGateway ¶
func SetActivePaymentGateway ¶
func SetActivePaymentGateway(cfg config.PaymentGatewayCfg) error
Types ¶
type BrainTreeTransactionType ¶
type BrainTreeTransactionType string
const (
Sale BrainTreeTransactionType = "sale"
)
type PaymentGateway ¶
type PaymentGateway interface { GetName() string GetConfig() (map[string]interface{}, error) Pay(orderDetails *models.OrderDetailsView) (*PaymentGatewayResponse, error) ValidateTransaction(orderDetails *models.OrderDetailsView) error VoidTransaction(orderDetails *models.OrderDetailsView, params map[string]interface{}) error DisplayName() string }
func GetActivePaymentGateway ¶
func GetActivePaymentGateway() PaymentGateway
func GetPaymentGatewayByName ¶
func GetPaymentGatewayByName(name string) (PaymentGateway, error)
type PaymentGatewayResponse ¶
Click to show internal directories.
Click to hide internal directories.