2023-06-13 13:22:51 +00:00
|
|
|
package models
|
|
|
|
|
2024-12-16 13:47:40 +00:00
|
|
|
import "gitea.pena/PenaSide/treasurer/internal/models/yandex"
|
2023-06-13 13:22:51 +00:00
|
|
|
|
|
|
|
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,
|
|
|
|
}
|
|
|
|
)
|