fonbnk

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FonbnkAdapter

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

FonbnkAdapter implements the payment.PaymentProvider interface.

func NewFonbnkAdapter

func NewFonbnkAdapter(clientID string, clientSecret string, baseURL string) *FonbnkAdapter

NewFonbnkAdapter is the constructor. It builds the custom http.Client with the signing transport.

func (*FonbnkAdapter) GetPaymentStatus

func (f *FonbnkAdapter) GetPaymentStatus(ctx context.Context, transactionID string) (payment.PaymentStatus, error)

GetPaymentStatus calls the Fonbnk API to get payment status

func (*FonbnkAdapter) GetRate

func (f *FonbnkAdapter) GetRate(ctx context.Context, currency string) (int64, error)

GetRate returns the exchange rate for a specified currency or amount

func (*FonbnkAdapter) InitializePayment

func (f *FonbnkAdapter) InitializePayment(ctx context.Context, req payment.InitializePaymentRequest) (string, error)

InitializePayment calls the Fonbnk API to create an order.

func (*FonbnkAdapter) ProcessPayment

func (f *FonbnkAdapter) ProcessPayment(ctx context.Context, transactionID string) (payment.PaymentStatus, error)

ProcessPayment calls the Fonbnk API to process the order

Jump to

Keyboard shortcuts

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