treasurer/internal/models/yandex/payment_confirmation.go
2023-06-13 13:22:51 +00:00

56 lines
1.6 KiB
Go

package yandex
type ConfirmationType string
const (
ConfirmationTypeEmbedded ConfirmationType = "embedded"
ConfirmationTypeExternal ConfirmationType = "external"
ConfirmationTypeMobile ConfirmationType = "mobile_application"
ConfirmationTypeQR ConfirmationType = "qr"
ConfirmationTypeRedirect ConfirmationType = "redirect"
)
type ConfirmationEmbedded struct {
Type ConfirmationType `json:"type"`
ConfirmationToken string `json:"confirmation_token"`
}
type ConfirmationExternal struct {
Type ConfirmationType `json:"type"`
}
type ConfirmationMobile struct {
Type ConfirmationType `json:"type"`
ConfirmationURL string `json:"confirmation_url"`
}
type ConfirmationQR struct {
Type ConfirmationType `json:"type"`
ConfirmationData string `json:"confirmation_data"`
}
type ConfirmationRedirect struct {
Type ConfirmationType `json:"type"`
ConfirmationURL string `json:"confirmation_url"`
ReturnURL *string `json:"return_url,omitempty"`
Enforce *bool `json:"enforce,omitempty"`
}
type CreateConfirmationLocale struct {
Type ConfirmationType `json:"type"`
Locale string `json:"locale,omitempty"`
}
type CreateConfirmationMobile struct {
Type ConfirmationType `json:"type"`
Locale string `json:"locale,omitempty"`
ReturnURL string `json:"return_url"`
}
type CreateConfirmationRedirect struct {
Type ConfirmationType `json:"type"`
Locale string `json:"locale,omitempty"`
ReturnURL string `json:"return_url"`
Enforce bool `json:"enforce,omitempty"`
}