Add new infra architecture 13
This commit is contained in:
@@ -4,6 +4,7 @@ Implements SetupIntent-first architecture for secure payment flows
|
||||
Implements PaymentProvider interface for easy SDK swapping
|
||||
"""
|
||||
|
||||
import os
|
||||
import stripe
|
||||
import uuid
|
||||
import logging
|
||||
@@ -30,12 +31,13 @@ class StripeClient(PaymentProvider):
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize Stripe client with configuration"""
|
||||
settings = BaseServiceSettings()
|
||||
stripe.api_key = settings.STRIPE_SECRET_KEY
|
||||
# Read Stripe settings directly from environment to avoid BaseServiceSettings validation
|
||||
stripe.api_key = os.environ.get("STRIPE_SECRET_KEY")
|
||||
# Let the SDK use its default pinned API version (2025-12-15.clover for v14.1.0)
|
||||
# Only override if explicitly set in environment
|
||||
if settings.STRIPE_API_VERSION:
|
||||
stripe.api_version = settings.STRIPE_API_VERSION
|
||||
stripe_api_version = os.environ.get("STRIPE_API_VERSION")
|
||||
if stripe_api_version:
|
||||
stripe.api_version = stripe_api_version
|
||||
|
||||
async def create_setup_intent_for_verification(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user