payment

package
v0.0.0-...-0cf82f6 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsumeOrders

func ConsumeOrders(topic string)

ConsumeOrders consumes order messages from the orders Pulsar topic and processes them.

func InitPulsar

func InitPulsar() error

InitPulsar initializes a Pulsar client for the payment service.

func ProcessPayment

func ProcessPayment(order *models.Order) *models.Transaction

ProcessPayment simulates payment processing for an order.

func PublishLogs

func PublishLogs(logMessage *models.PaymentLogMessage) error

PublishLogs publishes the transaction logs to the payment-logs-topic.

func PublishTransaction

func PublishTransaction(transaction *models.Transaction) error

PublishTransaction publishes the transaction result to the specified Pulsar topic.

func SaveTransaction

func SaveTransaction(transaction *models.Transaction) error

SaveTransaction stores the transaction details in the database.

Types

This section is empty.

Jump to

Keyboard shortcuts

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