freeleaps-service-hub/apps/payment/backend/infra/payment/constants.py
2024-11-18 22:01:54 -08:00

41 lines
787 B
Python

from enum import IntEnum
from backend.services.common.constants import UserRegion
class TransactionStatus(IntEnum):
PENDING = 0
IN_PROGRESS = 1
COMPLETED = 2
class MoneyCollectionType(IntEnum):
UNSPECIFIED = 0
MARKED_AS_PAID = 1
UPLOAD_PROOF = 2
WECHAT_QR_CODE = 3
STRIPE_CHECKOUT = 4
class PaymentLocation(IntEnum):
UNSPECIFIED = 0
CHINA_MAINLAND = 1
INTERNATIONAL = 2
class Currency(IntEnum):
UNKNOWN = 0
USD = 1
CNY = 2
RegionalCurrency = {
PaymentLocation.UNSPECIFIED: Currency.UNKNOWN.name,
PaymentLocation.CHINA_MAINLAND: Currency.CNY.name,
PaymentLocation.INTERNATIONAL: Currency.USD.name,
}
UserRegionToCurrency = {
UserRegion.ZH_CN: Currency.CNY.name,
UserRegion.OTHER: Currency.USD.name,
}