customer/internal/models/payment.go

54 lines
1.3 KiB
Go
Raw Normal View History

2023-06-22 09:36:43 +00:00
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
2024-04-18 17:10:23 +00:00
Customer Customer
Items []Item
2023-06-22 09:36:43 +00:00
}
2024-04-18 17:10:23 +00:00
type Customer struct {
FullName, INN, Email, Phone string
}
type Item struct {
Description, Measure, Quantity, Money, Currency string
2023-06-22 09:36:43 +00:00
}
2024-04-18 17:10:23 +00:00
type GetPaymentLinkResponse struct {
Link string `json:"link"`
2023-06-22 09:36:43 +00:00
}
type PaymentType string
const (
PaymentTypeBankCard PaymentType = "bankCard"
PaymentTypeTinkoff PaymentType = "tinkoffBank"
PaymentTypeQiwi PaymentType = "qiwi"
PaymentTypeSberPay PaymentType = "sberbank"
PaymentTypeYoomoney PaymentType = "yoomoney"
PaymentTypeMobile PaymentType = "mobile"
PaymentTypeInstallments PaymentType = "installments"
PaymentTypeCash PaymentType = "cash"
PaymentTypeSBP PaymentType = "sbp"
PaymentTypeSberB2B PaymentType = "b2bSberbank"
PaymentTypeAlfabank PaymentType = "alfabank"
)
type PaymentEvent struct {
Key string
Message string
PaymentID string
UserID string
Currency string
Amount int64
}