zeropay

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: 5 Imported by: 0

Documentation

Overview

Package zeropay is a "Zero Payment" implementation of payment method interface declared in "github.com/ottemo/commerce/app/models/checkout" package

Index

Constants

View Source
const (
	ConstPaymentZeroPaymentCode = "zeropay"
	ConstPaymentName            = "Zero Pay"

	ConstConfigPathGroup   = "payment.zeropay"
	ConstConfigPathEnabled = "payment.zeropay.enabled"
	ConstConfigPathName    = "payment.zeropay.name"

	ConstErrorModule = "payment/zeropay"
	ConstErrorLevel  = env.ConstErrorLevelActor
)

Package global constants

Variables

This section is empty.

Functions

This section is empty.

Types

type ZeroAmountPayment

type ZeroAmountPayment struct{}

ZeroAmountPayment is a implementer of InterfacePaymentMethod for zero amount payments

func (*ZeroAmountPayment) Authorize

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

Authorize makes payment method authorize operation

func (*ZeroAmountPayment) Capture

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

Capture makes payment method capture operation

func (*ZeroAmountPayment) DeleteSavedCard

func (it *ZeroAmountPayment) DeleteSavedCard(token visitor.InterfaceVisitorCard) (interface{}, error)

Delete saved card from the payment system. **This method is for future use**

func (*ZeroAmountPayment) GetCode

func (it *ZeroAmountPayment) GetCode() string

GetCode returns payment method code

func (ZeroAmountPayment) GetInternalName

func (it ZeroAmountPayment) GetInternalName() string

GetInternalName returns the name of the payment method

func (*ZeroAmountPayment) GetName

func (it *ZeroAmountPayment) GetName() string

GetName returns the user customized name of the payment method

func (*ZeroAmountPayment) GetType

func (it *ZeroAmountPayment) GetType() string

GetType returns type of payment method

func (*ZeroAmountPayment) IsAllowed

func (it *ZeroAmountPayment) IsAllowed(checkoutInstance checkout.InterfaceCheckout) bool

IsAllowed checks for method applicability

func (*ZeroAmountPayment) IsTokenable

func (it *ZeroAmountPayment) IsTokenable(checkoutInstance checkout.InterfaceCheckout) bool

IsTokenable checks for method applicability

func (*ZeroAmountPayment) Refund

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

Refund makes payment method refund operation

func (*ZeroAmountPayment) Void

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

Void makes payment method void operation

Jump to

Keyboard shortcuts

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