()
| 75 | * Use this when Stripe operations are required |
| 76 | */ |
| 77 | export function requireStripeClient(): Stripe { |
| 78 | const client = getStripeClient() |
| 79 | |
| 80 | if (!client) { |
| 81 | throw new Error( |
| 82 | 'Stripe client is not available. Set STRIPE_SECRET_KEY in your environment variables.' |
| 83 | ) |
| 84 | } |
| 85 | |
| 86 | return client |
| 87 | } |
no test coverage detected