ZH
测试版翻译

@core / checkout

1.0.1 ▾
已验证MIT
GitHub

一次性购买的 Stripe Checkout:服务端定价、仅由 Webhook 创建订单、售罄时自动退款

代码8 个文件上下文约 707 个 tokenMCP stripe扫描通过

应用 .genpmignore 后将被注入的确切目录树。固定于

src/lib/checkout/adapters/hono.ts只读 · 6590fd9
// Adaptador Hono: `app.route('/api/checkout', checkoutRoutes({ currentUserId }))`.
import { Hono } from 'hono';
import { type CheckoutPaths, type CurrentUserId, handleCheckoutStatus, handleStartCheckout } from './http.ts';

export function checkoutRoutes(opts: { currentUserId: CurrentUserId; paths?: CheckoutPaths }) {
  const paths = opts.paths ?? { success: '/checkout/success', cancel: '/cart' };
  return new Hono().post('/', (c) => handleStartCheckout(c.req.raw, opts.currentUserId, paths)).get('/status', (c) => handleCheckoutStatus(c.req.raw));
}

举报 @core/checkout

使用 GitHub 登录后才能举报包。