@blocklet/payment-react 1.18.14 → 1.18.16
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/es/components/over-due-invoice-payment.d.ts +20 -7
- package/es/components/over-due-invoice-payment.js +213 -74
- package/es/contexts/payment.js +14 -1
- package/es/history/invoice/list.js +28 -10
- package/es/locales/en.js +13 -4
- package/es/locales/zh.js +13 -4
- package/es/payment/form/address.js +63 -65
- package/lib/components/over-due-invoice-payment.d.ts +20 -7
- package/lib/components/over-due-invoice-payment.js +208 -75
- package/lib/contexts/payment.js +14 -1
- package/lib/history/invoice/list.js +50 -20
- package/lib/locales/en.js +13 -4
- package/lib/locales/zh.js +13 -4
- package/lib/payment/form/address.js +46 -50
- package/package.json +8 -7
- package/src/components/over-due-invoice-payment.tsx +267 -81
- package/src/contexts/payment.tsx +15 -1
- package/src/history/invoice/list.tsx +36 -15
- package/src/locales/en.tsx +11 -2
- package/src/locales/zh.tsx +11 -1
- package/src/payment/form/address.tsx +36 -38
package/src/locales/en.tsx
CHANGED
|
@@ -244,14 +244,14 @@ export default flat({
|
|
|
244
244
|
pastDue: {
|
|
245
245
|
button: 'Pay',
|
|
246
246
|
invoices: 'Past Due Invoices',
|
|
247
|
-
warning:
|
|
248
|
-
'Past due invoices need to be paid immediately, otherwise you can not make new purchases anymore. Please pay these invoices one by one.',
|
|
247
|
+
warning: 'Past due invoices need to be paid immediately, otherwise you can not make new purchases anymore.',
|
|
249
248
|
alert: {
|
|
250
249
|
title: 'You have unpaid invoices',
|
|
251
250
|
description:
|
|
252
251
|
'Seems you have unpaid invoices from previous subscriptions, new purchases are not allowed unless you have paid all past due invoices.',
|
|
253
252
|
confirm: 'Pay Now',
|
|
254
253
|
},
|
|
254
|
+
view: 'View Due Invoices',
|
|
255
255
|
},
|
|
256
256
|
recover: {
|
|
257
257
|
button: 'Resume Subscription',
|
|
@@ -305,6 +305,7 @@ export default flat({
|
|
|
305
305
|
next: 'No invoices yet, next invoice will be generated on {date}',
|
|
306
306
|
invoiceNumber: 'Invoice Number',
|
|
307
307
|
emptyList: 'No Invoice',
|
|
308
|
+
noPaymentRequired: 'No Payment Required',
|
|
308
309
|
},
|
|
309
310
|
payment: {
|
|
310
311
|
empty: 'There are no payments',
|
|
@@ -326,6 +327,12 @@ export default flat({
|
|
|
326
327
|
trialLeft: 'Trail Left',
|
|
327
328
|
owner: 'Subscription Owner',
|
|
328
329
|
},
|
|
330
|
+
overdue: {
|
|
331
|
+
title:
|
|
332
|
+
'You have {count} due invoices for {subscriptionCount} subscriptions, totaling {total} {symbol}. Please pay immediately to avoid service disruption.',
|
|
333
|
+
simpleTitle: 'You have {count} due invoices. Please pay now to ensure uninterrupted service.',
|
|
334
|
+
empty: 'Great! You have no due invoices.',
|
|
335
|
+
},
|
|
329
336
|
},
|
|
330
337
|
invoice: {
|
|
331
338
|
reason: {
|
|
@@ -367,6 +374,8 @@ export default flat({
|
|
|
367
374
|
description: 'If you have any questions, you can choose ',
|
|
368
375
|
list: 'Past Due Invoices:',
|
|
369
376
|
empty: 'There are no overdue invoices for your subscription {name}.',
|
|
377
|
+
retry: 'Retry',
|
|
378
|
+
paid: 'Paid',
|
|
370
379
|
},
|
|
371
380
|
},
|
|
372
381
|
},
|
package/src/locales/zh.tsx
CHANGED
|
@@ -239,12 +239,13 @@ export default flat({
|
|
|
239
239
|
pastDue: {
|
|
240
240
|
button: '续费',
|
|
241
241
|
invoices: '欠费帐单',
|
|
242
|
-
warning: '
|
|
242
|
+
warning: '请尽快支付欠费账单,否则你将无法继续使用服务或购买新服务。',
|
|
243
243
|
alert: {
|
|
244
244
|
title: '你有欠费账单',
|
|
245
245
|
description: '看起来你有欠费的账单,在你支付所有欠费账单之前,新的购买或者订阅将被禁止,请不要调皮。',
|
|
246
246
|
confirm: '去支付',
|
|
247
247
|
},
|
|
248
|
+
view: '查看欠费明细',
|
|
248
249
|
},
|
|
249
250
|
recover: {
|
|
250
251
|
button: '恢复订阅',
|
|
@@ -295,6 +296,7 @@ export default flat({
|
|
|
295
296
|
next: '还没有账单,下次账单将在 {date} 生成',
|
|
296
297
|
invoiceNumber: '账单编号',
|
|
297
298
|
emptyList: '没有账单',
|
|
299
|
+
noPaymentRequired: '无需支付',
|
|
298
300
|
},
|
|
299
301
|
payment: {
|
|
300
302
|
empty: '没有支付记录',
|
|
@@ -316,6 +318,12 @@ export default flat({
|
|
|
316
318
|
trialLeft: '剩余试用时长',
|
|
317
319
|
owner: '订阅拥有者',
|
|
318
320
|
},
|
|
321
|
+
overdue: {
|
|
322
|
+
title:
|
|
323
|
+
'您有 {count} 张欠费账单,涉及 {subscriptionCount} 个订阅,总金额 {total} {symbol}。请立即支付,以免影响您的使用。',
|
|
324
|
+
simpleTitle: '您有 {count} 张欠费账单,请立即支付,以免影响您的使用。',
|
|
325
|
+
empty: '恭喜!您当前没有欠费账单。',
|
|
326
|
+
},
|
|
319
327
|
},
|
|
320
328
|
invoice: {
|
|
321
329
|
reason: {
|
|
@@ -357,6 +365,8 @@ export default flat({
|
|
|
357
365
|
description: '如果您有任何疑问,可以选择 ',
|
|
358
366
|
list: '欠费账单:',
|
|
359
367
|
empty: '您的【{name}】订阅当前没有欠费账单',
|
|
368
|
+
retry: '重新支付',
|
|
369
|
+
paid: '已支付',
|
|
360
370
|
},
|
|
361
371
|
},
|
|
362
372
|
},
|
|
@@ -23,45 +23,7 @@ export default function AddressForm({ mode, stripe, sx = {} }: Props) {
|
|
|
23
23
|
return (
|
|
24
24
|
<Fade in>
|
|
25
25
|
<Stack className="cko-payment-address cko-payment-form" sx={sx}>
|
|
26
|
-
<FormLabel className="base-label">{t(`payment.checkout.billing.${mode}`)}</FormLabel>
|
|
27
26
|
<Stack direction="column" className="cko-payment-form" spacing={0}>
|
|
28
|
-
<Stack direction="row" spacing={0}>
|
|
29
|
-
<FormInput
|
|
30
|
-
name="billing_address.postal_code"
|
|
31
|
-
rules={{ required: t('payment.checkout.required') }}
|
|
32
|
-
errorPosition="right"
|
|
33
|
-
variant="outlined"
|
|
34
|
-
placeholder={t('payment.checkout.billing.postal_code')}
|
|
35
|
-
InputProps={{
|
|
36
|
-
startAdornment: (
|
|
37
|
-
<InputAdornment position="start" style={{ marginRight: '2px', marginLeft: '-8px' }}>
|
|
38
|
-
<Controller
|
|
39
|
-
name="billing_address.country"
|
|
40
|
-
control={control}
|
|
41
|
-
render={({ field }) => (
|
|
42
|
-
<CountrySelect
|
|
43
|
-
{...field}
|
|
44
|
-
sx={{
|
|
45
|
-
'&.Mui-focused .MuiOutlinedInput-notchedOutline': {
|
|
46
|
-
borderColor: 'transparent',
|
|
47
|
-
},
|
|
48
|
-
}}
|
|
49
|
-
/>
|
|
50
|
-
)}
|
|
51
|
-
/>
|
|
52
|
-
</InputAdornment>
|
|
53
|
-
),
|
|
54
|
-
}}
|
|
55
|
-
/>
|
|
56
|
-
</Stack>
|
|
57
|
-
<FormLabel className="base-label">{t('payment.checkout.billing.state')}</FormLabel>
|
|
58
|
-
<FormInput
|
|
59
|
-
name="billing_address.state"
|
|
60
|
-
rules={{ required: t('payment.checkout.required') }}
|
|
61
|
-
errorPosition="right"
|
|
62
|
-
variant="outlined"
|
|
63
|
-
placeholder={t('payment.checkout.billing.state')}
|
|
64
|
-
/>
|
|
65
27
|
<FormLabel className="base-label">{t('payment.checkout.billing.line1')}</FormLabel>
|
|
66
28
|
<FormInput
|
|
67
29
|
name="billing_address.line1"
|
|
@@ -78,6 +40,42 @@ export default function AddressForm({ mode, stripe, sx = {} }: Props) {
|
|
|
78
40
|
variant="outlined"
|
|
79
41
|
placeholder={t('payment.checkout.billing.city')}
|
|
80
42
|
/>
|
|
43
|
+
<FormLabel className="base-label">{t('payment.checkout.billing.state')}</FormLabel>
|
|
44
|
+
<FormInput
|
|
45
|
+
name="billing_address.state"
|
|
46
|
+
rules={{ required: t('payment.checkout.required') }}
|
|
47
|
+
errorPosition="right"
|
|
48
|
+
variant="outlined"
|
|
49
|
+
placeholder={t('payment.checkout.billing.state')}
|
|
50
|
+
/>
|
|
51
|
+
<FormLabel className="base-label">{t('payment.checkout.billing.postal_code')}</FormLabel>
|
|
52
|
+
<FormInput
|
|
53
|
+
name="billing_address.postal_code"
|
|
54
|
+
rules={{ required: t('payment.checkout.required') }}
|
|
55
|
+
errorPosition="right"
|
|
56
|
+
variant="outlined"
|
|
57
|
+
placeholder={t('payment.checkout.billing.postal_code')}
|
|
58
|
+
InputProps={{
|
|
59
|
+
startAdornment: (
|
|
60
|
+
<InputAdornment position="start" style={{ marginRight: '2px', marginLeft: '-8px' }}>
|
|
61
|
+
<Controller
|
|
62
|
+
name="billing_address.country"
|
|
63
|
+
control={control}
|
|
64
|
+
render={({ field }) => (
|
|
65
|
+
<CountrySelect
|
|
66
|
+
{...field}
|
|
67
|
+
sx={{
|
|
68
|
+
'&.Mui-focused .MuiOutlinedInput-notchedOutline': {
|
|
69
|
+
borderColor: 'transparent',
|
|
70
|
+
},
|
|
71
|
+
}}
|
|
72
|
+
/>
|
|
73
|
+
)}
|
|
74
|
+
/>
|
|
75
|
+
</InputAdornment>
|
|
76
|
+
),
|
|
77
|
+
}}
|
|
78
|
+
/>
|
|
81
79
|
</Stack>
|
|
82
80
|
</Stack>
|
|
83
81
|
</Fade>
|