entities

package
v0.0.0-...-307a5c9 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreditCard

type CreditCard struct {
	Number      string `json:"number"`
	Name        string `json:"name"`
	ExpireMonth int    `json:"expire_month"`
	ExpireYear  int    `json:"expire_year"`
	CVV         int    `json:"cvv"`
}

type Merchant

type Merchant struct {
	ID       uuid.UUID
	Username string
	Password string
	Name     string
	Active   bool
	MaxQPS   int
}

type Payment

type Payment struct {
	ID               uuid.UUID  `json:"id"`
	MerchantID       uuid.UUID  `json:"merchant_id"`
	Amount           float64    `json:"amount"`
	Currency         string     `json:"currency"`
	PurchaseTime     time.Time  `json:"purchase_time"`
	ValidationMethod string     `json:"validation_method"`
	Card             CreditCard `json:"card"`
	Metadata         string     `json:"metadata"`
	Status           string     `json:"status"`
	BankPaymentID    uuid.UUID  `json:"bank_payment_id"`
	BankRequestTime  time.Time  `json:"bank_request_time"`
	BankResponseTime time.Time  `json:"bank_response_time"`
	BankMessage      string     `json:"bank_message"`
}

func (Payment) GetBankRequestTimeStr

func (p Payment) GetBankRequestTimeStr() string

func (Payment) GetBankResponseTimeStr

func (p Payment) GetBankResponseTimeStr() string

func (Payment) GetPurchaseTimeStr

func (p Payment) GetPurchaseTimeStr() string

type PaymentStatus

type PaymentStatus int
const (
	Created PaymentStatus = iota
	Pending
	Success
	Fail
)

func (PaymentStatus) String

func (ps PaymentStatus) String() string

Jump to

Keyboard shortcuts

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