paymentHandler

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 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 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 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"`
}

type OrderLine

type OrderLine struct {
	ConcertID        string `json:"concertID"`
	NumOfFullPrice   *uint8 `json:"numOfFullPrice"`
	NumOfConcessions *uint8 `json:"numOfConcessions"`
}

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