Documentation
¶
Overview ¶
Package epoint is a Go client for the epoint.az payment gateway.
It covers all 30 documented endpoints: payments, saved cards, refunds and payouts, split payments, pre-authorisation, installments, wallets, Apple Pay and Google Pay, invoices, and B2B transfers.
Create a client and start a payment:
client := epoint.New("i000000001", "your-private-key")
payment, err := client.CreatePayment(ctx, 30.75, "order-1", nil)
if err != nil {
return err
}
// send the customer to payment.RedirectURL()
Point BaseURL at the local sandbox to build and test without a merchant account: https://github.com/martian56/epoint-sandbox
Index ¶
- type BankTransfer
- type Callback
- type ChargeOptions
- type Client
- func (c *Client) Capture(ctx context.Context, transaction string, amount float64) (*Response, error)
- func (c *Client) ChangePaymentSum(ctx context.Context, amount float64, orderID string, opts *PaymentOptions) (*Response, error)
- func (c *Client) ChargeSavedCard(ctx context.Context, cardID string, amount float64, orderID string, ...) (*Response, error)
- func (c *Client) CreateAmexPayment(ctx context.Context, amount float64, orderID string, opts *PaymentOptions) (*Response, error)
- func (c *Client) CreateBankTransfer(ctx context.Context, transfer BankTransfer) (*Response, error)
- func (c *Client) CreateInvoice(ctx context.Context, amount float64, periodFrom, periodTo string, ...) (*Response, error)
- func (c *Client) CreatePayment(ctx context.Context, amount float64, orderID string, opts *PaymentOptions) (*Response, error)
- func (c *Client) CreatePaymentRequest(ctx context.Context, amount float64, orderID string, opts *PaymentOptions) (*Response, error)
- func (c *Client) CreateSplitPayment(ctx context.Context, amount float64, orderID, splitAccount string, ...) (*Response, error)
- func (c *Client) CreateWidget(ctx context.Context, amount float64, orderID, description string) (*Response, error)
- func (c *Client) GetBankTransfer(ctx context.Context, orderID string) (*Response, error)
- func (c *Client) GetCardStatus(ctx context.Context, cardID string) (*Response, error)
- func (c *Client) GetInstallmentPlans(ctx context.Context, orderID string, opts *InstallmentQueryOptions) ([]map[string]any, error)
- func (c *Client) GetInvoice(ctx context.Context, invoiceID int) (*Response, error)
- func (c *Client) GetStatus(ctx context.Context, transaction string) (*Response, error)
- func (c *Client) Heartbeat(ctx context.Context) (*Response, error)
- func (c *Client) ListInvoices(ctx context.Context, kind, order string) (*Response, error)
- func (c *Client) ListWallets(ctx context.Context) (map[string]string, error)
- func (c *Client) PayByInstallment(ctx context.Context, amount float64, orderID, installmentCardID string, ...) (*Response, error)
- func (c *Client) PayWithWallet(ctx context.Context, walletID string, amount float64, orderID string, ...) (*Response, error)
- func (c *Client) Refund(ctx context.Context, cardID string, amount float64, orderID string, ...) (*Response, error)
- func (c *Client) RegisterCard(ctx context.Context, opts *RegisterCardOptions) (*Response, error)
- func (c *Client) RegisterCardAndPay(ctx context.Context, amount float64, orderID string, opts *PaymentOptions) (*Response, error)
- func (c *Client) Reserve(ctx context.Context, amount float64, orderID string, opts *PaymentOptions) (*Response, error)
- func (c *Client) Reverse(ctx context.Context, transaction string, opts *ReverseOptions) (*Response, error)
- func (c *Client) SendInvoiceEmail(ctx context.Context, invoiceID int, email string) (*Response, error)
- func (c *Client) SendInvoiceSMS(ctx context.Context, invoiceID int, phone string) (*Response, error)
- func (c *Client) SplitChargeSavedCard(ctx context.Context, cardID string, amount float64, ...) (*Response, error)
- func (c *Client) UpdateInvoice(ctx context.Context, invoiceID int, amount float64, ...) (*Response, error)
- func (c *Client) VerifyCallback(data, signature string) (*Callback, error)
- type GatewayError
- type InstallmentQueryOptions
- type InvoiceOptions
- type Option
- type PaymentOptions
- type RegisterCardOptions
- type Response
- type ReverseOptions
- type SignatureError
- type TransportError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BankTransfer ¶
type Callback ¶
type Callback struct {
OrderID string
Status string
Code string
Message string
Transaction string
BankTransaction string
OperationCode string
RRN string
CardMask string
CardName string
Amount float64
OtherAttr any
Raw map[string]any
}
func VerifyCallback ¶
type ChargeOptions ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ChangePaymentSum ¶
func (*Client) ChargeSavedCard ¶
func (*Client) CreateAmexPayment ¶
func (*Client) CreateBankTransfer ¶
func (*Client) CreateInvoice ¶
func (*Client) CreatePayment ¶
func (*Client) CreatePaymentRequest ¶
func (*Client) CreateSplitPayment ¶
func (*Client) CreateWidget ¶
func (*Client) GetBankTransfer ¶
func (*Client) GetCardStatus ¶
func (*Client) GetInstallmentPlans ¶
func (*Client) GetInvoice ¶
func (*Client) ListInvoices ¶
func (*Client) ListWallets ¶
func (*Client) PayByInstallment ¶
func (*Client) PayWithWallet ¶
func (*Client) RegisterCard ¶
func (*Client) RegisterCardAndPay ¶
func (*Client) SendInvoiceEmail ¶
func (*Client) SendInvoiceSMS ¶
func (*Client) SplitChargeSavedCard ¶
func (*Client) UpdateInvoice ¶
type GatewayError ¶
func (*GatewayError) Error ¶
func (e *GatewayError) Error() string
type InstallmentQueryOptions ¶
type InvoiceOptions ¶
type Option ¶
type Option func(*Client)
func WithBaseURL ¶
func WithCurrency ¶
func WithHTTPClient ¶
func WithLanguage ¶
func WithRedirectURLs ¶
type PaymentOptions ¶
type RegisterCardOptions ¶
type ReverseOptions ¶
type SignatureError ¶
type SignatureError struct {
Message string
}
func (*SignatureError) Error ¶
func (e *SignatureError) Error() string
type TransportError ¶
func (*TransportError) Error ¶
func (e *TransportError) Error() string
Click to show internal directories.
Click to hide internal directories.