payment-kit 1.13.147 → 1.13.149

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.
@@ -74,7 +74,7 @@ export const handlePaymentSucceed = async (paymentIntent: PaymentIntent) => {
74
74
  }
75
75
  }
76
76
 
77
- if (invoice.billing_reason === 'subscription_cycle') {
77
+ if (invoice.billing_reason === 'subscription_cycle' || paymentIntent.capture_method === 'manual') {
78
78
  createEvent('Subscription', 'customer.subscription.renewed', subscription).catch(console.error);
79
79
  }
80
80
  if (invoice.billing_reason === 'subscription_update') {
package/blocklet.yml CHANGED
@@ -14,7 +14,7 @@ repository:
14
14
  type: git
15
15
  url: git+https://github.com/blocklet/payment-kit.git
16
16
  specVersion: 1.2.8
17
- version: 1.13.147
17
+ version: 1.13.149
18
18
  logo: logo.png
19
19
  files:
20
20
  - dist
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payment-kit",
3
- "version": "1.13.147",
3
+ "version": "1.13.149",
4
4
  "scripts": {
5
5
  "dev": "cross-env COMPONENT_STORE_URL=https://test.store.blocklet.dev blocklet dev --open",
6
6
  "eject": "vite eject",
@@ -50,7 +50,7 @@
50
50
  "@arcblock/jwt": "^1.18.110",
51
51
  "@arcblock/ux": "^2.9.29",
52
52
  "@blocklet/logger": "1.16.23",
53
- "@blocklet/payment-react": "1.13.147",
53
+ "@blocklet/payment-react": "1.13.149",
54
54
  "@blocklet/sdk": "1.16.23",
55
55
  "@blocklet/ui-react": "^2.9.29",
56
56
  "@blocklet/uploader": "^0.0.73",
@@ -110,7 +110,7 @@
110
110
  "devDependencies": {
111
111
  "@abtnode/types": "1.16.23",
112
112
  "@arcblock/eslint-config-ts": "^0.2.4",
113
- "@blocklet/payment-types": "1.13.147",
113
+ "@blocklet/payment-types": "1.13.149",
114
114
  "@types/cookie-parser": "^1.4.6",
115
115
  "@types/cors": "^2.8.17",
116
116
  "@types/dotenv-flow": "^3.3.3",
@@ -149,5 +149,5 @@
149
149
  "parser": "typescript"
150
150
  }
151
151
  },
152
- "gitHead": "9fd7b32ada89697a6e5c8b5a1c5c4729dca50c51"
152
+ "gitHead": "0edf179eb97dccee7d6ccbee7ffc00d845e4cad4"
153
153
  }
@@ -93,7 +93,7 @@ export default function PaymentList({ customer_id, invoice_id, features }: ListP
93
93
  }, 1000)();
94
94
  }, [search]);
95
95
 
96
- if (!data.length) {
96
+ if (!data.list) {
97
97
  return <CircularProgress />;
98
98
  }
99
99
 
@@ -73,11 +73,20 @@ export default function PaymentLinkActions({ data, variant, onChange }: Props) {
73
73
  Toast.success(t('common.copied'));
74
74
  };
75
75
 
76
+ const onOpenLink = () => {
77
+ window.open(joinURL(window.blocklet.appUrl, window.blocklet.prefix, `/checkout/pay/${data.id}`));
78
+ };
79
+
76
80
  return (
77
81
  <ClickBoundary>
78
82
  <Actions
79
83
  variant={variant}
80
84
  actions={[
85
+ {
86
+ label: t('admin.paymentLink.openLink'),
87
+ handler: onOpenLink,
88
+ color: 'primary',
89
+ },
81
90
  {
82
91
  label: t('admin.paymentLink.edit'),
83
92
  handler: () => setState({ action: 'edit' }),
@@ -237,6 +237,7 @@ export default flat({
237
237
  info: 'Payment link information',
238
238
  add: 'Create payment link',
239
239
  save: 'Create link',
240
+ openLink: 'Open URL',
240
241
  copyLink: 'Copy URL',
241
242
  saved: 'Payment link successfully saved',
242
243
  additional: 'Additional options',
@@ -233,6 +233,7 @@ export default flat({
233
233
  info: '支付链接信息',
234
234
  add: '创建支付链接',
235
235
  save: '创建链接',
236
+ openLink: '打开URL',
236
237
  copyLink: '复制URL',
237
238
  saved: '支付链接已成功保存',
238
239
  additional: '附加选项',
@@ -23,6 +23,7 @@ export default function PricingTablePage({ id }: Props) {
23
23
  sessionManagerProps={undefined}
24
24
  homeLink={undefined}
25
25
  theme={undefined}
26
+ maxWidth={false}
26
27
  />
27
28
  <Center relative="parent">
28
29
  <CheckoutTable id={id} mode="standalone" />
@@ -141,7 +141,7 @@ export default function CustomerHome() {
141
141
  </Grid>
142
142
  <Grid item xs={12} md={7}>
143
143
  <SectionHeader title={t('payment.customer.invoice.details')} mb={0}>
144
- {['open'].includes(data.status) && (
144
+ {['open', 'paid', 'uncollectible'].includes(data.status) && (
145
145
  <Button
146
146
  variant="contained"
147
147
  color="primary"
@@ -12,6 +12,7 @@ function Home() {
12
12
  sessionManagerProps={undefined}
13
13
  homeLink={undefined}
14
14
  theme={undefined}
15
+ maxWidth={false}
15
16
  />
16
17
  <Stack alignItems="center" justifyContent="center" sx={{ height: '60vh', width: '100vw' }}>
17
18
  <Stack maxWidth="sm" direction="column" alignItems="center" spacing={3}>