customer/internal/models/payment.go

51 lines
1.1 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"
PaymentTypeSberPay PaymentType = "sberbank"
PaymentTypeYoomoney PaymentType = "yoomoney"
PaymentTypeSBP PaymentType = "sbp"
PaymentTypeSberB2B PaymentType = "b2bSberbank"
DefaultCurrency = "RUB"
2023-06-22 09:36:43 +00:00
)
type PaymentEvent struct {
Key string
Message string
PaymentID string
UserID string
Currency string
Type string
2023-06-22 09:36:43 +00:00
Amount int64
}