Documentation
¶
Index ¶
- type FonbnkAdapter
- func (f *FonbnkAdapter) GetPaymentStatus(ctx context.Context, transactionID string) (payment.PaymentStatus, error)
- func (f *FonbnkAdapter) GetRate(ctx context.Context, currency string) (int64, error)
- func (f *FonbnkAdapter) InitializePayment(ctx context.Context, req payment.InitializePaymentRequest) (string, error)
- func (f *FonbnkAdapter) ProcessPayment(ctx context.Context, transactionID string) (payment.PaymentStatus, error)
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 ¶
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
Click to show internal directories.
Click to hide internal directories.