payment-kit 1.18.6 → 1.18.8
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.
- package/api/src/libs/auth.ts +1 -1
- package/api/src/routes/connect/change-payment.ts +47 -22
- package/api/src/routes/connect/change-plan.ts +45 -20
- package/api/src/routes/connect/setup.ts +46 -21
- package/api/src/routes/connect/subscribe.ts +40 -21
- package/api/src/routes/payment-links.ts +1 -1
- package/blocklet.yml +1 -1
- package/package.json +19 -19
- package/src/components/filter-toolbar.tsx +10 -10
- package/src/components/layout/admin.tsx +1 -0
- package/src/components/payment-link/product-select.tsx +1 -1
- package/src/components/price/currency-select.tsx +3 -1
- package/src/components/price/form.tsx +1 -1
- package/src/components/section/header.tsx +1 -1
- package/src/components/subscription/list.tsx +1 -0
- package/src/components/uploader.tsx +1 -0
- package/src/global.css +4 -4
- package/src/libs/util.ts +13 -0
- package/src/pages/admin/developers/webhooks/detail.tsx +1 -1
- package/src/pages/admin/overview.tsx +3 -3
- package/src/pages/admin/payments/intents/detail.tsx +1 -1
- package/src/pages/admin/payments/payouts/detail.tsx +1 -1
- package/src/pages/admin/payments/refunds/detail.tsx +1 -1
- package/src/pages/admin/products/products/detail.tsx +1 -1
- package/src/pages/customer/payout/detail.tsx +1 -1
- package/src/pages/customer/recharge.tsx +35 -6
- package/src/pages/customer/subscription/change-payment.tsx +8 -2
- package/src/pages/customer/subscription/change-plan.tsx +1 -1
- package/src/pages/integrations/donations/index.tsx +1 -1
- package/src/pages/integrations/donations/preview.tsx +73 -52
- package/src/pages/integrations/overview.tsx +63 -40
|
@@ -1,25 +1,32 @@
|
|
|
1
1
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
2
|
-
import { Box,
|
|
2
|
+
import { Box, Grid, Typography, Divider } from '@mui/material';
|
|
3
3
|
import { useNavigate } from 'react-router-dom';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
Link as LinkIcon,
|
|
6
|
+
Payment,
|
|
7
|
+
Code,
|
|
8
|
+
Inventory2Outlined,
|
|
9
|
+
TableChartOutlined,
|
|
10
|
+
FavoriteBorderOutlined,
|
|
11
|
+
} from '@mui/icons-material';
|
|
5
12
|
|
|
6
13
|
const basicFeatures = [
|
|
7
14
|
{
|
|
8
15
|
title: 'integrations.features.products.title',
|
|
9
16
|
description: 'integrations.features.products.intro',
|
|
10
|
-
icon: <
|
|
17
|
+
icon: <Inventory2Outlined sx={{ fontSize: 32, color: 'text.lighter' }} />,
|
|
11
18
|
path: '/admin/products',
|
|
12
19
|
},
|
|
13
20
|
{
|
|
14
21
|
title: 'integrations.features.paymentLinks.title',
|
|
15
22
|
description: 'integrations.features.paymentLinks.intro',
|
|
16
|
-
icon: <LinkIcon
|
|
23
|
+
icon: <LinkIcon sx={{ fontSize: 32, color: 'text.lighter' }} />,
|
|
17
24
|
path: '/admin/products/links',
|
|
18
25
|
},
|
|
19
26
|
{
|
|
20
27
|
title: 'integrations.features.pricingTables.title',
|
|
21
28
|
description: 'integrations.features.pricingTables.intro',
|
|
22
|
-
icon: <
|
|
29
|
+
icon: <TableChartOutlined sx={{ fontSize: 32, color: 'text.lighter' }} />,
|
|
23
30
|
path: '/admin/products/pricing-tables',
|
|
24
31
|
},
|
|
25
32
|
];
|
|
@@ -28,20 +35,20 @@ const advancedFeatures = [
|
|
|
28
35
|
{
|
|
29
36
|
title: 'integrations.features.donate.title',
|
|
30
37
|
description: 'integrations.features.donate.intro',
|
|
31
|
-
icon: <
|
|
38
|
+
icon: <FavoriteBorderOutlined sx={{ fontSize: 32, color: 'text.lighter' }} />,
|
|
32
39
|
path: '/integrations/donations',
|
|
33
40
|
},
|
|
34
41
|
{
|
|
35
42
|
title: 'integrations.features.paymentMethods.title',
|
|
36
43
|
description: 'integrations.features.paymentMethods.intro',
|
|
37
|
-
icon: <Payment
|
|
44
|
+
icon: <Payment sx={{ fontSize: 32, color: 'text.lighter' }} />,
|
|
38
45
|
path: '/admin/settings/payment-methods',
|
|
39
46
|
},
|
|
40
47
|
{
|
|
41
48
|
title: 'integrations.features.api.title',
|
|
42
49
|
description: 'integrations.features.api.intro',
|
|
43
|
-
icon: <Code
|
|
44
|
-
path: 'https://www.
|
|
50
|
+
icon: <Code sx={{ fontSize: 32, color: 'text.lighter' }} />,
|
|
51
|
+
path: 'https://www.arcblock.io/docs/arcblock-payment-kit/en/start-payment-js',
|
|
45
52
|
external: true,
|
|
46
53
|
},
|
|
47
54
|
];
|
|
@@ -61,7 +68,7 @@ export default function Overview() {
|
|
|
61
68
|
return (
|
|
62
69
|
<Box>
|
|
63
70
|
<Box mb={4}>
|
|
64
|
-
<Typography variant="h2" gutterBottom fontWeight="bold" mb={
|
|
71
|
+
<Typography variant="h2" gutterBottom fontWeight="bold" mb={1}>
|
|
65
72
|
{t('common.welcome')}
|
|
66
73
|
</Typography>
|
|
67
74
|
<Typography variant="body1" color="text.secondary" mb={2}>
|
|
@@ -69,50 +76,66 @@ export default function Overview() {
|
|
|
69
76
|
</Typography>
|
|
70
77
|
</Box>
|
|
71
78
|
|
|
72
|
-
<Typography variant="
|
|
79
|
+
<Typography variant="h3" gutterBottom mb={2}>
|
|
73
80
|
{t('integrations.basicFeatures')} 🚀
|
|
74
81
|
</Typography>
|
|
75
|
-
<Grid container spacing={
|
|
82
|
+
<Grid container spacing={2} mb={4} sx={{ maxWidth: 1200 }}>
|
|
76
83
|
{basicFeatures.map((item) => (
|
|
77
84
|
<Grid item xs={12} sm={6} md={4} key={item.path}>
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
<Box
|
|
86
|
+
className="base-card"
|
|
87
|
+
onClick={() => handleClick(item)}
|
|
88
|
+
sx={{
|
|
89
|
+
height: '100%',
|
|
90
|
+
cursor: 'pointer',
|
|
91
|
+
'&:hover': {
|
|
92
|
+
boxShadow:
|
|
93
|
+
'0px 0px 0px 1px var(--shadows-card-hover-1, rgba(2, 7, 19, 0.08)), 0px 1px 2px -1px var(--shadows-card-hover-2, rgba(2, 7, 19, 0.08)), 0px 2px 8px 0px var(--shadows-card-hover-3, rgba(2, 7, 19, 0.10))',
|
|
94
|
+
},
|
|
95
|
+
}}>
|
|
96
|
+
<Box mb={1}>
|
|
97
|
+
{item.icon}
|
|
98
|
+
<Typography variant="h4" mt={1.5}>
|
|
99
|
+
{t(item.title)}
|
|
100
|
+
</Typography>
|
|
101
|
+
</Box>
|
|
102
|
+
<Typography variant="body2" color="text.secondary">
|
|
103
|
+
{t(item.description)}
|
|
104
|
+
</Typography>
|
|
105
|
+
</Box>
|
|
91
106
|
</Grid>
|
|
92
107
|
))}
|
|
93
108
|
</Grid>
|
|
94
109
|
|
|
95
110
|
<Divider sx={{ my: 4 }} />
|
|
96
111
|
|
|
97
|
-
<Typography variant="
|
|
112
|
+
<Typography variant="h3" gutterBottom mb={2}>
|
|
98
113
|
{t('integrations.advancedFeatures')} 🔥
|
|
99
114
|
</Typography>
|
|
100
|
-
<Grid container spacing={
|
|
115
|
+
<Grid container spacing={2} sx={{ maxWidth: 1200 }}>
|
|
101
116
|
{advancedFeatures.map((item) => (
|
|
102
117
|
<Grid item xs={12} sm={6} md={4} key={item.path}>
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
<Box
|
|
119
|
+
className="base-card"
|
|
120
|
+
onClick={() => handleClick(item)}
|
|
121
|
+
sx={{
|
|
122
|
+
height: '100%',
|
|
123
|
+
cursor: 'pointer',
|
|
124
|
+
'&:hover': {
|
|
125
|
+
boxShadow:
|
|
126
|
+
'0px 0px 0px 1px var(--shadows-card-hover-1, rgba(2, 7, 19, 0.08)), 0px 1px 2px -1px var(--shadows-card-hover-2, rgba(2, 7, 19, 0.08)), 0px 2px 8px 0px var(--shadows-card-hover-3, rgba(2, 7, 19, 0.10))',
|
|
127
|
+
},
|
|
128
|
+
}}>
|
|
129
|
+
<Box mb={1}>
|
|
130
|
+
{item.icon}
|
|
131
|
+
<Typography variant="h6" mt={1.5}>
|
|
132
|
+
{t(item.title)}
|
|
133
|
+
</Typography>
|
|
134
|
+
</Box>
|
|
135
|
+
<Typography variant="body2" color="text.secondary">
|
|
136
|
+
{t(item.description)}
|
|
137
|
+
</Typography>
|
|
138
|
+
</Box>
|
|
116
139
|
</Grid>
|
|
117
140
|
))}
|
|
118
141
|
</Grid>
|