安全修复: - client_secret 和 publishableKey 不再通过 URL 传递,改用 postMessage 弹窗发送 STRIPE_POPUP_READY 信号,父页面响应 STRIPE_POPUP_INIT 传递敏感数据 校验 event.origin 防止跨域消息伪造 - confirmAlipayPayment 改为显式调用,移除动态方法查找 - handleStripeSubmit 中 returnUrl 清理残留 query params 依赖清理: - 移除未使用的 @stripe/react-stripe-js Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
52 lines
1.1 KiB
JSON
52 lines
1.1 KiB
JSON
{
|
|
"name": "sub2apipay",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "eslint",
|
|
"typecheck": "tsc --noEmit",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check .",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest"
|
|
},
|
|
"dependencies": {
|
|
"@prisma/adapter-pg": "7.4.1",
|
|
"@prisma/client": "^7.4.2",
|
|
"@stripe/stripe-js": "^8.9.0",
|
|
"next": "16.1.6",
|
|
"pg": "^8.19.0",
|
|
"qrcode": "^1.5.4",
|
|
"react": "19.2.3",
|
|
"react-dom": "19.2.3",
|
|
"stripe": "^20.4.0",
|
|
"zod": "^4.3.6"
|
|
},
|
|
"pnpm": {
|
|
"onlyBuiltDependencies": [
|
|
"prisma",
|
|
"@prisma/engines",
|
|
"esbuild"
|
|
]
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/postcss": "^4",
|
|
"@types/node": "^20",
|
|
"@types/pg": "^8.16.0",
|
|
"@types/qrcode": "^1.5.6",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"@vitejs/plugin-react": "^5.1.4",
|
|
"eslint": "^9",
|
|
"eslint-config-next": "16.1.6",
|
|
"prettier": "^3.8.1",
|
|
"prisma": "7.4.1",
|
|
"tailwindcss": "^4",
|
|
"typescript": "^5",
|
|
"vitest": "^4.0.18"
|
|
}
|
|
}
|