paymentHandler

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: GPL-3.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalField added in v1.3.0

type AdditionalField struct {
	User     string `json:"user"`
	Question string `json:"question"`
	Answer   string `json:"answer"`
}

type ErrOrderDoesNotExist

type ErrOrderDoesNotExist struct {
	Message string
}

ErrOrderDoesNotExist is a custom error to signify the order does not exist in the database

func (ErrOrderDoesNotExist) Error

func (e ErrOrderDoesNotExist) Error() string

type ErrPaymentFailed

type ErrPaymentFailed struct {
	Message string
}

ErrPaymentFailed is a custom error to signify the payment failed

func (ErrPaymentFailed) Error

func (e ErrPaymentFailed) Error() string

type Field added in v1.2.0

type Field struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Order

type Order struct {
	ConcertID        string            `json:"concertID"`
	OrderReference   string            `json:"orderReference"`
	FirstName        string            `json:"firstName"`
	LastName         string            `json:"lastName"`
	Email            string            `json:"email"`
	NumOfFullPrice   uint8             `json:"numOfFullPrice"`
	NumOfConcessions uint8             `json:"numOfConcessions"`
	OrderStatus      string            `json:"orderStatus"`
	AdditionalFields []AdditionalField `json:"additionalFields"`
}

type OrderLine

type OrderLine struct {
	ConcertID        string            `json:"concertID"`
	NumOfFullPrice   *uint8            `json:"numOfFullPrice"`
	NumOfConcessions *uint8            `json:"numOfConcessions"`
	AdditionalFields []AdditionalField `json:"additionalFields"`
}

type PaymentHandler

type PaymentHandler interface {
	Process(balance float32, reference string) (clientSecret string, err error)
}

type PaymentRequest

type PaymentRequest struct {
	OrderLines []OrderLine `json:"orderLines"`
	FirstName  string      `json:"firstName"`
	LastName   string      `json:"lastName"`
	Email      string      `json:"email"`
}

PaymentRequest is a struct representing the json object passed to the lambda containing ticket and payment details

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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