yoonotify

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotSupportedForObject = fmt.Errorf("not supported for object")
View Source
var ErrUnknownEvent = fmt.Errorf("unknown event")
View Source
var ErrUnknownType = fmt.Errorf("unknown type")
View Source
var YooKassaIPs = []string{
	"185.71.76.0/27",
	"185.71.77.0/27",
	"77.75.153.0/25",
	"77.75.156.11",
	"77.75.156.35",
	"77.75.154.128/25",
	"2a02:5180::/32",
}

Functions

This section is empty.

Types

type Authenticity

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

func InitAuthenticity

func InitAuthenticity(ips []string) (*Authenticity, error)

func (*Authenticity) Allowed

func (r *Authenticity) Allowed(userIP string) (bool, error)

type Event

type Event string
const (
	EventPaymentWaitingForCapture Event = "payment.waiting_for_capture"
	EventPaymentSucceeded         Event = "payment.succeeded"
	EventPaymentCanceled          Event = "payment.canceled"

	EventRefundSucceeded Event = "refund.succeeded"

	EventPayoutSucceeded Event = "payout.succeeded"
	EventPayoutCanceled  Event = "payout.canceled"

	EventDealClosed Event = "deal.closed"
)

type Notification

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

func ParseNotificationBody

func ParseNotificationBody(body []byte) (*Notification, error)

func (*Notification) GetPayment

func (r *Notification) GetPayment() (*yoopayment.Payment, error)

func (*Notification) GetPayout

func (r *Notification) GetPayout() (*yoopayout.Payout, error)

func (*Notification) GetRefund

func (r *Notification) GetRefund() (*yoorefund.Refund, error)

func (*Notification) IsPayment

func (r *Notification) IsPayment() bool

func (*Notification) IsPayout

func (r *Notification) IsPayout() bool

func (*Notification) IsRefund

func (r *Notification) IsRefund() bool

type Type

type Type string
const (
	TypeNotification Type = "notification"
)

Jump to

Keyboard shortcuts

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