yookassa

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package yookassa implements all the necessary methods for working with YooMoney.

Package yookassa implements all the necessary methods for working with YooMoney.

Package yookassa implements all the necessary methods for working with YooMoney.

Package yookassa implements all the necessary methods for working with YooMoney.

Index

Constants

View Source
const (
	PaymentEndpoint = "payments"
	CaptureEndpoint = "capture"
	CancelEndpoint  = "cancel"
)
View Source
const (
	BaseURL = "https://api.yookassa.ru/v3/"
)
View Source
const (
	MeEndpoint = "me"
)
View Source
const (
	RefundEndpoint = "refunds"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client works with YooMoney API.

func NewClient

func NewClient(accountId string, secretKey string) *Client

type PaymentHandler

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

PaymentHandler works with requests related to Payments.

func NewPaymentHandler

func NewPaymentHandler(client *Client) *PaymentHandler

func (*PaymentHandler) CancelPayment

func (p *PaymentHandler) CancelPayment(paymentId string) (*yoopayment.Payment, error)

CancelPayment cancel payment by ID.

func (*PaymentHandler) CapturePayment

func (p *PaymentHandler) CapturePayment(payment *yoopayment.Payment) (*yoopayment.Payment, error)

CapturePayment confirms payment, accepts and returns the Payment entity.

func (*PaymentHandler) CreatePayment

func (p *PaymentHandler) CreatePayment(payment *yoopayment.Payment) (*yoopayment.Payment, error)

CreatePayment creates a payment, accepts and returns the Payment entity.

func (p *PaymentHandler) CreatePaymentLink(payment *yoopayment.Payment) (string, error)

CreatePaymentLink creates a payment link, accepts Payment entity, returns the link.

func (*PaymentHandler) FindPayment

func (p *PaymentHandler) FindPayment(id string) (*yoopayment.Payment, error)

FindPayment find a payment by ID returns the Payment entity.

func (*PaymentHandler) FindPayments

FindPayments find payments by filter and returns the list of payments.

func (p *PaymentHandler) ParsePaymentLink(payment *yoopayment.Payment) (string, error)

ParsePaymentLink retrieves a link to the Payment from the Payment entity.

type RefundHandler

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

RefundHandler works with requests related to Refunds.

func NewRefundHandler

func NewRefundHandler(client *Client) *RefundHandler

func (*RefundHandler) CreateRefund

func (r *RefundHandler) CreateRefund(refund *yoorefund.Refund) (*yoorefund.Refund, error)

CreateRefund creates a refund, accepts and returns the Refund entity.

func (*RefundHandler) FindRefund

func (r *RefundHandler) FindRefund(id string) (*yoorefund.Refund, error)

FindRefund find a refund by ID returns the Refund entity.

func (*RefundHandler) FindRefunds

func (r *RefundHandler) FindRefunds(filter *yoorefund.RefundListFilter) (*yoorefund.RefundList, error)

FindRefunds find refunds by filter and returns the list of refunds.

type SettingsHandler

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

SettingsHandler works with client's account settings.

func NewSettingsHandler

func NewSettingsHandler(client *Client) *SettingsHandler

func (*SettingsHandler) GetAccountSettings

func (s *SettingsHandler) GetAccountSettings(OnBehalfOf *string) (*yoosettings.Settings, error)

GetAccountSettings gets the client account settings.

Directories

Path Synopsis
Package yoopayment describes all the necessary entities for working with YooMoney Payments.
Package yoopayment describes all the necessary entities for working with YooMoney Payments.
Package yoopayout describes all the necessary entities for working with YooMoney Payouts.
Package yoopayout describes all the necessary entities for working with YooMoney Payouts.
Package yoorefund describes all the necessary entities for working with YooMoney Refunds.
Package yoorefund describes all the necessary entities for working with YooMoney Refunds.
Package yoosettings describes all the necessary entities for working with YooMoney Settings.
Package yoosettings describes all the necessary entities for working with YooMoney Settings.

Jump to

Keyboard shortcuts

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