refunds

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestInput

type RequestInput struct {
	PaymentID      string
	AmountPaise    int64
	Reason         string
	ExternalID     string
	IdempotencyKey string
	Metadata       any
	Actor          audit.Actor
}

type Service

type Service struct {
	App      core.App
	Audit    *audit.Service
	Webhooks WebhookScheduler
	Now      func() time.Time
}

func NewService

func NewService(app core.App, auditService *audit.Service, webhooks WebhookScheduler) *Service

func (*Service) Request

func (s *Service) Request(input RequestInput) (*core.Record, bool, error)

func (*Service) Update

func (s *Service) Update(input UpdateInput) (*core.Record, error)

type UpdateInput

type UpdateInput struct {
	RefundID  string
	Status    string
	Reference string
	Note      string
	Actor     audit.Actor
}

type WebhookScheduler

type WebhookScheduler interface {
	ScheduleRefund(app core.App, event string, payment, refund *core.Record, at time.Time) error
	Wake()
}

Jump to

Keyboard shortcuts

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