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
- type ZeroAmountPayment
- func (it *ZeroAmountPayment) Authorize(orderInstance order.InterfaceOrder, paymentInfo map[string]interface{}) (interface{}, error)
- func (it *ZeroAmountPayment) Capture(orderInstance order.InterfaceOrder, paymentInfo map[string]interface{}) (interface{}, error)
- func (it *ZeroAmountPayment) DeleteSavedCard(token visitor.InterfaceVisitorCard) (interface{}, error)
- func (it *ZeroAmountPayment) GetCode() string
- func (it ZeroAmountPayment) GetInternalName() string
- func (it *ZeroAmountPayment) GetName() string
- func (it *ZeroAmountPayment) GetType() string
- func (it *ZeroAmountPayment) IsAllowed(checkoutInstance checkout.InterfaceCheckout) bool
- func (it *ZeroAmountPayment) IsTokenable(checkoutInstance checkout.InterfaceCheckout) bool
- func (it *ZeroAmountPayment) Refund(orderInstance order.InterfaceOrder, paymentInfo map[string]interface{}) (interface{}, error)
- func (it *ZeroAmountPayment) Void(orderInstance order.InterfaceOrder, paymentInfo map[string]interface{}) (interface{}, error)
Constants ¶
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