payment-kit 1.19.0 → 1.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/api/src/crons/index.ts +8 -0
  2. package/api/src/index.ts +4 -0
  3. package/api/src/libs/credit-grant.ts +146 -0
  4. package/api/src/libs/env.ts +1 -0
  5. package/api/src/libs/invoice.ts +4 -3
  6. package/api/src/libs/notification/template/base.ts +388 -2
  7. package/api/src/libs/notification/template/customer-credit-grant-granted.ts +149 -0
  8. package/api/src/libs/notification/template/customer-credit-grant-low-balance.ts +151 -0
  9. package/api/src/libs/notification/template/customer-credit-insufficient.ts +254 -0
  10. package/api/src/libs/notification/template/subscription-canceled.ts +193 -202
  11. package/api/src/libs/notification/template/subscription-refund-succeeded.ts +215 -237
  12. package/api/src/libs/notification/template/subscription-renewed.ts +130 -200
  13. package/api/src/libs/notification/template/subscription-succeeded.ts +100 -202
  14. package/api/src/libs/notification/template/subscription-trial-start.ts +142 -188
  15. package/api/src/libs/notification/template/subscription-trial-will-end.ts +146 -174
  16. package/api/src/libs/notification/template/subscription-upgraded.ts +96 -192
  17. package/api/src/libs/notification/template/subscription-will-canceled.ts +94 -135
  18. package/api/src/libs/notification/template/subscription-will-renew.ts +220 -245
  19. package/api/src/libs/payment.ts +69 -0
  20. package/api/src/libs/queue/index.ts +3 -2
  21. package/api/src/libs/session.ts +8 -0
  22. package/api/src/libs/subscription.ts +74 -3
  23. package/api/src/libs/util.ts +3 -1
  24. package/api/src/libs/ws.ts +23 -1
  25. package/api/src/locales/en.ts +33 -0
  26. package/api/src/locales/zh.ts +31 -0
  27. package/api/src/queues/credit-consume.ts +728 -0
  28. package/api/src/queues/credit-grant.ts +572 -0
  29. package/api/src/queues/notification.ts +173 -128
  30. package/api/src/queues/payment.ts +210 -122
  31. package/api/src/queues/subscription.ts +179 -0
  32. package/api/src/routes/checkout-sessions.ts +157 -9
  33. package/api/src/routes/connect/shared.ts +3 -2
  34. package/api/src/routes/credit-grants.ts +241 -0
  35. package/api/src/routes/credit-transactions.ts +208 -0
  36. package/api/src/routes/customers.ts +34 -5
  37. package/api/src/routes/index.ts +8 -0
  38. package/api/src/routes/meter-events.ts +347 -0
  39. package/api/src/routes/meters.ts +219 -0
  40. package/api/src/routes/payment-currencies.ts +20 -2
  41. package/api/src/routes/payment-links.ts +1 -1
  42. package/api/src/routes/payment-methods.ts +14 -2
  43. package/api/src/routes/prices.ts +43 -0
  44. package/api/src/routes/pricing-table.ts +13 -7
  45. package/api/src/routes/products.ts +63 -4
  46. package/api/src/routes/settings.ts +1 -1
  47. package/api/src/routes/subscriptions.ts +4 -0
  48. package/api/src/routes/webhook-endpoints.ts +0 -3
  49. package/api/src/store/migrations/20250610-billing-credit.ts +43 -0
  50. package/api/src/store/models/credit-grant.ts +486 -0
  51. package/api/src/store/models/credit-transaction.ts +268 -0
  52. package/api/src/store/models/customer.ts +8 -0
  53. package/api/src/store/models/index.ts +52 -1
  54. package/api/src/store/models/meter-event.ts +423 -0
  55. package/api/src/store/models/meter.ts +176 -0
  56. package/api/src/store/models/payment-currency.ts +66 -14
  57. package/api/src/store/models/price.ts +6 -0
  58. package/api/src/store/models/product.ts +2 -2
  59. package/api/src/store/models/subscription.ts +24 -0
  60. package/api/src/store/models/types.ts +28 -2
  61. package/api/tests/libs/subscription.spec.ts +53 -0
  62. package/blocklet.yml +9 -1
  63. package/package.json +4 -4
  64. package/scripts/sdk.js +233 -1
  65. package/src/app.tsx +10 -0
  66. package/src/components/collapse.tsx +11 -1
  67. package/src/components/conditional-section.tsx +87 -0
  68. package/src/components/customer/credit-grant-item-list.tsx +99 -0
  69. package/src/components/customer/credit-overview.tsx +246 -0
  70. package/src/components/customer/form.tsx +7 -3
  71. package/src/components/invoice/list.tsx +19 -1
  72. package/src/components/metadata/form.tsx +287 -91
  73. package/src/components/meter/actions.tsx +101 -0
  74. package/src/components/meter/add-usage-dialog.tsx +239 -0
  75. package/src/components/meter/events-list.tsx +657 -0
  76. package/src/components/meter/form.tsx +245 -0
  77. package/src/components/meter/products.tsx +264 -0
  78. package/src/components/meter/usage-guide.tsx +174 -0
  79. package/src/components/payment-currency/form.tsx +2 -0
  80. package/src/components/payment-intent/list.tsx +19 -1
  81. package/src/components/payment-link/item.tsx +2 -2
  82. package/src/components/payment-link/preview.tsx +1 -1
  83. package/src/components/payment-link/product-select.tsx +52 -12
  84. package/src/components/payment-method/arcblock.tsx +2 -0
  85. package/src/components/payment-method/base.tsx +2 -0
  86. package/src/components/payment-method/bitcoin.tsx +2 -0
  87. package/src/components/payment-method/ethereum.tsx +2 -0
  88. package/src/components/payment-method/stripe.tsx +2 -0
  89. package/src/components/payouts/list.tsx +19 -1
  90. package/src/components/payouts/portal/list.tsx +6 -11
  91. package/src/components/price/currency-select.tsx +56 -32
  92. package/src/components/price/form.tsx +912 -407
  93. package/src/components/pricing-table/preview.tsx +1 -1
  94. package/src/components/product/add-price.tsx +9 -7
  95. package/src/components/product/create.tsx +7 -4
  96. package/src/components/product/edit-price.tsx +21 -12
  97. package/src/components/product/features.tsx +17 -7
  98. package/src/components/product/form.tsx +100 -90
  99. package/src/components/refund/list.tsx +19 -1
  100. package/src/components/section/header.tsx +5 -18
  101. package/src/components/subscription/items/index.tsx +1 -1
  102. package/src/components/subscription/metrics.tsx +37 -5
  103. package/src/components/subscription/portal/actions.tsx +2 -1
  104. package/src/contexts/products.tsx +26 -9
  105. package/src/hooks/subscription.ts +34 -0
  106. package/src/libs/meter-utils.ts +196 -0
  107. package/src/libs/util.ts +4 -0
  108. package/src/locales/en.tsx +389 -5
  109. package/src/locales/zh.tsx +368 -1
  110. package/src/pages/admin/billing/index.tsx +61 -33
  111. package/src/pages/admin/billing/invoices/detail.tsx +1 -1
  112. package/src/pages/admin/billing/meters/create.tsx +60 -0
  113. package/src/pages/admin/billing/meters/detail.tsx +435 -0
  114. package/src/pages/admin/billing/meters/index.tsx +210 -0
  115. package/src/pages/admin/billing/meters/meter-event.tsx +346 -0
  116. package/src/pages/admin/billing/subscriptions/detail.tsx +47 -14
  117. package/src/pages/admin/customers/customers/credit-grant/detail.tsx +391 -0
  118. package/src/pages/admin/customers/customers/detail.tsx +14 -10
  119. package/src/pages/admin/customers/index.tsx +5 -0
  120. package/src/pages/admin/developers/events/detail.tsx +1 -1
  121. package/src/pages/admin/developers/index.tsx +1 -1
  122. package/src/pages/admin/payments/intents/detail.tsx +1 -1
  123. package/src/pages/admin/payments/payouts/detail.tsx +1 -1
  124. package/src/pages/admin/payments/refunds/detail.tsx +1 -1
  125. package/src/pages/admin/products/index.tsx +3 -2
  126. package/src/pages/admin/products/links/detail.tsx +1 -1
  127. package/src/pages/admin/products/prices/actions.tsx +16 -4
  128. package/src/pages/admin/products/prices/detail.tsx +30 -3
  129. package/src/pages/admin/products/prices/list.tsx +8 -1
  130. package/src/pages/admin/products/pricing-tables/detail.tsx +1 -1
  131. package/src/pages/admin/products/products/create.tsx +233 -57
  132. package/src/pages/admin/products/products/detail.tsx +2 -1
  133. package/src/pages/admin/settings/payment-methods/index.tsx +3 -0
  134. package/src/pages/customer/credit-grant/detail.tsx +308 -0
  135. package/src/pages/customer/index.tsx +44 -9
  136. package/src/pages/customer/recharge/account.tsx +5 -5
  137. package/src/pages/customer/subscription/change-payment.tsx +4 -2
  138. package/src/pages/customer/subscription/detail.tsx +48 -14
  139. package/src/pages/customer/subscription/embed.tsx +1 -1
@@ -0,0 +1,99 @@
1
+ /* eslint-disable react/no-unstable-nested-components */
2
+ import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
3
+ import { formatPrice, Table, usePaymentContext } from '@blocklet/payment-react';
4
+ import type { TLineItemExpanded, TPaymentCurrency, TPriceExpanded } from '@blocklet/payment-types';
5
+ import { Avatar, Stack, Typography, Box } from '@mui/material';
6
+ import { useNavigate } from 'react-router-dom';
7
+ import Copyable from '../copyable';
8
+
9
+ type CreditGrantItemListProps = {
10
+ data: TLineItemExpanded[];
11
+ currency: TPaymentCurrency;
12
+ mode?: 'dashboard' | 'portal';
13
+ };
14
+
15
+ export default function CreditGrantItemList({ data, currency, mode = 'portal' }: CreditGrantItemListProps) {
16
+ const { t } = useLocaleContext();
17
+ const navigate = useNavigate();
18
+ const { session } = usePaymentContext();
19
+ const isAdmin = mode === 'dashboard' && ['owner', 'admin'].includes(session?.user?.role || '');
20
+
21
+ const viewProduct = (price: TPriceExpanded) => {
22
+ if (!isAdmin) {
23
+ return;
24
+ }
25
+ navigate(`/admin/products/${price.product_id}?price_id=${price.id}&currency_id=${price.currency_id}`);
26
+ };
27
+
28
+ const columns = [
29
+ {
30
+ label: t('admin.subscription.product'),
31
+ name: 'product_id',
32
+ options: {
33
+ customBodyRenderLite: (_: string, index: number) => {
34
+ const item = data[index] as TLineItemExpanded;
35
+ return (
36
+ <Stack direction="row" spacing={1} onClick={() => viewProduct(item.price)}>
37
+ <Avatar
38
+ src={item.price?.product?.images?.[0]}
39
+ alt={item.price?.product?.name}
40
+ variant="square"
41
+ sx={{ borderRadius: 1 }}
42
+ />
43
+ <Stack direction="column" spacing={0.5}>
44
+ <Typography
45
+ variant="body2"
46
+ sx={{
47
+ fontWeight: 500,
48
+ }}>
49
+ {item.price?.product?.name}
50
+ </Typography>
51
+ <Typography
52
+ variant="body2"
53
+ sx={{
54
+ color: 'text.secondary',
55
+ }}>
56
+ {formatPrice(item.price, currency, item.price?.product?.unit_label || '')}
57
+ </Typography>
58
+ </Stack>
59
+ </Stack>
60
+ );
61
+ },
62
+ },
63
+ },
64
+ {
65
+ label: t('common.id'),
66
+ name: 'id',
67
+ options: {
68
+ customBodyRenderLite: (_: string, index: number) => {
69
+ const item = data[index] as TLineItemExpanded;
70
+ return (
71
+ <Box onClick={() => viewProduct(item.price)}>
72
+ <Copyable text={item.id} />
73
+ </Box>
74
+ );
75
+ },
76
+ },
77
+ },
78
+ ].filter(Boolean);
79
+
80
+ return (
81
+ <Table
82
+ data={data}
83
+ columns={columns}
84
+ loading={false}
85
+ footer={false}
86
+ toolbar={false}
87
+ components={{
88
+ TableToolbar: () => null,
89
+ TableFooter: () => null,
90
+ }}
91
+ options={{
92
+ count: data.length,
93
+ page: 0,
94
+ rowsPerPage: 100,
95
+ }}
96
+ emptyNodeText={t('admin.customer.creditGrants.noApplicableProducts')}
97
+ />
98
+ );
99
+ }
@@ -0,0 +1,246 @@
1
+ import { formatBNStr, CreditGrantsList, CreditTransactionsList, api } from '@blocklet/payment-react';
2
+ import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
3
+ import { Avatar, Box, Card, CardContent, Stack, Typography, Tabs, Tab } from '@mui/material';
4
+ import { useMemo, useState } from 'react';
5
+ import type { TPaymentCurrency } from '@blocklet/payment-types';
6
+ import { useRequest } from 'ahooks';
7
+ import { useConditionalSection } from '../conditional-section';
8
+
9
+ enum CreditTab {
10
+ OVERVIEW = 'overview',
11
+ GRANTS = 'grants',
12
+ TRANSACTIONS = 'transactions',
13
+ }
14
+
15
+ interface CreditOverviewProps {
16
+ customerId: string;
17
+ settings: any;
18
+ mode?: 'portal' | 'dashboard';
19
+ }
20
+
21
+ const fetchCreditSummary = async (customerId: string) => {
22
+ try {
23
+ const [grantsResponse, pendingAmountResponse] = await Promise.all([
24
+ api.get(`/api/credit-grants/summary?customer_id=${customerId}`),
25
+ api.get(`/api/meter-events/pending-amount?customer_id=${customerId}`),
26
+ // api.get(`/api/credit-transactions/summary?customer_id=${customerId}`),
27
+ ]);
28
+
29
+ return {
30
+ grants: grantsResponse.data,
31
+ // transactions: transactionsResponse.data,
32
+ pendingAmount: pendingAmountResponse.data,
33
+ };
34
+ } catch (error) {
35
+ console.error('Failed to fetch credit summary:', error);
36
+ return {
37
+ grants: null,
38
+ transactions: null,
39
+ pendingAmount: null,
40
+ };
41
+ }
42
+ };
43
+
44
+ export default function CreditOverview({ customerId, settings, mode = 'portal' }: CreditOverviewProps) {
45
+ const { t } = useLocaleContext();
46
+ const [creditTab, setCreditTab] = useState<CreditTab>(CreditTab.OVERVIEW);
47
+ const conditionalSection = useConditionalSection();
48
+
49
+ const creditCurrencies = useMemo(() => {
50
+ return (
51
+ settings?.paymentMethods
52
+ ?.filter((method: any) => method.type === 'arcblock')
53
+ ?.flatMap((method: any) => method.payment_currencies)
54
+ ?.filter((currency: TPaymentCurrency) => {
55
+ return currency.type === 'credit';
56
+ }) || []
57
+ );
58
+ }, [settings]);
59
+
60
+ const { data: creditSummary } = useRequest(fetchCreditSummary, {
61
+ defaultParams: [customerId],
62
+ refreshDeps: [creditTab === CreditTab.OVERVIEW],
63
+ onSuccess: (data) => {
64
+ if (creditTab === CreditTab.OVERVIEW) {
65
+ const filteredCurrencies = creditCurrencies.filter((currency: TPaymentCurrency) => {
66
+ return data.grants?.[currency.id];
67
+ });
68
+ conditionalSection?.hideRender(filteredCurrencies.length === 0);
69
+ }
70
+ },
71
+ });
72
+
73
+ // 渲染信用概览卡片
74
+ const renderCreditOverviewCard = (currency: any) => {
75
+ const method = settings?.paymentMethods?.find((m: any) => m.id === currency.payment_method_id);
76
+ if (method?.type !== 'arcblock') {
77
+ return null;
78
+ }
79
+
80
+ const currencyId = currency.id as string;
81
+ const grantData = creditSummary?.grants?.[currencyId];
82
+ const pendingAmount = creditSummary?.pendingAmount?.[currencyId] || '0';
83
+
84
+ if (!grantData) {
85
+ return null;
86
+ }
87
+
88
+ const totalAmount = grantData.totalAmount || '0';
89
+ const remainingAmount = grantData.remainingAmount || '0';
90
+
91
+ return (
92
+ <Card
93
+ key={currency.id}
94
+ sx={{
95
+ height: '100%',
96
+ display: 'flex',
97
+ flexDirection: 'column',
98
+ border: '1px solid',
99
+ borderColor: 'divider',
100
+ boxShadow: 1,
101
+ borderRadius: 1,
102
+ }}>
103
+ <CardContent sx={{ flexGrow: 1 }}>
104
+ <Stack spacing={2}>
105
+ {/* 货币信息 */}
106
+ <Stack
107
+ direction="row"
108
+ spacing={1}
109
+ sx={{
110
+ alignItems: 'center',
111
+ }}>
112
+ <Avatar src={currency.logo} alt={currency.symbol} sx={{ width: 24, height: 24 }} />
113
+ <Typography variant="h6" component="div">
114
+ {currency.name}
115
+ </Typography>
116
+ </Stack>
117
+
118
+ {/* 可用额度 / 总额度 */}
119
+ <Box sx={{ display: 'flex', justifyContent: 'space-between' }}>
120
+ <Typography
121
+ variant="body2"
122
+ gutterBottom
123
+ sx={{
124
+ color: 'text.secondary',
125
+ }}>
126
+ {t('admin.customer.creditGrants.creditBalance')}
127
+ </Typography>
128
+ <Typography variant="h5" component="div" sx={{ fontWeight: 'normal' }}>
129
+ {totalAmount === '0' && remainingAmount === '0' ? (
130
+ <>0 {currency.symbol}</>
131
+ ) : (
132
+ <>
133
+ {formatBNStr(remainingAmount, currency.decimal, 6, true)} /{' '}
134
+ {formatBNStr(totalAmount, currency.decimal, 6, true)} {currency.symbol}
135
+ </>
136
+ )}
137
+ </Typography>
138
+ </Box>
139
+
140
+ {/* 欠费额度 */}
141
+ {pendingAmount !== '0' && (
142
+ <Box sx={{ display: 'flex', justifyContent: 'space-between' }}>
143
+ <Typography
144
+ variant="body2"
145
+ gutterBottom
146
+ sx={{
147
+ color: 'text.secondary',
148
+ }}>
149
+ {t('admin.customer.creditGrants.pendingAmount')}
150
+ </Typography>
151
+ <Typography
152
+ variant="body1"
153
+ sx={{
154
+ color: 'error.main',
155
+ }}>
156
+ {formatBNStr(pendingAmount, currency.decimal, 6, true)} {currency.symbol}
157
+ </Typography>
158
+ </Box>
159
+ )}
160
+ </Stack>
161
+ </CardContent>
162
+ </Card>
163
+ );
164
+ };
165
+
166
+ const filteredCreditCurrencies = useMemo(() => {
167
+ return creditCurrencies.filter((currency: TPaymentCurrency) => {
168
+ return creditSummary?.grants?.[currency.id];
169
+ });
170
+ }, [creditCurrencies, creditSummary?.grants]);
171
+
172
+ return (
173
+ <Stack sx={{ width: '100%' }}>
174
+ <Tabs
175
+ value={creditTab}
176
+ onChange={(_, newValue) => setCreditTab(newValue as CreditTab)}
177
+ // sx={{ borderBottom: 1, borderColor: 'divider', }}
178
+ sx={{
179
+ flex: '1 0 auto',
180
+ maxWidth: '100%',
181
+ fontSize: 14,
182
+ borderBottom: 1,
183
+ borderColor: 'divider',
184
+ '.Mui-selected': {
185
+ fontSize: '14px !important',
186
+ color: 'primary.main',
187
+ },
188
+ }}>
189
+ <Tab label={t('admin.creditGrants.overview')} value={CreditTab.OVERVIEW} />
190
+ <Tab label={t('admin.creditGrants.title')} value={CreditTab.GRANTS} />
191
+ <Tab label={t('admin.creditTransactions.title')} value={CreditTab.TRANSACTIONS} />
192
+ </Tabs>
193
+ {/* 概览标签页 */}
194
+ {creditTab === CreditTab.OVERVIEW && (
195
+ <Box sx={{ width: '100%', mt: 1 }} key={creditTab}>
196
+ <Box
197
+ sx={{
198
+ display: 'grid',
199
+ gridTemplateColumns: {
200
+ xs: 'repeat(1, 1fr)',
201
+ md: 'repeat(2, 1fr)',
202
+ },
203
+ gap: 2,
204
+ '@container (max-width: 600px)': {
205
+ gridTemplateColumns: 'repeat(1, 1fr)',
206
+ },
207
+ }}>
208
+ {filteredCreditCurrencies.map(renderCreditOverviewCard)}
209
+ </Box>
210
+
211
+ {filteredCreditCurrencies.length === 0 && (
212
+ <Box
213
+ sx={{
214
+ display: 'flex',
215
+ flexDirection: 'column',
216
+ alignItems: 'center',
217
+ justifyContent: 'center',
218
+ py: 8,
219
+ textAlign: 'center',
220
+ }}>
221
+ <Typography
222
+ variant="h6"
223
+ gutterBottom
224
+ sx={{
225
+ color: 'text.secondary',
226
+ }}>
227
+ {t('admin.customer.creditGrants.noGrants')}
228
+ </Typography>
229
+ <Typography
230
+ variant="body2"
231
+ sx={{
232
+ color: 'text.secondary',
233
+ }}>
234
+ {t('admin.customer.creditGrants.noGrantsDescription')}
235
+ </Typography>
236
+ </Box>
237
+ )}
238
+ </Box>
239
+ )}
240
+ {creditTab === CreditTab.GRANTS && <CreditGrantsList customer_id={customerId} mode={mode} key={creditTab} />}
241
+ {creditTab === CreditTab.TRANSACTIONS && (
242
+ <CreditTransactionsList customer_id={customerId} mode={mode} key={creditTab} />
243
+ )}
244
+ </Stack>
245
+ );
246
+ }
@@ -8,8 +8,9 @@ import {
8
8
  validatePhoneNumber,
9
9
  getPhoneUtil,
10
10
  validatePostalCode,
11
+ FormLabel,
11
12
  } from '@blocklet/payment-react';
12
- import { FormLabel, Stack } from '@mui/material';
13
+ import { Stack } from '@mui/material';
13
14
  import { Controller, useFormContext, useWatch } from 'react-hook-form';
14
15
  import isEmail from 'validator/es/lib/isEmail';
15
16
  import { useMount } from 'ahooks';
@@ -81,13 +82,16 @@ export default function CustomerForm() {
81
82
  },
82
83
  }}
83
84
  />
84
-
85
85
  <FormLabel className="base-label">{t('payment.checkout.billing.required')}</FormLabel>
86
86
  <Controller
87
87
  name="address.country"
88
88
  control={control}
89
89
  render={({ field }) => (
90
- <CountrySelect {...field} ref={field.ref as unknown as React.RefObject<HTMLDivElement>} sx={{ pl: '6px' }} />
90
+ <CountrySelect
91
+ {...field}
92
+ ref={field.ref as unknown as React.RefObject<HTMLDivElement | null>}
93
+ sx={{ pl: '6px' }}
94
+ />
91
95
  )}
92
96
  />
93
97
  <FormInput
@@ -12,7 +12,7 @@ import {
12
12
  getTxLink,
13
13
  } from '@blocklet/payment-react';
14
14
  import type { TInvoiceExpanded } from '@blocklet/payment-types';
15
- import { CircularProgress, Typography } from '@mui/material';
15
+ import { Avatar, CircularProgress, Typography } from '@mui/material';
16
16
  import { useLocalStorageState } from 'ahooks';
17
17
  import { useEffect, useState } from 'react';
18
18
  import { Link } from 'react-router-dom';
@@ -176,6 +176,24 @@ export default function InvoiceList({
176
176
  },
177
177
  },
178
178
  },
179
+ {
180
+ label: t('common.paymentMethod'),
181
+ name: 'paymentMethod',
182
+ width: 120,
183
+ options: {
184
+ customBodyRenderLite: (_: string, index: number) => {
185
+ const invoice = data?.list[index] as TInvoiceExpanded;
186
+ return (
187
+ <InvoiceLink invoice={invoice}>
188
+ <Typography sx={{ display: 'flex', alignItems: 'center', whiteSpace: 'nowrap' }}>
189
+ <Avatar src={invoice.paymentMethod.logo} sx={{ width: 18, height: 18, mr: 1 }} />
190
+ {invoice.paymentMethod.name}
191
+ </Typography>
192
+ </InvoiceLink>
193
+ );
194
+ },
195
+ },
196
+ },
179
197
  {
180
198
  label: t('common.status'),
181
199
  name: 'status',