koronapay

package
v0.0.0-...-dd01cc2 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultUpstream = "https://koronapay.com"
	DefaultRetries  = 3
	DefaultTimeout  = 5 * time.Minute
)
View Source
const (
	CountryIDRussia   CountryID = "RUS"
	CountryIDThailand CountryID = "THA"

	CurrencyIDRUB CurrencyID = 810
	CurrencyIDUSD CurrencyID = 840

	PaymentMethodDebitCard          PaymentMethod = "debitCard"
	PaymentMethodAccountViaDeeMoney PaymentMethod = "accountViaDeeMoney"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(opts ...Option) (*Client, error)

func (*Client) Tariff

func (c *Client) Tariff(ctx context.Context, req *TariffReq) (float64, error)

type CountryID

type CountryID string

func (CountryID) String

func (c CountryID) String() string

type CurrencyID

type CurrencyID int

func (CurrencyID) String

func (c CurrencyID) String() string

type Option

type Option func(*Client)

func WithUpstream

func WithUpstream(upstream string) Option

func WithVerbose

func WithVerbose(verbose bool) Option

type Participant

type Participant struct {
	Country  CountryID
	Currency CurrencyID
}

type PaymentMethod

type PaymentMethod string

func (PaymentMethod) String

func (p PaymentMethod) String() string

type TariffReq

type TariffReq struct {
	Amount          float64
	Sender          Participant
	Receiver        Participant
	PaymentMethod   PaymentMethod
	ReceivingMethod PaymentMethod
}

Jump to

Keyboard shortcuts

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