services

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithLogger

func WithLogger() request.Option

WithLogger fetches the zerolog logger instance from the request context and passes it to the request config

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(logger *zerolog.Logger, lvl request.LogLevel) Logger

func (Logger) Log

func (l Logger) Log(v ...any)

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(cfg config.Config, requestsRepo requests.Repository, webhooksRepo webhooks.Repository) *Provider

func (Provider) GetDarajaClient

func (provider Provider) GetDarajaClient(shortcode mpesa.ShortCode) *clients_daraja.Client

func (Provider) GetMpesaApi

func (provider Provider) GetMpesaApi(shortcode mpesa.ShortCode) mpesa.API

func (Provider) GetQuikkClient

func (provider Provider) GetQuikkClient(shortcode mpesa.ShortCode) *clients_quikk.Client

func (Provider) GetWebhookProcessor

func (provider Provider) GetWebhookProcessor(service requests.Partner) requests.WebhookProcessor

type ShortCodeConfig

type ShortCodeConfig struct {
	ShortCode         string // business pay bill or buy goods account
	InitiatorName     string // daraja api initiator name
	InitiatorPassword string // daraja api initiator password
	Passphrase        string // (optional) passphrase for c2b transfers
	ConsumerKey       string // daraja app consumer key
	ConsumerSecret    string // daraja app consumer secret
	CallbackURL       string // callback url for shortcode async responses
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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