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"`
|
|
|
|
PhoneNumber string `json:"phoneNumber,omitempty"`
|
|
|
|
Login string `json:"login,omitempty"`
|
|
|
|
BankCard *BankCard `json:"bankCard,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type GetPaymentLinkRequest struct {
|
|
|
|
Body *GetPaymentLinkBody
|
|
|
|
ClientIP string
|
|
|
|
UserID string
|
|
|
|
}
|
|
|
|
|
|
|
|
type GetPaymentLinkResponse struct {
|
|
|
|
Link string `json:"link"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type BankCard struct {
|
|
|
|
Number string `json:"number"`
|
|
|
|
ExpiryYear string `json:"expiryYear"`
|
|
|
|
ExpiryMonth string `json:"expiryMonth"`
|
|
|
|
CSC *string `json:"csc,omitempty"`
|
|
|
|
CardHolderName *string `json:"cardholder,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type PaymentType string
|
|
|
|
|
|
|
|
const (
|
2024-05-06 10:06:53 +00:00
|
|
|
PaymentTypeBankCard PaymentType = "bankCard"
|
2023-06-22 09:36:43 +00:00
|
|
|
PaymentTypeTinkoff PaymentType = "tinkoffBank"
|
|
|
|
PaymentTypeSberPay PaymentType = "sberbank"
|
|
|
|
PaymentTypeYoomoney PaymentType = "yoomoney"
|
|
|
|
PaymentTypeSBP PaymentType = "sbp"
|
|
|
|
PaymentTypeSberB2B PaymentType = "b2bSberbank"
|
|
|
|
)
|
|
|
|
|
|
|
|
type PaymentEvent struct {
|
|
|
|
Key string
|
|
|
|
Message string
|
|
|
|
PaymentID string
|
|
|
|
UserID string
|
|
|
|
Currency string
|
2024-03-17 22:13:56 +00:00
|
|
|
Type string
|
2023-06-22 09:36:43 +00:00
|
|
|
Amount int64
|
|
|
|
}
|