stripe

package
v1.4.5-alpha1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2019 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
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

func (it Payment) ConfigAPIKey() string

ConfigAPIKey is a method that returns the API Key from the db

func (Payment) ConfigIsEnabled

func (it Payment) ConfigIsEnabled() bool

ConfigIsEnabled is a flag to enable/disable this payment module

func (Payment) ConfigNameInCheckout

func (it Payment) ConfigNameInCheckout() string

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) GetCode

func (it *Payment) GetCode() string

GetCode will return the Stripe payment method code

func (*Payment) GetInternalName

func (it *Payment) GetInternalName() string

GetInternalName returns the internal payment method name for Stripe

func (*Payment) GetName

func (it *Payment) GetName() string

GetName returns the payment method name used for Stripe in checkout

func (*Payment) GetType

func (it *Payment) GetType() string

GetType returns the credit card type used for payment

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

func (*Payment) Refund

func (it *Payment) Refund(orderInstance order.InterfaceOrder, paymentInfo map[string]interface{}) (interface{}, error)

Refund is the payment method used to refund a visitor on behalf of a merchant. **This method is for future use**

func (*Payment) Void

func (it *Payment) Void(orderInstance order.InterfaceOrder, paymentInfo map[string]interface{}) (interface{}, error)

Void is the payment method used to cancel a visitor transaction before funds have been collected. **This method is for future use**

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL