feat(server): Payple 정기 갱신 크론 — payple-renew Edge Function + GitHub Actions
- payple-renew: 만료 구독 조회 → paypleBilling → 기간 갱신 - 3회 연속 실패 시 tier=free, status=expired 다운그레이드 - migration: subscriptions.renewal_failures 컬럼 추가 - payple-webhook: 결제 완료 시 renewal_failures=0 리셋 - GitHub Actions: 매일 01:00 UTC 스케줄
This commit is contained in:
parent
36031acda9
commit
d3c2a4348d
5 changed files with 216 additions and 0 deletions
|
|
@ -95,6 +95,7 @@ Deno.serve(async (req: Request) => {
|
|||
status: 'active',
|
||||
current_period_start: now.toISOString(),
|
||||
current_period_end: end.toISOString(),
|
||||
renewal_failures: 0,
|
||||
updated_at: now.toISOString(),
|
||||
})
|
||||
.eq('user_id', sub.user_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue