refactor(server): payment service (#8906)

This commit is contained in:
forehalo
2024-12-05 08:31:00 +00:00
parent 4fe1b5ba93
commit 4055e3aa67
26 changed files with 1934 additions and 1537 deletions

View File

@@ -586,15 +586,6 @@ const InvoiceLine = ({
}
}, [invoice.link, urlService]);
const planText =
invoice.plan === SubscriptionPlan.AI
? 'AFFiNE AI'
: invoice.plan === SubscriptionPlan.Pro
? invoice.recurring === SubscriptionRecurring.Lifetime
? 'AFFiNE Cloud Believer'
: 'AFFiNE Cloud'
: null;
return (
<SettingRow
key={invoice.id}
@@ -603,7 +594,7 @@ const InvoiceLine = ({
invoice.status === InvoiceStatus.Paid
? t['com.affine.payment.billing-setting.paid']()
: ''
} $${invoice.amount / 100} - ${planText}`}
} $${invoice.amount / 100}`}
>
<Button onClick={open}>
{t['com.affine.payment.billing-setting.view-invoice']()}