From 68881bf0d0630b3574a5b611712de2198e5bdd4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A4=EC=B0=AC?= Date: Sun, 12 Apr 2026 19:31:02 +0900 Subject: [PATCH] =?UTF-8?q?fix(desktop):=20Payple=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=EC=99=84=EB=A3=8C=20+=20billing=20URL=20=ED=99=98=EA=B2=BD?= =?UTF-8?q?=EB=B6=84=EA=B8=B0=20+=20=EC=84=B8=EC=85=98=EB=A7=8C=EB=A3=8C?= =?UTF-8?q?=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - OPEN_BILLING: app.isPackaged 기반 dev/prod URL 분기 - CloudSyncService: stored token 없을 때 auth-changed null emit 누락 수정 - Payple Edge Functions 3개 배포 ACTIVE 확인 --- apps/desktop/src/main/ipc/license-handlers.ts | 7 +++-- .../src/main/services/CloudSyncService.ts | 3 +++ memory/project_status.md | 26 ++++++++++++++++--- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/apps/desktop/src/main/ipc/license-handlers.ts b/apps/desktop/src/main/ipc/license-handlers.ts index 91a76eb..c359fb5 100644 --- a/apps/desktop/src/main/ipc/license-handlers.ts +++ b/apps/desktop/src/main/ipc/license-handlers.ts @@ -1,7 +1,7 @@ // src/main/ipc/license-handlers.ts // Phase 11: 라이센스 IPC 핸들러 -import { ipcMain, BrowserWindow, shell } from 'electron' +import { app, ipcMain, BrowserWindow, shell } from 'electron' import { IPC_CHANNELS } from '@d3ro/core/ipc-channels' import { ipcSuccess, ipcError, ErrorCode } from '@d3ro/core/errors' import { getLicenseService } from '../services/LicenseService' @@ -100,9 +100,8 @@ export function registerLicenseHandlers(): void { ipcMain.handle(IPC_CHANNELS.LICENSE.OPEN_BILLING, async (_event, params: { tier: 'pro' | 'pro_plus' }) => { try { - // Phase 3.2-B: 웹 결제 페이지 열기 - // 프로덕션: https://d3ro.dev/billing, 개발: NEXT_PUBLIC_SITE_URL 참조 - const billingUrl = `https://d3ro.dev/billing?tier=${params.tier}` + const baseUrl = app.isPackaged ? 'https://d3ro.dev' : 'http://localhost:3000' + const billingUrl = `${baseUrl}/billing?tier=${params.tier}` await shell.openExternal(billingUrl) return ipcSuccess(undefined) } catch (err) { diff --git a/apps/desktop/src/main/services/CloudSyncService.ts b/apps/desktop/src/main/services/CloudSyncService.ts index bfa692d..c8ebb64 100644 --- a/apps/desktop/src/main/services/CloudSyncService.ts +++ b/apps/desktop/src/main/services/CloudSyncService.ts @@ -130,6 +130,9 @@ class CloudSyncService extends EventEmitter { }) this.emit('auth-changed', { user: null }) } + } else { + // 저장된 토큰 없음 → 미인증 상태를 렌더러에 명시 전달 + this.emit('auth-changed', { user: null }) } logger.info('CloudSyncService initialized') diff --git a/memory/project_status.md b/memory/project_status.md index 6175abb..471e6a3 100644 --- a/memory/project_status.md +++ b/memory/project_status.md @@ -1,9 +1,29 @@ # D3RO-VOICE 프로젝트 현황 -> 마지막 갱신: 2026-04-12 (Phase 3.2-B Payple 결제 연동 + 대시보드 Premium 표시) +> 마지막 갱신: 2026-04-12 19:30 (Phase 3.2-B 배포 + 대시보드 확인 + 세션만료 버그 수정) > 규칙 13: 작업 완료 즉시 이 파일 갱신 의무 -## Phase 3.2-B Payple 결제 연동 + 대시보드 Premium 상태 (2026-04-12) ✅ +## Phase 3.2-B 배포/확인/버그수정 (2026-04-12 19:30) ✅ + +### 배포 완료 +- DB migration `20260412000002_payple_billing.sql` → Supabase 리모트 적용 +- Payple secrets (테스트 키) → Supabase Secrets 설정 +- Edge Functions 3개 (`payple-checkout`, `payple-webhook`, `payple-manage`) 배포 ACTIVE +- Electron `OPEN_BILLING`: 개발 환경 `localhost:3000` / 프로덕션 `d3ro.dev` 분기 추가 + +### 대시보드 시각 확인 완료 +- Premium LLM LED (CLAUDE) 초록색 표시 ✓ +- 티어 카드 (FREE) 앰버 LED ✓ +- 사용량 바 + Premium 쿼터 (Haiku 268/주간) ✓ +- i18n 키 14개 전부 존재 확인 ✓ + +### 세션 만료 버그 수정 +- `CloudSyncService.ts`: stored token 없을 때 `auth-changed { user: null }` emit 추가 +- 렌더러 CloudSyncSection이 초기 상태를 올바르게 수신하게 됨 + +--- + +## Phase 3.2-B Payple 결제 연동 + 대시보드 Premium 상태 (코드 구현, 2026-04-12) ✅ ### A. Payple 결제 연동 Stripe 기반 결제를 Payple(한국 PG)로 전면 교체. 웹(apps/web) 결제 페이지가 핵심. @@ -34,7 +54,7 @@ Stripe 기반 결제를 Payple(한국 PG)로 전면 교체. 웹(apps/web) 결제 12개 locale에 14개 키 추가 (service.premiumLlm, dashboard.currentBackend 등) ### 알려진 이슈 (이월) -1. **세션 만료 렌더러 미동기화** — 기존 이슈 +1. ~~**세션 만료 렌더러 미동기화**~~ — ✅ 수정 완료 (stored token 없을 때 auth-changed null emit) 2. **LemonSqueezy 코드 잔존** — LicenseService.ts에 @deprecated 코드. 다음 사이클에서 정리 3. **Payple 테스트 키** — 라이브 전환 시 PAYPLE_CST_ID/CUST_KEY/REFUND_KEY/CLIENT_KEY Supabase Secrets 등록 필요 4. **Payple 정기 갱신 크론** — payple-renew 미구현. pg_cron 또는 외부 스케줄러 필요