customer/internal/models/payment.go

51 lines
1.1 KiB
Go

package models
type GetPaymentLinkBody struct {
Type PaymentType `json:"type"`
Currency string `json:"currency"`
Amount int64 `json:"amount"`
ReturnURL string `json:"returnUrl,omitempty"`
}
type GetPaymentLinkRequest struct {
Body *GetPaymentLinkBody
ClientIP string
UserID string
Customer Customer
Items []Item
}
type Customer struct {
FullName, INN, Email, Phone string
}
type Item struct {
Description, Measure, Quantity, Money, Currency string
}
type GetPaymentLinkResponse struct {
Link string `json:"link"`
}
type PaymentType string
const (
PaymentTypeBankCard PaymentType = "bankCard"
PaymentTypeTinkoff PaymentType = "tinkoffBank"
PaymentTypeSberPay PaymentType = "sberbank"
PaymentTypeYoomoney PaymentType = "yoomoney"
PaymentTypeSBP PaymentType = "sbp"
PaymentTypeSberB2B PaymentType = "b2bSberbank"
DefaultCurrency = "RUB"
)
type PaymentEvent struct {
Key string
Message string
PaymentID string
UserID string
Currency string
Type string
Amount int64
}