payment-kit 1.13.26 → 1.13.27

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 (73) hide show
  1. package/api/src/index.ts +8 -1
  2. package/api/src/integrations/blockchain/nft.ts +125 -0
  3. package/api/src/integrations/blockchain/stake.ts +55 -0
  4. package/api/src/integrations/blocklet/notification.ts +101 -0
  5. package/api/src/integrations/blocklet/passport.ts +139 -0
  6. package/api/src/integrations/stripe/handlers/invoice.ts +1 -1
  7. package/api/src/integrations/stripe/resource.ts +7 -7
  8. package/api/src/integrations/stripe/setup.ts +1 -1
  9. package/api/src/jobs/checkout-session.ts +23 -0
  10. package/api/src/jobs/payment.ts +1 -2
  11. package/api/src/libs/audit.ts +44 -2
  12. package/api/src/libs/payment.ts +3 -4
  13. package/api/src/locales/en.ts +9 -1
  14. package/api/src/locales/zh.ts +9 -1
  15. package/api/src/routes/checkout-sessions.ts +44 -14
  16. package/api/src/routes/connect/collect.ts +1 -2
  17. package/api/src/routes/connect/pay.ts +1 -2
  18. package/api/src/routes/connect/setup.ts +1 -2
  19. package/api/src/routes/connect/shared.ts +7 -3
  20. package/api/src/routes/connect/subscribe.ts +2 -3
  21. package/api/src/routes/index.ts +4 -0
  22. package/api/src/routes/integrations/stripe.ts +1 -1
  23. package/api/src/routes/passports.ts +74 -0
  24. package/api/src/routes/payment-links.ts +12 -2
  25. package/api/src/routes/pricing-table.ts +17 -3
  26. package/api/src/routes/products.ts +3 -3
  27. package/api/src/routes/redirect.ts +18 -0
  28. package/api/src/routes/subscriptions.ts +2 -5
  29. package/api/src/store/migrations/20231021-nft.ts +22 -0
  30. package/api/src/store/models/checkout-session.ts +76 -20
  31. package/api/src/store/models/invoice.ts +2 -0
  32. package/api/src/store/models/payment-intent.ts +2 -0
  33. package/api/src/store/models/payment-link.ts +26 -15
  34. package/api/src/store/models/payment-method.ts +22 -1
  35. package/api/src/store/models/price.ts +2 -0
  36. package/api/src/store/models/subscription.ts +26 -4
  37. package/api/src/store/models/types.ts +32 -1
  38. package/api/third.d.ts +2 -0
  39. package/blocklet.yml +1 -1
  40. package/package.json +7 -5
  41. package/src/components/customer/actions.tsx +15 -17
  42. package/src/components/customer/form.tsx +1 -1
  43. package/src/components/invoice/list.tsx +2 -1
  44. package/src/components/passport/actions.tsx +62 -0
  45. package/src/components/passport/assign.tsx +82 -0
  46. package/src/components/payment-intent/list.tsx +5 -1
  47. package/src/components/payment-link/actions.tsx +14 -1
  48. package/src/components/payment-link/after-pay.tsx +33 -1
  49. package/src/components/payment-link/preview.tsx +3 -6
  50. package/src/components/price/form.tsx +22 -23
  51. package/src/components/pricing-table/actions.tsx +14 -1
  52. package/src/components/pricing-table/payment-settings.tsx +33 -1
  53. package/src/components/pricing-table/preview.tsx +3 -7
  54. package/src/components/pricing-table/product-settings.tsx +4 -0
  55. package/src/components/pricing-table/product-skeleton.tsx +39 -0
  56. package/src/components/product/actions.tsx +14 -1
  57. package/src/components/status.tsx +1 -1
  58. package/src/components/subscription/status.tsx +3 -3
  59. package/src/components/table.tsx +14 -4
  60. package/src/global.css +7 -5
  61. package/src/libs/util.ts +6 -0
  62. package/src/locales/en.tsx +53 -2
  63. package/src/locales/zh.tsx +272 -116
  64. package/src/pages/admin/payments/links/create.tsx +4 -0
  65. package/src/pages/admin/payments/links/detail.tsx +9 -4
  66. package/src/pages/admin/products/index.tsx +2 -0
  67. package/src/pages/admin/products/passports/index.tsx +154 -0
  68. package/src/pages/admin/products/pricing-tables/create.tsx +1 -1
  69. package/src/pages/admin/settings/index.tsx +1 -1
  70. package/src/pages/admin/settings/payment-methods/index.tsx +17 -7
  71. package/src/pages/checkout/pay.tsx +15 -13
  72. package/src/pages/checkout/pricing-table.tsx +127 -91
  73. package/api/src/libs/chain/arcblock.ts +0 -13
@@ -2,11 +2,11 @@ import flat from 'flat';
2
2
 
3
3
  export default flat({
4
4
  common: {
5
- id: '标识',
6
- url: '链接',
7
- createdAt: '创建于',
8
- updatedAt: '更新于',
9
- resumesAt: '恢复于',
5
+ id: 'ID',
6
+ url: 'URL',
7
+ createdAt: '创建时间',
8
+ updatedAt: '更新时间',
9
+ resumesAt: '恢复时间',
10
10
  actions: '操作',
11
11
  options: '选项',
12
12
  advanced: '高级选项',
@@ -14,13 +14,12 @@ export default flat({
14
14
  preview: '预览',
15
15
  required: '必填',
16
16
  setup: '设置',
17
- days: '',
18
- name: '名称',
17
+ name: '姓名',
19
18
  amount: '金额',
20
19
  total: '总计',
21
20
  status: '状态',
22
21
  livemode: '测试模式',
23
- afterTime: '在{time}之后',
22
+ afterTime: '在{time}',
24
23
  timeAgo: '{time}前',
25
24
  save: '保存',
26
25
  saved: '更改已保存',
@@ -30,7 +29,7 @@ export default flat({
30
29
  cancel: '取消',
31
30
  every: '每',
32
31
  per: '每',
33
- unit: '单位',
32
+ unit: '个单位',
34
33
  edit: '编辑',
35
34
  quantity: '数量',
36
35
  yes: '是',
@@ -39,11 +38,25 @@ export default flat({
39
38
  did: 'DID',
40
39
  txHash: '交易哈希',
41
40
  customer: '客户',
41
+ custom: '自定义',
42
42
  description: '描述',
43
- statementDescriptor: '账单描述',
43
+ statementDescriptor: '声明描述',
44
44
  loadMore: '查看更多{resource}',
45
45
  loadingMore: '正在加载更多{resource}...',
46
46
  noMore: '没有更多{resource}',
47
+ copied: '已复制',
48
+ previous: '返回',
49
+ continue: '继续',
50
+ hourly: '每小时',
51
+ daily: '每日',
52
+ weekly: '每周',
53
+ monthly: '每月',
54
+ yearly: '每年',
55
+ month3: '每3个月',
56
+ month6: '每6个月',
57
+ days: '天',
58
+ weeks: '周',
59
+ months: '月',
47
60
  metadata: {
48
61
  label: '元数据',
49
62
  add: '添加更多元数据',
@@ -52,26 +65,27 @@ export default flat({
52
65
  },
53
66
  },
54
67
  admin: {
55
- overview: '概览',
56
- payments: '支付',
68
+ overview: '总览',
69
+ payments: '支付管理',
57
70
  connections: '连接',
58
71
  paymentLinks: '支付链接',
59
72
  paymentMethods: '支付方式',
60
- customers: '客户',
61
- products: '产品',
73
+ customers: '客户管理',
74
+ products: '产品定价',
62
75
  coupons: '优惠券',
63
- pricingTables: '定价表',
64
- billing: '计费',
76
+ pricingTables: '价格表',
77
+ billing: '订阅和发票',
65
78
  invoices: '发票',
66
79
  subscriptions: '订阅',
67
- developers: '开发者',
68
- webhooks: 'Web钩子',
80
+ developers: '开发者工具箱',
81
+ webhooks: '钩子',
69
82
  events: '事件',
70
83
  logs: '日志',
84
+ passports: '通行证',
71
85
  details: '详情',
72
- settings: '设置',
73
- branding: '品牌',
74
- business: '业务',
86
+ settings: '系统设置',
87
+ branding: '品牌设置',
88
+ business: '企业设置',
75
89
  summary: '摘要',
76
90
  product: {
77
91
  info: '产品信息',
@@ -83,34 +97,35 @@ export default flat({
83
97
  edit: '编辑产品',
84
98
  pricing: '定价',
85
99
  archive: '存档产品',
86
- archiveTip: '存档将隐藏该产品不再允许新购买。您确定要存档此产品吗?',
100
+ archiveTip: '存档将隐藏此产品不再允许新购买。确定要存档此产品吗?',
87
101
  unarchive: '取消存档产品',
88
- unarchiveTip: '取消存档将允许该产品再次购买。您确定要取消存档此产品吗?',
102
+ unarchiveTip: '取消存档将使此产品可以用于新的购买。确定要取消存档此产品吗?',
89
103
  remove: '删除产品',
90
- removeTip: '删除将隐藏该产品不再允许新购买。您确定要删除此产品吗?',
104
+ removeTip: '删除将隐藏此产品不再允许新购买。确定要删除此产品吗?',
91
105
  archived: '此产品已存档',
92
106
  archivedTip:
93
- '此产品无法添加到新的发票、订阅、支付链接或定价表中。任何现有的包含此产品的订阅将保持活动状态,直到取消,任何现有的支付链接或定价表都将停用。',
107
+ '此产品无法添加到新的发票、订阅、支付链接或定价表。具有此产品的任何现有订阅将保持活动状态,直到取消,任何现有的支付链接或定价表将被停用。',
108
+ locked: '此产品已锁定,因为至少有一个价格用于订阅或支付。',
94
109
  image: {
95
110
  label: '图片',
96
111
  add: '添加图片',
97
112
  },
98
113
  features: {
99
- label: '特性',
100
- add: '添加其他特性',
114
+ label: '特点',
115
+ add: '添加其他特点',
101
116
  },
102
117
  name: {
103
118
  label: '名称',
104
- required: '产品名称是必填的',
119
+ required: '产品名称是必需的',
105
120
  placeholder: '高级套餐',
106
121
  },
107
122
  description: {
108
123
  label: '描述',
109
- required: '产品描述是必填的',
110
- placeholder: '结账、发票页面上显示的产品描述',
124
+ required: '产品描述是必需的',
125
+ placeholder: '在结账、发票页面显示的产品描述',
111
126
  },
112
127
  statement_descriptor: {
113
- label: '账单描述',
128
+ label: '声明描述',
114
129
  placeholder: 'ArcBlock',
115
130
  },
116
131
  unit_label: {
@@ -125,19 +140,21 @@ export default flat({
125
140
  lookupKey: '查找键',
126
141
  setAsDefault: '设置为默认价格',
127
142
  detail: '定价详情',
128
- add: '添加其他价格',
143
+ add: '添加另一个价格',
129
144
  view: '查看价格详情',
130
145
  additional: '附加选项',
131
146
  model: '定价模型',
132
147
  amount: '价格',
148
+ locked: '此价格已锁定,因为它用于订阅或支付。',
149
+ amountTip: '对于订阅选择周期,对于其他所有选择一次性。',
133
150
  duplicate: '复制价格',
134
151
  edit: '编辑价格',
135
152
  archive: '存档价格',
136
- archiveTip: '存档将隐藏该价格不再允许新购买。您确定要存档此价格吗?',
153
+ archiveTip: '存档将隐藏此价格不再允许新购买。确定要存档此价格吗?',
137
154
  remove: '删除价格',
138
- removeTip: '删除将隐藏该价格不再允许新购买。您确定要删除此价格吗?',
155
+ removeTip: '删除将隐藏此价格不再允许新购买。确定要删除此价格吗?',
139
156
  unit_amount: {
140
- required: '价格是必填的',
157
+ required: '价格是必需的',
141
158
  positive: '价格必须是正数',
142
159
  },
143
160
  nickname: {
@@ -150,8 +167,30 @@ export default flat({
150
167
  },
151
168
  recurring: {
152
169
  interval: '计费周期',
153
- metered: '使用是否计费?',
154
- aggregate: '按何方式计费',
170
+ metered: '使用量按计量收费?',
171
+ meteredTip: '计量计费允许您根据每个计费周期结束时的报告的使用情况向客户收费。',
172
+ aggregate: '按何种方式收费计量使用',
173
+ },
174
+ currency: {
175
+ add: '添加更多货币',
176
+ list: '货币',
177
+ },
178
+ models: {
179
+ standard: '标准定价',
180
+ package: '套餐定价',
181
+ graduated: '毕业定价',
182
+ volume: '量价定价',
183
+ custom: '客户自定义价格',
184
+ },
185
+ types: {
186
+ onetime: '一次性',
187
+ recurring: '周期性',
188
+ },
189
+ aggregate: {
190
+ sum: '在周期内的使用值总和',
191
+ max: '周期内的最大使用值',
192
+ last_during_period: '周期内的最近使用值',
193
+ last_ever: '最近的使用值',
155
194
  },
156
195
  },
157
196
  coupon: {
@@ -163,39 +202,63 @@ export default flat({
163
202
  info: '支付链接信息',
164
203
  add: '创建支付链接',
165
204
  save: '创建链接',
166
- saved: '支付链接创建成功',
205
+ copyLink: '复制URL',
206
+ saved: '支付链接已成功保存',
167
207
  additional: '附加选项',
168
208
  beforePay: '支付页面',
169
209
  afterPay: '支付后',
170
210
  products: '产品',
171
- addProduct: '添加其他产品',
172
- requireBillingAddress: '收集客户账单地址',
173
- requirePhoneNumber: '收集客户电话号码',
211
+ addProduct: '添加另一个产品',
212
+ requireBillingAddress: '收集客户的账单地址',
213
+ requirePhoneNumber: '收集客户的电话号码',
174
214
  allowPromotionCodes: '允许促销代码',
175
215
  includeFreeTrail: '包含免费试用',
176
216
  includeCustomFields: '添加自定义字段',
177
217
  confirmPage: '确认页面',
178
218
  showConfirmPage: '显示确认页面',
179
- customMessage: '用自定义消息替代默认消息',
180
- customMessageTip: '包括任何您认为合适的详细信息,如交付信息。',
219
+ customMessage: '用自定义消息替换默认消息',
220
+ customMessageTip: '包括您认为合适的任何细节,如交付信息。',
221
+ mintNft: '购买完成时铸造 NFT',
222
+ mintNftFrom: '从下面的 NFT 集合铸造',
181
223
  noConfirmPage: '不显示确认页面',
182
- createInvoice: '为相关支付创建发票。',
224
+ createInvoice: '为相关付款创建发票。',
183
225
  adjustable: '可调整数量',
184
226
  adjustableQuantity: '允许客户调整数量',
185
- noProducts: '支付链接必须至少包含一个产品',
186
- noRedirectUrl: '支付链接必须具有重定向URL',
187
- noSubscriptionTrialDays: '您必须指定订阅的试用期',
188
- notAligned: '所有行项目上的价格必须具有相同的重复周期',
227
+ noProducts: '支付链接必须至少有一个产品',
228
+ noRedirectUrl: '支付链接必须有重定向URL',
229
+ noSubscriptionTrialDays: '您必须为订阅指定试用期',
230
+ recurringNotAligned: '所有行项目的价格必须具有相同的周期',
231
+ currencyNotAligned: '所有行项目的价格必须具有相同的货币设置',
189
232
  edit: '编辑支付链接',
190
233
  rename: '更改名称',
191
234
  archive: '存档支付链接',
192
- archiveTip: '存档将隐藏该支付链接不再允许新购买。您确定要存档此支付链接吗?',
235
+ archiveTip: '存档将隐藏此支付链接不再允许新购买。确定要存档此支付链接吗?',
193
236
  remove: '删除支付链接',
194
- removeTip: '删除将隐藏该支付链接不再允许新购买。您确定要删除此支付链接吗?',
237
+ removeTip: '删除将隐藏此支付链接不再允许新购买。确定要删除此支付链接吗?',
238
+ name: {
239
+ label: '名称',
240
+ placeholder: '不向消费者展示',
241
+ },
242
+ },
243
+ pricingTable: {
244
+ view: '查看定价表',
245
+ add: '创建定价表',
246
+ save: '创建',
247
+ copyLink: '复制URL',
248
+ saved: '定价表已成功保存',
249
+ edit: '编辑定价表',
250
+ rename: '更改名称',
251
+ archive: '存档定价表',
252
+ archiveTip: '存档将隐藏此定价表不再允许新购买。确定要存档此定价表吗?',
253
+ remove: '删除定价表',
254
+ removeTip: '删除将隐藏此定价表不再允许新购买。确定要删除此定价表吗?',
195
255
  name: {
196
256
  label: '名称',
197
- placeholder: '不面向消费者',
257
+ placeholder: '不向消费者展示',
198
258
  },
259
+ display: '显示设置',
260
+ highlight: '突出显示产品',
261
+ customer: '客户门户',
199
262
  },
200
263
  paymentIntent: {
201
264
  name: '支付',
@@ -204,8 +267,60 @@ export default flat({
204
267
  refund: '退款支付',
205
268
  },
206
269
  paymentMethod: {
207
- name: '支付方式',
270
+ _name: '支付方式',
208
271
  type: '类型',
272
+ add: '添加支付方式',
273
+ save: '保存支付方式',
274
+ saved: '支付方式已成功保存',
275
+ settings: '设置',
276
+ props: {
277
+ type: '类型',
278
+ confirmation: '确认',
279
+ recurring: '重复支持',
280
+ refund: '退款支持',
281
+ dispute: '纠纷支持',
282
+ currencies: '货币支持',
283
+ },
284
+ name: {
285
+ label: '名称',
286
+ tip: '面向消费者',
287
+ },
288
+ description: {
289
+ label: '描述',
290
+ tip: '不向消费者展示',
291
+ },
292
+ stripe: {
293
+ dashboard: {
294
+ label: '仪表板 URL',
295
+ tip: '用于生成指向 Stripe 仪表板的链接',
296
+ },
297
+ publishable_key: {
298
+ label: '可发布密钥',
299
+ tip: '可发布密钥,请查看仪表板 > 开发人员 > API密钥',
300
+ },
301
+ secret_key: {
302
+ label: '秘密密钥',
303
+ tip: '秘密密钥,请查看仪表板 > 开发人员 > API密钥',
304
+ },
305
+ webhook_signing_secret: {
306
+ label: '钩子签名密钥',
307
+ tip: '钩子签名密钥,请查看仪表板 > 开发人员 > 钩子 > 签名密钥',
308
+ },
309
+ },
310
+ arcblock: {
311
+ chain_id: {
312
+ label: '链 ID',
313
+ tip: '仅是名称',
314
+ },
315
+ api_host: {
316
+ label: 'API 地址',
317
+ tip: '发送交易的 API 端点',
318
+ },
319
+ explorer_host: {
320
+ label: '区块浏览器',
321
+ tip: '查看交易详情的地址',
322
+ },
323
+ },
209
324
  },
210
325
  paymentCurrency: {
211
326
  name: '支付货币',
@@ -214,21 +329,21 @@ export default flat({
214
329
  empty: '没有事件',
215
330
  view: '查看事件',
216
331
  data: '事件数据',
217
- webhooks: 'Web钩子尝试',
332
+ webhooks: '钩子调用',
218
333
  type: '类型',
219
- pendingWebhooks: '待处理的Web钩子',
334
+ pendingWebhooks: '待处理的钩子',
220
335
  },
221
336
  invoice: {
222
337
  view: '查看发票',
223
338
  name: '发票',
224
- from: '来自',
339
+ from: '发票来自',
225
340
  empty: '没有发票',
226
341
  number: '发票编号',
227
342
  dueDate: '截止日期',
228
- finalizedAt: '完成时间',
229
- paidAt: '付款日期',
343
+ finalizedAt: '已完成时间',
344
+ paidAt: '支付日期',
230
345
  summary: '摘要',
231
- customer: '寄送至',
346
+ customer: '开具给',
232
347
  billing: '计费方式',
233
348
  download: '下载PDF',
234
349
  edit: '编辑发票',
@@ -242,77 +357,101 @@ export default flat({
242
357
  collectionMethod: '计费',
243
358
  currentPeriod: '当前周期',
244
359
  trialingPeriod: '试用期',
360
+ trailEnd: '试用期结束于{date}',
245
361
  discount: '折扣',
246
- startedAt: '开始时间',
247
- nextInvoice: '下一个发票',
362
+ startedAt: '开始于',
363
+ nextInvoice: '下一张发票',
248
364
  itemId: '订阅项目ID',
249
365
  update: '更新订阅',
250
- resume: '恢复支付收款',
251
- resumeTip: '您确定要恢复收款吗?此订阅的未来发票将恢复收款。',
366
+ resume: '恢复付款',
367
+ resumeTip: '您确定要继续收款吗?此订阅的未来发票将继续付款。',
252
368
  cancel: {
253
369
  schedule: '计划取消',
254
370
  title: '取消订阅',
255
- required: '需要自定义取消时间',
371
+ required: '必须指定自定义取消时间',
372
+ will: '于{date}取消',
256
373
  at: {
257
374
  title: '取消',
258
- now: '立即({date}',
259
- current_period_end: '当前周期结束时({date}',
260
- custom: '自定义日期',
375
+ now: '立即取消({date})',
376
+ current_period_end: '本周期结束后({date})',
377
+ custom: '自定义取消日期',
261
378
  },
262
379
  },
263
380
  pause: {
264
- title: '暂停支付收款',
265
- required: '需要自定义恢复时间',
381
+ title: '暂停付款',
382
+ required: '必须指定自定义恢复时间',
266
383
  type: {
267
- title: '暂停持续时间',
268
- never: '无限期',
269
- custom: '直到自定义日期',
384
+ title: '持续时间',
385
+ never: '无限期暂停',
386
+ custom: '暂停到自定义日期',
270
387
  },
271
388
  behavior: {
272
389
  title: '发票行为',
273
390
  keep_as_draft: '保留发票为草稿',
274
391
  keep_as_draft_tip: '对于目前提供服务但等待收款的企业。',
275
- mark_uncollectible: '标记发票为不可收款',
276
- mark_uncollectible_tip: '对于目前免费提供服务的企业。',
392
+ mark_uncollectible: '将发票标记为不可收款',
393
+ mark_uncollectible_tip: '对于目前提供免费服务的企业。',
277
394
  void: '作废发票',
278
395
  voidTip: '对于目前不提供服务的企业。',
279
396
  },
397
+ until: {
398
+ never: '付款暂停',
399
+ custom: '付款暂停直到{date}',
400
+ },
401
+ },
402
+ usage: {
403
+ title: '使用记录',
404
+ current: '当前周期的使用记录',
405
+ view: '查看使用情况',
406
+ vary: '随使用情况变化',
407
+ used: '已使用单位',
280
408
  },
281
409
  },
282
410
  customer: {
283
411
  view: '查看客户',
284
412
  edit: '编辑信息',
285
- spent: '已花费金额',
413
+ spent: '花费金额',
286
414
  refund: '退款金额',
287
415
  dispute: '争议金额',
288
- name: '姓名',
289
- email: '邮箱',
416
+ name: '名称',
417
+ email: '电子邮件',
290
418
  phone: '电话',
291
419
  invoicePrefix: '发票前缀',
292
420
  address: {
293
421
  label: '地址',
294
422
  country: '国家',
295
- state: '州或省',
296
- city: '城市或镇',
423
+ state: '州或省份',
424
+ city: '城市或城镇',
297
425
  line1: '地址',
298
- line2: '地址2',
426
+ line2: '详细地址',
299
427
  postal_code: '邮政编码',
300
428
  },
301
429
  },
430
+ passport: {
431
+ intro: '管理应用通行证的付款设置,必须同时设置商品和购买入口',
432
+ payLink: '支付入口',
433
+ payPreview: '支付预览',
434
+ preview: '支付页面预览',
435
+ assign: '分配给通行证',
436
+ assignTip: '将此支付链接分配给所选通行证,以使其可供购买',
437
+ unassign: '重置购买配置',
438
+ unassignTip: '确认要将购买入口和关联商品配置清空?',
439
+ assignError: '必须选择一个要分配的通行证',
440
+ },
302
441
  webhookEndpoint: {
303
- hosted: '托管端点',
304
- add: '添加端点',
305
- addTip: '设置您的Web钩子端点以接收实时事件',
442
+ hosted: '托管的钩子',
443
+ add: '添加钩子',
444
+ addTip: '设置钩子端点以接收来自',
306
445
  listen: '监听',
307
446
  version: 'API版本',
308
- attempts: 'Web钩子尝试',
447
+ attempts: '钩子调用',
309
448
  url: {
310
449
  label: 'URL',
311
450
  description: '端点URL',
312
451
  },
313
452
  description: {
314
453
  label: '描述',
315
- description: '用于说明此端点用途的可选描述。',
454
+ description: '此端点用于何种目的的可选描述。',
316
455
  },
317
456
  events: {
318
457
  label: '选择要监听的事件',
@@ -325,51 +464,68 @@ export default flat({
325
464
  method: '支付方式',
326
465
  processing: '处理中',
327
466
  payment: '支付',
328
- subscription: '订阅',
329
- setup: '订阅',
330
- connect: '连接并{action}',
331
- portal: '管理订阅',
332
- completed: {
333
- payment: '感谢您的购买',
334
- subscription: '感谢您的订阅',
335
- setup: '感谢您的订阅',
336
- tip: '已完成向{payee}的付款。您可以在您的账户中查看此付款的详细信息。',
337
- },
338
- confirm: '通过确认您的订阅,您允许{payee}按照其条款对您的账户进行收费。您随时可以取消您的订阅。',
339
- billing: {
340
- auto: '国家',
341
- required: '账单地址',
342
- country: '国家',
343
- state: '州或省',
344
- city: '城市或镇',
345
- line1: '地址',
346
- line2: '地址2',
347
- postal_code: '邮政编码',
467
+ try: '免费试用',
468
+ include: '包括',
469
+ promo: '在开始之前免费试用{percent}%的套餐!',
470
+ promoInfo: '您可以随时取消,取消后无需付款。未来的计费将按月',
471
+ subtotal: '小计',
472
+ coupon: '优惠券',
473
+ complete: '完成支付',
474
+ details: '订单详情',
475
+ total: '总计',
476
+ billing: '账单',
477
+ first_name: '',
478
+ last_name: '姓',
479
+ country: '国家',
480
+ state: '',
481
+ city: '城市',
482
+ address: '地址',
483
+ postal_code: '邮政编码',
484
+ phone: '电话',
485
+ credit_card: {
486
+ info: '信用卡信息',
487
+ name: '卡片姓名',
488
+ number: '卡号',
489
+ expires: '过期日期',
490
+ expiresPlaceholder: 'MM/YY',
491
+ cvc: 'CVC',
348
492
  },
349
- customer: {
350
- name: '姓名',
351
- email: '邮箱',
352
- phone: '电话',
353
- phoneTip: '以防需要联系您有关您的订单',
493
+ pay: '付款',
494
+ paymentFailed: '付款失败',
495
+ subscribe: '购买套餐',
496
+ cancel: '取消',
497
+ thanks: '感谢您的付款!',
498
+ subscriptionDetails: '订阅详情',
499
+ transaction: {
500
+ subscription: '订阅',
501
+ date: '日期',
502
+ amount: '金额',
354
503
  },
504
+ nextPaymentOn: '下一次付款日期:{date}',
505
+ productCount: '1个产品',
506
+ productCount_plural: '{count}个产品',
507
+ currencyMismatch: '此订阅与选择的货币不匹配',
508
+ lockedProduct: '此产品无法购买',
509
+ notFound: '支付链接不存在',
355
510
  },
356
511
  customer: {
357
512
  subscriptions: '当前订阅',
358
513
  invoices: '发票历史',
359
- details: '账单详情',
360
- update: '更新',
514
+ details: '计费详情',
515
+ update: '更新客户信息',
516
+ empty: '看起来您在这里没有任何订阅或支付',
361
517
  cancel: {
362
518
  button: '取消',
363
519
  title: '取消您的订阅',
364
- description: '您的订阅将被取消,但仍然在您的当前计费周期结束于{date}之前可用',
520
+ description: '您的订阅将被取消,但仍然可用直到您当前计费周期结束于{date}',
365
521
  feedback: {
366
- tip: '我们很愿意听取您的反馈,这将帮助我们改进我们的服务',
367
- too_expensive: '服务太昂贵',
368
- missing_features: '此服务缺少功能',
522
+ tip: '我们希望听到您的反馈,这将帮助我们改进我们的服务',
523
+ too_expensive: '服务费用太高',
524
+ missing_features: '服务缺少功能',
369
525
  switched_service: '我已切换到其他服务',
370
526
  unused: '我不再使用此服务',
371
527
  customer_service: '客户服务不佳',
372
- too_complex: '服务太复杂',
528
+ too_complex: '服务使用过于复杂',
373
529
  low_quality: '服务质量不佳',
374
530
  other: '其他原因',
375
531
  },
@@ -63,6 +63,10 @@ export default function CreatePaymentLink() {
63
63
  description: '',
64
64
  trial_period_days: 0,
65
65
  },
66
+ nft_mint_settings: {
67
+ enabled: false,
68
+ factory: '',
69
+ },
66
70
  metadata: [], // FIXME:
67
71
  custom_fields: [], // FIXME:
68
72
  submit_type: 'auto', // FIXME:
@@ -218,28 +218,33 @@ export default function PaymentLinkDetail(props: { id: string }) {
218
218
  <InfoRow
219
219
  sizes={[1, 1]}
220
220
  label={t('admin.paymentLink.allowPromotionCodes')}
221
- value={data.allow_promotion_codes ? 'Yes' : 'No'}
221
+ value={data.allow_promotion_codes ? t('common.yes') : t('common.no')}
222
222
  />
223
223
  <InfoRow
224
224
  sizes={[1, 1]}
225
225
  label={t('admin.paymentLink.requireBillingAddress')}
226
- value={data.billing_address_collection ? 'Yes' : 'No'}
226
+ value={data.billing_address_collection ? t('common.yes') : t('common.no')}
227
227
  />
228
228
  <InfoRow
229
229
  sizes={[1, 1]}
230
230
  label={t('admin.paymentLink.requirePhoneNumber')}
231
- value={data.phone_number_collection?.enabled ? 'Yes' : 'No'}
231
+ value={data.phone_number_collection?.enabled ? t('common.yes') : t('common.no')}
232
232
  />
233
233
  <InfoRow
234
234
  sizes={[1, 1]}
235
235
  label={t('admin.paymentLink.includeFreeTrail')}
236
- value={data.subscription_data?.trial_period_days ? 'Yes' : 'No'}
236
+ value={data.subscription_data?.trial_period_days ? t('common.yes') : t('common.no')}
237
237
  />
238
238
  <InfoRow
239
239
  sizes={[1, 1]}
240
240
  label={t('admin.paymentLink.showConfirmPage')}
241
241
  value={data.after_completion?.type}
242
242
  />
243
+ <InfoRow
244
+ sizes={[1, 1]}
245
+ label={t('admin.paymentLink.mintNft')}
246
+ value={data.nft_mint_settings?.factory || ''}
247
+ />
243
248
  <InfoRow sizes={[1, 1]} label={t('common.createdAt')} value={formatTime(data.created_at)} />
244
249
  <InfoRow sizes={[1, 1]} label={t('common.updatedAt')} value={formatTime(data.updated_at)} />
245
250
  </Stack>