30 lines
1.0 KiB
Go
30 lines
1.0 KiB
Go
![]() |
package models
|
||
|
|
||
|
import "penahub.gitlab.yandexcloud.net/external/treasurer/internal/models/yandex"
|
||
|
|
||
|
type PaymentStatus string
|
||
|
|
||
|
const (
|
||
|
PaymentStatusPending PaymentStatus = "pending"
|
||
|
PaymentStatusWaiting PaymentStatus = "waiting"
|
||
|
PaymentStatusSuccessfully PaymentStatus = "success"
|
||
|
PaymentStatusCanceled PaymentStatus = "canceled"
|
||
|
PaymentStatusRefund PaymentStatus = "refund"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
YandexPaymentStatusMap = map[PaymentStatus]yandex.PaymentStatus{
|
||
|
PaymentStatusPending: yandex.PaymentStatusPending,
|
||
|
PaymentStatusWaiting: yandex.PaymentStatusWaiting,
|
||
|
PaymentStatusSuccessfully: yandex.PaymentStatusSuccessfully,
|
||
|
PaymentStatusCanceled: yandex.PaymentStatusCanceled,
|
||
|
}
|
||
|
|
||
|
PaymentStatusMap = map[string]PaymentStatus{
|
||
|
string(yandex.PaymentStatusPending): PaymentStatusPending,
|
||
|
string(yandex.PaymentStatusWaiting): PaymentStatusWaiting,
|
||
|
string(yandex.PaymentStatusSuccessfully): PaymentStatusSuccessfully,
|
||
|
string(yandex.PaymentStatusCanceled): PaymentStatusCanceled,
|
||
|
}
|
||
|
)
|