payment

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleCompleted

func HandleCompleted(
	bus eventbus.Bus,
	uow repository.UnitOfWork,
	logger *slog.Logger,
) func(
	ctx context.Context,
	e events.Event,
) error

HandleCompleted handles PaymentCompletedEvent, updates the transaction status in the DB, and publishes a follow-up event if needed.

func HandleFailed added in v1.2.0

func HandleFailed(
	bus eventbus.Bus,
	uow repository.UnitOfWork,
	logger *slog.Logger,
) eventbus.HandlerFunc

HandleFailed handles the PaymentFailedEvent by updating the transaction status to "failed"

func HandleInitiated

func HandleInitiated(
	bus eventbus.Bus,
	paymentProvider payment.Payment,
	logger *slog.Logger,
) eventbus.HandlerFunc

HandleInitiated handles DepositBusinessValidatedEvent and initiates payment for deposits.

func HandleProcessed

func HandleProcessed(
	uow repository.UnitOfWork,
	logger *slog.Logger,
) eventbus.HandlerFunc

HandleProcessed handles PaymentInitiatedEvent and updates the transaction with payment ID. This is a generic handler that can process payment events for all operations (deposit, withdraw, transfer).

Types

This section is empty.

Jump to

Keyboard shortcuts

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