domain

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    string         `json:"code"`
	Message string         `json:"message"`
	Status  int            `json:"-"`
	Details map[string]any `json:"details,omitempty"`
}

func AmbiguousMatch

func AmbiguousMatch() *Error

func CapacityExhausted

func CapacityExhausted() *Error

func IdempotencyConflict

func IdempotencyConflict() *Error

func InvalidAmount

func InvalidAmount() *Error

func InvalidExternalID

func InvalidExternalID() *Error

func InvalidIdempotencyKey

func InvalidIdempotencyKey() *Error

func InvalidMetadata

func InvalidMetadata() *Error

func InvalidSMS

func InvalidSMS(message string) *Error

func New

func New(code, message string, status int) *Error

func PaymentNotFound

func PaymentNotFound() *Error

func PaymentResolved

func PaymentResolved(status string) *Error

func (*Error) Error

func (e *Error) Error() string

type ParsedSMS

type ParsedSMS struct {
	AmountPaise int64
	RRN         string
	UPIId       string
	PayerName   string
	OccurredAt  time.Time
}

type Payment

type Payment struct {
	ID             string
	RequestedPaise int64
	PayablePaise   int64
	Status         PaymentStatus
	ExpiresAt      time.Time
	ReuseAfter     time.Time
	RRN            string
	UPIId          string
	PayerName      string
	PaidAt         time.Time
	ResolvedAt     time.Time
	ExternalID     string
	IdempotencyKey string
}

type PaymentStatus

type PaymentStatus string
const (
	StatusPending   PaymentStatus = "pending"
	StatusPaid      PaymentStatus = "paid"
	StatusExpired   PaymentStatus = "expired"
	StatusCancelled PaymentStatus = "cancelled"
	StatusLate      PaymentStatus = "late"
)

Jump to

Keyboard shortcuts

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