payment

package
v0.0.0-...-8b0bed9 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PAYMENT_STATUS_UNKNOWN   PaymentStatus = ""
	PAYMENT_STATUS_PENDING   PaymentStatus = "PENDING"
	PAYMENT_STATUS_APPROVED  PaymentStatus = "APPROVED"
	PAYMENT_STATUS_COMPLETED PaymentStatus = "COMPLETED"
	PAYMENT_STATUS_CANCELED  PaymentStatus = "CANCELED"
	PAYMENT_STATUS_FAILED    PaymentStatus = "FAILED"

	PAYMENT_SOURCE_UNKNOWN   PaymentSource = ""
	PAYMENT_SOURCE_ONLINE    PaymentSource = "ONLINE"
	PAYMENT_SOURCE_IN_PERSON PaymentSource = "IN_PERSON"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Payment

type Payment struct {
	EmailAddress      string          `json:"emailAddress" firestore:"emailAddress"`
	Expiration        time.Time       `json:"expiration" firestore:"expiration"`
	FeeAmount         float64         `json:"feeAmount" firestore:"feeAmount"`
	FirstName         string          `json:"firstName" firestore:"firstName"`
	LastName          string          `json:"lastName" firestore:"lastName"`
	ID                string          `json:"id" firestore:"id"`
	IdempotencyKeys   map[string]bool `json:"idempotencyKeys" firestore:"idempotencyKeys"`
	Note              string          `json:"note" firestore:"note"`
	ReceiptURL        string          `json:"receiptURL" firestore:"receiptURL"`
	RefundAmount      float64         `json:"refundAmount,omitempty" firestore:"refundAmount"`
	Source            PaymentSource   `json:"source" firestore:"source"`
	SquareCustomerID  string          `json:"squareCustomerID" firestore:"squareCustomerID"`
	SquareOrderID     string          `json:"squareOrderID" firestore:"squareOrderID"`
	SquareRefundIDs   []string        `json:"squareRefundIDs" firestore:"squareRefundIDs"`
	SquareUpdatedTime time.Time       `json:"squareUpdatedTime" firestore:"squareUpdatedTime"`
	Status            PaymentStatus   `json:"status" firestore:"status"`
	TipAmount         float64         `json:"tipAmount" firestore:"tipAmount"`
	TotalAmount       float64         `json:"totalAmount" firestore:"totalAmount"`
}

func CreateInternalPaymentFromSquarePayment

func CreateInternalPaymentFromSquarePayment(squarePayment models.Payment) (*Payment, error)

type PaymentSource

type PaymentSource string

type PaymentStatus

type PaymentStatus string

Jump to

Keyboard shortcuts

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