paymentservice

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreditCardInfo

type CreditCardInfo struct {
	weaver.AutoMarshal
	Number          string
	CVV             int32
	ExpirationYear  int
	ExpirationMonth time.Month
}

func (CreditCardInfo) LastFour

func (c CreditCardInfo) LastFour() string

LastFour returns the last four digits of the card number.

func (*CreditCardInfo) WeaverMarshal

func (x *CreditCardInfo) WeaverMarshal(enc *codegen.Encoder)

func (*CreditCardInfo) WeaverUnmarshal

func (x *CreditCardInfo) WeaverUnmarshal(dec *codegen.Decoder)

type ExpiredCreditCardErr

type ExpiredCreditCardErr struct{}

func (ExpiredCreditCardErr) Error

func (e ExpiredCreditCardErr) Error() string

type InvalidCreditCardErr

type InvalidCreditCardErr struct{}

func (InvalidCreditCardErr) Error

func (e InvalidCreditCardErr) Error() string

type T

type T interface {
	Charge(ctx context.Context, amount money.T, card CreditCardInfo) (string, error)
}

type UnacceptedCreditCardErr

type UnacceptedCreditCardErr struct{}

func (UnacceptedCreditCardErr) Error

func (e UnacceptedCreditCardErr) Error() string

Jump to

Keyboard shortcuts

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