mirror of
https://github.com/serty2005/rmser.git
synced 2026-02-04 19:02:33 -06:00
добавлен биллинг и тарифы
добавлена интеграция с юкасса
This commit is contained in:
34
internal/infrastructure/yookassa/dto.go
Normal file
34
internal/infrastructure/yookassa/dto.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package yookassa
|
||||
|
||||
type Amount struct {
|
||||
Value string `json:"value"`
|
||||
Currency string `json:"currency"`
|
||||
}
|
||||
|
||||
type Confirmation struct {
|
||||
Type string `json:"type"`
|
||||
ReturnURL string `json:"return_url,omitempty"`
|
||||
URL string `json:"confirmation_url,omitempty"`
|
||||
}
|
||||
|
||||
type PaymentRequest struct {
|
||||
Amount Amount `json:"amount"`
|
||||
Capture bool `json:"capture"`
|
||||
Confirmation Confirmation `json:"confirmation"`
|
||||
Metadata map[string]string `json:"metadata"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
type PaymentResponse struct {
|
||||
ID string `json:"id"`
|
||||
Status string `json:"status"`
|
||||
Amount Amount `json:"amount"`
|
||||
Confirmation Confirmation `json:"confirmation"`
|
||||
Metadata map[string]string `json:"metadata"`
|
||||
}
|
||||
|
||||
type WebhookEvent struct {
|
||||
Event string `json:"event"`
|
||||
Type string `json:"type"`
|
||||
Object PaymentResponse `json:"object"`
|
||||
}
|
||||
Reference in New Issue
Block a user