fix(desktop): Payple 배포 완료 + billing URL 환경분기 + 세션만료 버그 수정
- OPEN_BILLING: app.isPackaged 기반 dev/prod URL 분기 - CloudSyncService: stored token 없을 때 auth-changed null emit 누락 수정 - Payple Edge Functions 3개 배포 ACTIVE 확인
This commit is contained in:
parent
ad058fbd4d
commit
68881bf0d0
3 changed files with 29 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
// src/main/ipc/license-handlers.ts
|
// src/main/ipc/license-handlers.ts
|
||||||
// Phase 11: 라이센스 IPC 핸들러
|
// 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 { IPC_CHANNELS } from '@d3ro/core/ipc-channels'
|
||||||
import { ipcSuccess, ipcError, ErrorCode } from '@d3ro/core/errors'
|
import { ipcSuccess, ipcError, ErrorCode } from '@d3ro/core/errors'
|
||||||
import { getLicenseService } from '../services/LicenseService'
|
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' }) => {
|
ipcMain.handle(IPC_CHANNELS.LICENSE.OPEN_BILLING, async (_event, params: { tier: 'pro' | 'pro_plus' }) => {
|
||||||
try {
|
try {
|
||||||
// Phase 3.2-B: 웹 결제 페이지 열기
|
const baseUrl = app.isPackaged ? 'https://d3ro.dev' : 'http://localhost:3000'
|
||||||
// 프로덕션: https://d3ro.dev/billing, 개발: NEXT_PUBLIC_SITE_URL 참조
|
const billingUrl = `${baseUrl}/billing?tier=${params.tier}`
|
||||||
const billingUrl = `https://d3ro.dev/billing?tier=${params.tier}`
|
|
||||||
await shell.openExternal(billingUrl)
|
await shell.openExternal(billingUrl)
|
||||||
return ipcSuccess(undefined)
|
return ipcSuccess(undefined)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,9 @@ class CloudSyncService extends EventEmitter {
|
||||||
})
|
})
|
||||||
this.emit('auth-changed', { user: null })
|
this.emit('auth-changed', { user: null })
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 저장된 토큰 없음 → 미인증 상태를 렌더러에 명시 전달
|
||||||
|
this.emit('auth-changed', { user: null })
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info('CloudSyncService initialized')
|
logger.info('CloudSyncService initialized')
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,29 @@
|
||||||
# D3RO-VOICE 프로젝트 현황
|
# D3RO-VOICE 프로젝트 현황
|
||||||
|
|
||||||
> 마지막 갱신: 2026-04-12 (Phase 3.2-B Payple 결제 연동 + 대시보드 Premium 표시)
|
> 마지막 갱신: 2026-04-12 19:30 (Phase 3.2-B 배포 + 대시보드 확인 + 세션만료 버그 수정)
|
||||||
> 규칙 13: 작업 완료 즉시 이 파일 갱신 의무
|
> 규칙 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 결제 연동
|
### A. Payple 결제 연동
|
||||||
Stripe 기반 결제를 Payple(한국 PG)로 전면 교체. 웹(apps/web) 결제 페이지가 핵심.
|
Stripe 기반 결제를 Payple(한국 PG)로 전면 교체. 웹(apps/web) 결제 페이지가 핵심.
|
||||||
|
|
@ -34,7 +54,7 @@ Stripe 기반 결제를 Payple(한국 PG)로 전면 교체. 웹(apps/web) 결제
|
||||||
12개 locale에 14개 키 추가 (service.premiumLlm, dashboard.currentBackend 등)
|
12개 locale에 14개 키 추가 (service.premiumLlm, dashboard.currentBackend 등)
|
||||||
|
|
||||||
### 알려진 이슈 (이월)
|
### 알려진 이슈 (이월)
|
||||||
1. **세션 만료 렌더러 미동기화** — 기존 이슈
|
1. ~~**세션 만료 렌더러 미동기화**~~ — ✅ 수정 완료 (stored token 없을 때 auth-changed null emit)
|
||||||
2. **LemonSqueezy 코드 잔존** — LicenseService.ts에 @deprecated 코드. 다음 사이클에서 정리
|
2. **LemonSqueezy 코드 잔존** — LicenseService.ts에 @deprecated 코드. 다음 사이클에서 정리
|
||||||
3. **Payple 테스트 키** — 라이브 전환 시 PAYPLE_CST_ID/CUST_KEY/REFUND_KEY/CLIENT_KEY Supabase Secrets 등록 필요
|
3. **Payple 테스트 키** — 라이브 전환 시 PAYPLE_CST_ID/CUST_KEY/REFUND_KEY/CLIENT_KEY Supabase Secrets 등록 필요
|
||||||
4. **Payple 정기 갱신 크론** — payple-renew 미구현. pg_cron 또는 외부 스케줄러 필요
|
4. **Payple 정기 갱신 크론** — payple-renew 미구현. pg_cron 또는 외부 스케줄러 필요
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue