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
@@ -14,7 +14,6 @@ export default flat({
14
14
  preview: 'Preview',
15
15
  required: 'Required',
16
16
  setup: 'Setup',
17
- days: 'Days',
18
17
  name: 'Name',
19
18
  amount: 'Amount',
20
19
  total: 'Total',
@@ -39,6 +38,7 @@ export default flat({
39
38
  did: 'DID',
40
39
  txHash: 'Transaction Hash',
41
40
  customer: 'Customer',
41
+ custom: 'Custom',
42
42
  description: 'Description',
43
43
  statementDescriptor: 'Statement descriptor',
44
44
  loadMore: 'View more {resource}',
@@ -47,6 +47,16 @@ export default flat({
47
47
  copied: 'Copied',
48
48
  previous: 'Back',
49
49
  continue: 'Continue',
50
+ hourly: 'Hourly',
51
+ daily: 'Daily',
52
+ weekly: 'Weekly',
53
+ monthly: 'Monthly',
54
+ yearly: 'Yearly',
55
+ month3: 'Every 3 months',
56
+ month6: 'Every 6 months',
57
+ days: 'Days',
58
+ weeks: 'Weeks',
59
+ months: 'Months',
50
60
  metadata: {
51
61
  label: 'Metadata',
52
62
  add: 'Add more metadata',
@@ -71,6 +81,7 @@ export default flat({
71
81
  webhooks: 'Webhooks',
72
82
  events: 'Events',
73
83
  logs: 'Logs',
84
+ passports: 'Passports',
74
85
  details: 'Details',
75
86
  settings: 'Settings',
76
87
  branding: 'Branding',
@@ -166,6 +177,23 @@ export default flat({
166
177
  add: 'Add more currencies',
167
178
  list: 'Currencies',
168
179
  },
180
+ models: {
181
+ standard: 'Standard pricing',
182
+ package: 'Package pricing',
183
+ graduated: 'Graduated Pricing',
184
+ volume: 'Volume pricing',
185
+ custom: 'Customer choose price',
186
+ },
187
+ types: {
188
+ onetime: 'One time',
189
+ recurring: 'Recurring',
190
+ },
191
+ aggregate: {
192
+ sum: 'Sum of usage values during period',
193
+ max: 'Maximum usage value during period',
194
+ last_during_period: 'Most recent usage value during period',
195
+ last_ever: 'Most recent usage value',
196
+ },
169
197
  },
170
198
  coupon: {
171
199
  create: 'Create Coupon',
@@ -193,6 +221,8 @@ export default flat({
193
221
  customMessage: 'Replace default with custom message',
194
222
  customMessageTip: 'Include any details you see fit, such as delivery information.',
195
223
  noConfirmPage: 'Do not show confirmation page',
224
+ mintNft: 'Mint NFT to user on payment',
225
+ mintNftFrom: 'Mint from following factory (collection)',
196
226
  createInvoice: 'Creates invoices for related payments.',
197
227
  adjustable: 'Adjustable quantity',
198
228
  adjustableQuantity: 'Let customers adjust quantity',
@@ -249,6 +279,14 @@ export default flat({
249
279
  save: 'Save payment method',
250
280
  saved: 'Payment method successfully saved',
251
281
  settings: 'Settings',
282
+ props: {
283
+ type: 'Type',
284
+ confirmation: 'Confirmation',
285
+ recurring: 'Recurring support',
286
+ refund: 'Refund support',
287
+ dispute: 'Dispute support',
288
+ currencies: 'Currency support',
289
+ },
252
290
  name: {
253
291
  label: 'Name',
254
292
  tip: 'Consumer facing',
@@ -396,6 +434,18 @@ export default flat({
396
434
  postal_code: 'Postal Code',
397
435
  },
398
436
  },
437
+ passport: {
438
+ intro:
439
+ 'Manage payment settings for blocklet passports, you should assign both product and payment entry to a passport to make it available for purchase.',
440
+ payLink: 'Payment entry',
441
+ payPreview: 'Payment preview',
442
+ preview: 'Preview payment page',
443
+ assign: 'Assign to passport',
444
+ assignTip: 'Assign this payment link to selected passport to make it available for purchase',
445
+ unassign: 'Reset purchase config',
446
+ unassignTip: 'Confirm to clear the payment entry and product config for this passport?',
447
+ assignError: 'Must select a passport to assign',
448
+ },
399
449
  webhookEndpoint: {
400
450
  hosted: 'Hosted endpoints',
401
451
  add: 'Add endpoint',
@@ -425,6 +475,7 @@ export default flat({
425
475
  try: 'Try for free',
426
476
  include: 'This includes:',
427
477
  subscription: 'Subscribe',
478
+ noPricing: 'No items to purchase',
428
479
  setup: 'Subscribe',
429
480
  continue: 'Confirm {action}',
430
481
  connect: 'Connect and {action}',
@@ -463,7 +514,7 @@ export default flat({
463
514
  subscriptions: 'Current Subscriptions',
464
515
  invoices: 'Invoice History',
465
516
  details: 'Billing Details',
466
- update: 'Update',
517
+ update: 'Update Information',
467
518
  empty: 'Seems you do not have any subscriptions or payments here',
468
519
  cancel: {
469
520
  button: 'Cancel',