refactor(billing): remove Stripe; payments are Payple (web) and Google Play (mobile)
Some checks failed
ci / 정본·보안·린트·타입·테스트 (push) Failing after 1m13s
ci / 워크스페이스 빌드 검증 (push) Has been skipped
ci / 모바일 린트·타입·Jest (push) Failing after 1m4s
ci / Supabase Edge Functions + Cloudflare Worker (push) Successful in 37s
ci / .NET API 서버 테스트 (push) Successful in 27s
deploy-site / deploy (push) Failing after 20s
Some checks failed
ci / 정본·보안·린트·타입·테스트 (push) Failing after 1m13s
ci / 워크스페이스 빌드 검증 (push) Has been skipped
ci / 모바일 린트·타입·Jest (push) Failing after 1m4s
ci / Supabase Edge Functions + Cloudflare Worker (push) Successful in 37s
ci / .NET API 서버 테스트 (push) Successful in 27s
deploy-site / deploy (push) Failing after 20s
Stripe is not used. Keeping its checkout, portal and webhook paths meant a
second payment provider, a second return-URL format and dead UI.
- Delete the stripe-checkout, stripe-portal and stripe-webhook functions and
their config; billing-catalog serves Payple prices only, and the web parser
rejects a catalog that still mixes in Stripe prices.
- Web: drop the Stripe checkout/portal buttons, provider toggle and return
notices; billing shows Payple only. Past rows with provider='stripe' are
still displayed ("Stripe (종료)") with a support contact instead of a portal.
- Desktop: delete the Stripe checkout modal, payment IPC channels, preload
namespace and their types; "Remove ads with Pro" opens the web billing page
via license.openBilling. Support/refund copy names Payple.
- billingUrl() loses the Stripe-only success/canceled result option; the
Deno contract is regenerated.
- Migrations and the DB's accepted provider values are untouched (history).
- Docs and the backlog record the removal (MON-04, EXT-STRIPE-01, GAP-BILL-03).
Verified: typecheck (desktop/web/admin/api-client/mobile), contract:check,
deno check all functions, deno test 80/80, desktop 1478/1480 on the Electron
runtime (2 known environment failures), web and admin builds, release
metadata and mobile boundary self-tests, eslint on changed files.
This commit is contained in:
parent
7224e43bfb
commit
eedd127ea7
50 changed files with 97 additions and 2600 deletions
|
|
@ -12,7 +12,6 @@ const catalogPayload = {
|
|||
tier: 'pro',
|
||||
prices: [
|
||||
{ provider: 'payple', unit_amount: 9900, currency: 'KRW', interval: 'month', interval_count: 1 },
|
||||
{ provider: 'stripe', unit_amount: 999, currency: 'USD', interval: 'month', interval_count: 1 },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
@ -29,9 +28,8 @@ test.describe('billing catalog strict client contract', () => {
|
|||
const catalog = parseBillingCatalog(catalogPayload)
|
||||
expect(catalog).not.toBeNull()
|
||||
expect(formatBillingPrice(catalog!.plans.pro[0])).toContain('9,900')
|
||||
expect(formatBillingPrice(catalog!.plans.pro[1])).toContain('9.99')
|
||||
expect(formatPlanCatalogPrice('pro', catalog)).toContain('Payple')
|
||||
expect(formatPlanCatalogPrice('pro', catalog)).toContain('Stripe')
|
||||
expect(formatPlanCatalogPrice('pro', catalog)).toContain('9,900')
|
||||
expect(formatPlanCatalogPrice('pro_plus', catalog)).toContain('29,900')
|
||||
expect(formatPlanCatalogPrice('free', catalog)).toBe('무료')
|
||||
})
|
||||
|
||||
|
|
@ -56,6 +54,10 @@ test.describe('billing catalog strict client contract', () => {
|
|||
...catalogPayload,
|
||||
plans: [{ tier: 'pro', prices: [{ ...catalogPayload.plans[0].prices[0], currency: 'KRW<script>' }] }, catalogPayload.plans[1]],
|
||||
},
|
||||
{
|
||||
...catalogPayload,
|
||||
plans: [{ tier: 'pro', prices: [{ ...catalogPayload.plans[0].prices[0], provider: 'google_play' }] }, catalogPayload.plans[1]],
|
||||
},
|
||||
]
|
||||
for (const value of invalid) expect(parseBillingCatalog(value)).toBeNull()
|
||||
})
|
||||
|
|
|
|||
|
|
@ -138,10 +138,9 @@ test.describe('Billing provider and Payple DOM flow', () => {
|
|||
await expect(proPlan.getByTestId('payple-upgrade-pro')).toBeEnabled()
|
||||
await expect(page.getByTestId('billing-plan-pro_plus')).toBeVisible()
|
||||
|
||||
await proPlan.getByLabel('Stripe 해외 카드').click()
|
||||
await expect(proPlan.getByTestId('stripe-upgrade-pro')).toBeVisible()
|
||||
await proPlan.getByLabel('Payple 국내 카드').click()
|
||||
await expect(proPlan.getByRole('button', { name: /Stripe/ })).toHaveCount(0)
|
||||
|
||||
// 결제 경로가 없어도 과거 provider='stripe' 구독 행은 계속 읽혀야 한다.
|
||||
const stripePeriodEnd = new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString()
|
||||
const { error: stripeFixtureError } = await admin.from('subscriptions').update({
|
||||
tier: 'pro',
|
||||
|
|
@ -156,7 +155,7 @@ test.describe('Billing provider and Payple DOM flow', () => {
|
|||
if (stripeFixtureError) throw stripeFixtureError
|
||||
await page.reload()
|
||||
await expect(page.getByTestId('billing-current-provider')).toContainText('Stripe')
|
||||
await expect(page.getByTestId('stripe-portal-open')).toBeVisible()
|
||||
await expect(page.getByTestId('stripe-portal-open')).toHaveCount(0)
|
||||
await expect(page.getByTestId('billing-checkout-pro')).toHaveCount(0)
|
||||
|
||||
const { error: freeFixtureError } = await admin.from('subscriptions').update({
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ test.describe('Payple payer number and fail-closed checkout', () => {
|
|||
|
||||
test('rejects missing or tampered catalog price before opening Payple', async () => {
|
||||
for (const catalogPrice of [
|
||||
{ provider: 'stripe', unitAmount: 9900, currency: 'KRW', interval: 'month', intervalCount: 1 },
|
||||
{ provider: 'google_play', unitAmount: 9900, currency: 'KRW', interval: 'month', intervalCount: 1 },
|
||||
{ provider: 'payple', unitAmount: 1, currency: 'USD', interval: 'month', intervalCount: 1 },
|
||||
{ provider: 'payple', unitAmount: 9900, currency: 'KRW', interval: 'year', intervalCount: 1 },
|
||||
{ provider: 'payple', unitAmount: 0, currency: 'KRW', interval: 'month', intervalCount: 1 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue