KO
베타 번역

@core / billing

1.0.0 ▾
인증됨MIT
GitHub

Stripe 구독: 결제, 고객 포털, 멱등 웹훅(Drizzle)

코드파일 9개컨텍스트약 633토큰MCP stripe검사 통과

.genpmignore 적용 후 주입될 정확한 트리입니다. 고정 대상:

src/lib/billing/stripe.ts읽기 전용 · a8a5ac1
// Cliente de Stripe perezoso desde STRIPE_SECRET_KEY. `setStripe` permite inyectar otro en tests.
import Stripe from 'stripe';

let current: Stripe | null = null;

export function getStripe(): Stripe {
  if (!current) {
    const key = process.env.STRIPE_SECRET_KEY;
    if (!key) throw new Error('STRIPE_SECRET_KEY is not set (see .env.example)');
    current = new Stripe(key);
  }
  return current;
}

export function setStripe(stripe: Stripe): void {
  current = stripe;
}

@core/billing 신고

패키지를 신고하려면 GitHub로 로그인하세요.