| 1 | # frozen_string_literal: true |
| 2 | |
| 3 | # siGit's own Stripe API key (siGit Code Pro/Team). Separate product line from |
| 4 | # Onde Inference's billing, though it may share the Stripe account. |
| 5 | # |
| 6 | # Source of truth is Rails credentials (`stripe.secret_key`); ENV is a fallback |
| 7 | # for local dev. (Inlined here rather than calling StripeService to avoid an |
| 8 | # autoload dependency during boot.) |
| 9 | stripe_key = Rails.application.credentials.dig(:stripe, :secret_key).presence || |
| 10 | ENV["STRIPE_SECRET_KEY"].presence |
| 11 | Stripe.api_key = stripe_key if stripe_key |