Documentation ¶
Index ¶
- Constants
- type Payment
- func (it *Payment) Authorize(orderInstance order.InterfaceOrder, paymentInfo map[string]interface{}) (interface{}, error)
- func (it *Payment) Capture(orderInstance order.InterfaceOrder, paymentInfo map[string]interface{}) (interface{}, error)
- func (it Payment) ConfigAPIKey() string
- func (it Payment) ConfigIsEnabled() bool
- func (it Payment) ConfigNameInCheckout() string
- func (it *Payment) DeleteSavedCard(token visitor.InterfaceVisitorCard) (interface{}, error)
- func (it *Payment) GetCode() string
- func (it *Payment) GetInternalName() string
- func (it *Payment) GetName() string
- func (it *Payment) GetType() string
- func (it *Payment) IsAllowed(checkoutInstance checkout.InterfaceCheckout) bool
- func (it *Payment) IsTokenable(checkoutInstance checkout.InterfaceCheckout) bool
- func (it *Payment) Refund(orderInstance order.InterfaceOrder, paymentInfo map[string]interface{}) (interface{}, error)
- func (it *Payment) Void(orderInstance order.InterfaceOrder, paymentInfo map[string]interface{}) (interface{}, error)
Constants ¶
const ( ConstPaymentCode = "stripe" ConstPaymentName = "Stripe" ConstConfigPathGroup = "payment.stripe" ConstConfigPathEnabled = "payment.stripe.enabled" ConstConfigPathName = "payment.stripe.name" ConstConfigPathAPIKey = "payment.stripe.apiKey" ConstErrorModule = "payment/stripe" )
Stripe package constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Payment ¶
type Payment struct{}
Payment is the struct to hold the payment information for a visitor's order
func (*Payment) Authorize ¶
func (it *Payment) Authorize(orderInstance order.InterfaceOrder, paymentInfo map[string]interface{}) (interface{}, error)
Authorize is the method used to validate a visitor's card and associated address data - it also allows us to create a token for the card - the visitor's card is also authorized for the amount of the order in anticipation of fulfillment
func (*Payment) Capture ¶
func (it *Payment) Capture(orderInstance order.InterfaceOrder, paymentInfo map[string]interface{}) (interface{}, error)
Capture is the payment method used to capture authorized funds. **This method is for future use**
func (Payment) ConfigAPIKey ¶
ConfigAPIKey is a method that returns the API Key from the db
func (Payment) ConfigIsEnabled ¶
ConfigIsEnabled is a flag to enable/disable this payment module
func (Payment) ConfigNameInCheckout ¶
ConfigNameInCheckout is a method that returns the payment method name to be used in checkout
func (*Payment) DeleteSavedCard ¶
func (it *Payment) DeleteSavedCard(token visitor.InterfaceVisitorCard) (interface{}, error)
Delete saved card from the payment system.
func (*Payment) GetInternalName ¶
GetInternalName returns the internal payment method name for Stripe
func (*Payment) IsAllowed ¶
func (it *Payment) IsAllowed(checkoutInstance checkout.InterfaceCheckout) bool
IsAllowed is a flag to check if the Stripe payment method is enabled in the current store
func (*Payment) IsTokenable ¶
func (it *Payment) IsTokenable(checkoutInstance checkout.InterfaceCheckout) bool
IsTokenable is a flag to indicate if the Stripe payment method supports tokens