generated from PenaSide/GolangTemplate
51 lines
1.3 KiB
Go
51 lines
1.3 KiB
Go
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 (
|
||
PaymentTypeBankCard PaymentType = "bank_сard"
|
||
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
|
||
Type string
|
||
Amount int64
|
||
}
|