KO
베타 번역

@core / contracts

1.0.0 ▾
인증됨MIT
GitHub

GenPM 모듈 공용 타입: 콘텐츠, 사이트맵, 검색, 관리 리소스, 결제, 추적 이벤트

코드파일 10개컨텍스트약 532토큰검사 통과

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

src/lib/contracts/payment.ts읽기 전용 · 7266529
// Pasarela de pago vista desde los pedidos: la implementa @core/checkout (Stripe); la consume @core/orders para
// reembolsos sin depender de Stripe.
import type { Money } from './money.ts';

export type PaymentStatus = 'pending' | 'succeeded' | 'failed' | 'refunded' | 'partially_refunded';

export type PaymentProvider = {
  /** `stripe`, `paypal`… Se guarda en el pedido junto a la referencia. */
  name: string;
  getPayment(paymentRef: string): Promise<{ status: PaymentStatus; amount: Money } | null>;
  /** Reembolsa `amount` (≤ lo cobrado). Debe ser idempotente por `idempotencyKey`. */
  refund(
    paymentRef: string,
    amount: Money,
    opts: { idempotencyKey: string; reason?: string },
  ): Promise<{ refundRef: string }>;
};

@core/contracts 신고

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