mirror of
https://github.com/serty2005/rmser.git
synced 2026-02-04 19:02:33 -06:00
35 lines
982 B
Go
35 lines
982 B
Go
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"`
|
|
}
|