fix(billing): remove remaining request_options from Price.retrieve calls
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -85,7 +85,7 @@ def build_multi_item_checkout_payload(
|
|||||||
def _mode_for_price(s, price_id: str) -> str:
|
def _mode_for_price(s, price_id: str) -> str:
|
||||||
"""Determine Checkout Session mode from price type."""
|
"""Determine Checkout Session mode from price type."""
|
||||||
try:
|
try:
|
||||||
price = s.Price.retrieve(price_id, request_options={"timeout": _STRIPE_TIMEOUT_SECONDS})
|
price = s.Price.retrieve(price_id)
|
||||||
return "subscription" if price.type == "recurring" else "payment"
|
return "subscription" if price.type == "recurring" else "payment"
|
||||||
except Exception:
|
except Exception:
|
||||||
# Default to payment if we can't determine
|
# Default to payment if we can't determine
|
||||||
@@ -95,7 +95,7 @@ def _mode_for_price(s, price_id: str) -> str:
|
|||||||
def _is_recurring_price(s, price_id: str) -> bool:
|
def _is_recurring_price(s, price_id: str) -> bool:
|
||||||
"""Check if a Stripe price is recurring (subscription)."""
|
"""Check if a Stripe price is recurring (subscription)."""
|
||||||
try:
|
try:
|
||||||
price = s.Price.retrieve(price_id, request_options={"timeout": _STRIPE_TIMEOUT_SECONDS})
|
price = s.Price.retrieve(price_id)
|
||||||
return price.type == "recurring"
|
return price.type == "recurring"
|
||||||
except Exception:
|
except Exception:
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user