from django.conf import settings

def stripe_context(request):
    """Add Stripe-related context variables to templates"""
    stripe_mode = getattr(settings, 'STRIPE_MODE', 'test')
    return {
        'STRIPE_PUBLISHABLE_KEY': settings.STRIPE_PUBLISHABLE_KEY,
        'STRIPE_MODE': stripe_mode,
        'STRIPE_IS_TEST_MODE': stripe_mode == 'test',
    }
