checkout

package
v0.9.33 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkout

type Checkout struct {
	// contains filtered or unexported fields
}

func NewCheckout

func NewCheckout(secretKey string, publicKey *string, environment string, webhookSecrets map[string]string) *Checkout

func (*Checkout) CheckWebhookKey

func (c *Checkout) CheckWebhookKey(keyCode, key string) bool

func (*Checkout) DeleteCustomerInstrument added in v0.9.20

func (c *Checkout) DeleteCustomerInstrument(instrumentId string) bool

func (*Checkout) GetCustomerInstruments added in v0.9.20

func (c *Checkout) GetCustomerInstruments(customerId string) *CustomerResponse

func (*Checkout) RequestPayment

func (c *Checkout) RequestPayment(source interface{}, amount uint64, currency string, reference string, customer *payments.Customer, metadata map[string]string) *payments.Response

func (*Checkout) RequestRefunds added in v0.9.16

func (c *Checkout) RequestRefunds(amount uint64, reference string, metadata map[string]string) *payments.RefundsResponse

type CustomerResponse added in v0.9.20

type CustomerResponse struct {
	ID          string       `json:"id"`
	Instruments []Instrument `json:"instruments"`
}

type ICheckout

type ICheckout interface {
	CheckWebhookKey(keyCode, key string) bool
	RequestPayment(source interface{}, amount uint64, currency string, reference string, customer *payments.Customer, metadata map[string]string) *payments.Response
	RequestRefunds(amount uint64, reference string, metadata map[string]string) *payments.RefundsResponse
	GetCustomerInstruments(customerId string) *CustomerResponse
	DeleteCustomerInstrument(instrumentId string) bool
}

type Instrument added in v0.9.20

type Instrument struct {
	ID            string `json:"id"`
	Type          string `json:"type"`
	Fingerprint   string `json:"fingerprint"`
	ExpiryMonth   int    `json:"expiry_month"`
	ExpiryYear    int    `json:"expiry_year"`
	Name          string `json:"name"`
	Scheme        string `json:"scheme"`
	Last4         string `json:"last4"`
	Bin           string `json:"bin"`
	CardType      string `json:"card_type"`
	CardCategory  string `json:"card_category"`
	Issuer        string `json:"issuer"`
	IssuerCountry string `json:"issuer_country"`
	ProductID     string `json:"product_id"`
	ProductType   string `json:"product_type"`
	AccountHolder struct {
		BillingAddress struct {
			AddressLine1 string `json:"address_line1"`
			AddressLine2 string `json:"address_line2"`
			City         string `json:"city"`
			State        string `json:"state"`
			Zip          string `json:"zip"`
			Country      string `json:"country"`
		} `json:"billing_address"`
		Phone struct {
			CountryCode string `json:"country_code"`
			Number      string `json:"number"`
		} `json:"phone"`
	} `json:"account_holder"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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