fix: apply telegram group member monthly price

This commit is contained in:
2569718930@qq.com
2026-06-02 21:35:35 +08:00
parent 876417c5ec
commit 137b0d8b3a
7 changed files with 101 additions and 9 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ class TelegramGroupPricing:
os.getenv("TELEGRAM_CHAT_ID"),
)
self.group_chat_ids = dedicated_group_chat_ids or fallback_group_chat_ids
self.member_price = _decimal_env("POLYWEATHER_GROUP_MEMBER_PRICE_USDC", "10")
self.member_price = _decimal_env("POLYWEATHER_GROUP_MEMBER_PRICE_USDC", "5")
self.public_price = _decimal_env("POLYWEATHER_PUBLIC_PRICE_USDC", "10")
self.timeout_sec = max(
2,
+3 -1
View File
@@ -396,7 +396,7 @@ class PaymentContractCheckoutService:
)
self.telegram_payment_pricing_enabled = _env_bool(
"POLYWEATHER_PAYMENT_TELEGRAM_PRICING_ENABLED",
False,
True,
)
self.points_enabled = _env_bool("POLYWEATHER_PAYMENT_POINTS_ENABLED", True)
self.points_per_usdc = max(
@@ -1696,6 +1696,8 @@ class PaymentContractCheckoutService:
except Exception:
telegram_id = None
price_payload = pricing.resolve_price_for_telegram_id(telegram_id)
if not bool(price_payload.get("is_group_member")):
return out
amount_dec = _parse_decimal(
price_payload.get("amount_usdc"), out["amount_usdc_decimal"]
)