@blocklet/payment-react 1.24.4 → 1.25.1

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 (98) hide show
  1. package/es/components/auto-topup/modal.d.ts +2 -0
  2. package/es/components/auto-topup/modal.js +48 -6
  3. package/es/components/auto-topup/product-card.d.ts +16 -1
  4. package/es/components/auto-topup/product-card.js +97 -15
  5. package/es/components/dynamic-pricing-unavailable.d.ts +9 -0
  6. package/es/components/dynamic-pricing-unavailable.js +58 -0
  7. package/es/components/loading-amount.d.ts +17 -0
  8. package/es/components/loading-amount.js +46 -0
  9. package/es/components/price-change-confirm.d.ts +18 -0
  10. package/es/components/price-change-confirm.js +107 -0
  11. package/es/components/quote-details-panel.d.ts +21 -0
  12. package/es/components/quote-details-panel.js +170 -0
  13. package/es/components/quote-lock-banner.d.ts +7 -0
  14. package/es/components/quote-lock-banner.js +79 -0
  15. package/es/components/slippage-config.d.ts +20 -0
  16. package/es/components/slippage-config.js +261 -0
  17. package/es/history/invoice/list.js +125 -15
  18. package/es/hooks/dynamic-pricing.d.ts +102 -0
  19. package/es/hooks/dynamic-pricing.js +393 -0
  20. package/es/index.d.ts +6 -1
  21. package/es/index.js +9 -1
  22. package/es/libs/util.d.ts +42 -5
  23. package/es/libs/util.js +345 -57
  24. package/es/locales/en.js +114 -3
  25. package/es/locales/zh.js +114 -3
  26. package/es/payment/form/index.d.ts +4 -1
  27. package/es/payment/form/index.js +454 -22
  28. package/es/payment/index.d.ts +1 -1
  29. package/es/payment/index.js +279 -16
  30. package/es/payment/product-item.d.ts +26 -1
  31. package/es/payment/product-item.js +330 -51
  32. package/es/payment/summary-section/promotion-section.d.ts +32 -0
  33. package/es/payment/summary-section/promotion-section.js +143 -0
  34. package/es/payment/summary-section/total-section.d.ts +39 -0
  35. package/es/payment/summary-section/total-section.js +83 -0
  36. package/es/payment/summary.d.ts +17 -2
  37. package/es/payment/summary.js +300 -253
  38. package/es/types/index.d.ts +11 -0
  39. package/lib/components/auto-topup/modal.d.ts +2 -0
  40. package/lib/components/auto-topup/modal.js +54 -6
  41. package/lib/components/auto-topup/product-card.d.ts +16 -1
  42. package/lib/components/auto-topup/product-card.js +75 -7
  43. package/lib/components/dynamic-pricing-unavailable.d.ts +9 -0
  44. package/lib/components/dynamic-pricing-unavailable.js +81 -0
  45. package/lib/components/loading-amount.d.ts +17 -0
  46. package/lib/components/loading-amount.js +53 -0
  47. package/lib/components/price-change-confirm.d.ts +18 -0
  48. package/lib/components/price-change-confirm.js +157 -0
  49. package/lib/components/quote-details-panel.d.ts +21 -0
  50. package/lib/components/quote-details-panel.js +226 -0
  51. package/lib/components/quote-lock-banner.d.ts +7 -0
  52. package/lib/components/quote-lock-banner.js +93 -0
  53. package/lib/components/slippage-config.d.ts +20 -0
  54. package/lib/components/slippage-config.js +316 -0
  55. package/lib/history/invoice/list.js +167 -27
  56. package/lib/hooks/dynamic-pricing.d.ts +102 -0
  57. package/lib/hooks/dynamic-pricing.js +390 -0
  58. package/lib/index.d.ts +6 -1
  59. package/lib/index.js +32 -0
  60. package/lib/libs/util.d.ts +42 -5
  61. package/lib/libs/util.js +367 -49
  62. package/lib/locales/en.js +114 -3
  63. package/lib/locales/zh.js +114 -3
  64. package/lib/payment/form/index.d.ts +4 -1
  65. package/lib/payment/form/index.js +476 -20
  66. package/lib/payment/index.d.ts +1 -1
  67. package/lib/payment/index.js +308 -14
  68. package/lib/payment/product-item.d.ts +26 -1
  69. package/lib/payment/product-item.js +270 -35
  70. package/lib/payment/summary-section/promotion-section.d.ts +32 -0
  71. package/lib/payment/summary-section/promotion-section.js +133 -0
  72. package/lib/payment/summary-section/total-section.d.ts +39 -0
  73. package/lib/payment/summary-section/total-section.js +117 -0
  74. package/lib/payment/summary.d.ts +17 -2
  75. package/lib/payment/summary.js +205 -127
  76. package/lib/types/index.d.ts +11 -0
  77. package/package.json +3 -3
  78. package/src/components/auto-topup/modal.tsx +59 -6
  79. package/src/components/auto-topup/product-card.tsx +118 -11
  80. package/src/components/dynamic-pricing-unavailable.tsx +69 -0
  81. package/src/components/loading-amount.tsx +66 -0
  82. package/src/components/price-change-confirm.tsx +136 -0
  83. package/src/components/quote-details-panel.tsx +218 -0
  84. package/src/components/quote-lock-banner.tsx +99 -0
  85. package/src/components/slippage-config.tsx +336 -0
  86. package/src/history/invoice/list.tsx +143 -9
  87. package/src/hooks/dynamic-pricing.ts +617 -0
  88. package/src/index.ts +9 -0
  89. package/src/libs/util.ts +473 -58
  90. package/src/locales/en.tsx +117 -0
  91. package/src/locales/zh.tsx +111 -0
  92. package/src/payment/form/index.tsx +561 -19
  93. package/src/payment/index.tsx +349 -10
  94. package/src/payment/product-item.tsx +451 -37
  95. package/src/payment/summary-section/promotion-section.tsx +172 -0
  96. package/src/payment/summary-section/total-section.tsx +141 -0
  97. package/src/payment/summary.tsx +334 -192
  98. package/src/types/index.ts +15 -0
package/es/locales/en.js CHANGED
@@ -141,7 +141,8 @@ export default flat({
141
141
  viewInvoice: "Invoice Detail",
142
142
  submit: "Submit",
143
143
  expired: "Expired",
144
- consumed: "Consumed"
144
+ consumed: "Consumed",
145
+ nextCharge: "Next charge"
145
146
  },
146
147
  payment: {
147
148
  checkout: {
@@ -166,6 +167,74 @@ export default flat({
166
167
  view: "View"
167
168
  },
168
169
  paymentRequired: "Payment Required",
170
+ quote: {
171
+ title: "Price Locked",
172
+ locked: "Exchange rate locked",
173
+ expired: "Quote updating...",
174
+ expiredMessage: "Quote updating...",
175
+ expiring: "Quote updating...",
176
+ remaining: "Quote updates in {time}",
177
+ currentRate: "Current Exchange Rate",
178
+ expiresIn: "Updates in",
179
+ exchangeRate: "Exchange Rate",
180
+ provider: "Provider",
181
+ source: "Source",
182
+ dynamicItems: "Dynamic Pricing Items",
183
+ dynamicPricingInfo: "Dynamic pricing: 1 {symbol} = {rate} {currency}",
184
+ referenceUnavailable: "Reference price will update shortly.",
185
+ rateLine: "1 {symbol} \u2248 {rate}",
186
+ validity: "Quote valid: {time}",
187
+ lockedWithTime: "Price locked: {time}",
188
+ lockExpired: "Price lock expired. Please re-confirm.",
189
+ detailProvider: "Provider",
190
+ detailUpdatedAt: "Last updated",
191
+ detailValidity: "Quote validity",
192
+ detailLock: "Price lock",
193
+ detailPriceImpact: "Price impact",
194
+ detailSlippage: "Slippage limit",
195
+ detailRefresh: "Refresh quote",
196
+ slippage: {
197
+ title: "Slippage Limit",
198
+ tooltip: "Set the minimum exchange rate you are willing to accept. If the rate falls below this value at payment time, the transaction will be rejected.",
199
+ percentMode: "Percentage",
200
+ rateMode: "Exact Rate",
201
+ invalid: "Please enter a valid value",
202
+ invalidPositive: "Please enter a value greater than 0",
203
+ rateRequired: "Exchange rate information required",
204
+ invalidRate: "Invalid exchange rate value",
205
+ minAcceptableRate: "Minimum Acceptable Rate",
206
+ maxPayableIncrease: "Maximum Payment Increase",
207
+ percentInputLabel: "Slippage Percentage",
208
+ rateInputLabel: "Minimum Acceptable Rate ({currency})",
209
+ minRateHint: "Minimum acceptable rate: {rate} {currency}",
210
+ maxPayableHint: "Maximum payment increase: +{percent}%"
211
+ },
212
+ slippageLimit: {
213
+ title: "Slippage Limit Configuration",
214
+ description: "Set the minimum exchange rate you are willing to accept. If the rate falls below this value, the transaction will pause and ask for your confirmation.",
215
+ configTogglePercent: "Percentage",
216
+ configToggleRate: "Exact Rate",
217
+ recommended: "Recommended",
218
+ derivedCurrentRate: "Current reference rate",
219
+ derivedMinRate: "Minimum acceptable rate"
220
+ },
221
+ rateUpdateLine: "1 {symbol} \u2248 {rate} \xB7 updates in {time}",
222
+ updateHint: "Prices will auto-refresh after update.",
223
+ lockExpiredTitle: "Price lock expired",
224
+ lockExpiredDescription: "The lock window has ended. Please re-confirm the latest price.",
225
+ lockExpiredConfirm: "Re-lock price",
226
+ slippageExceededTitle: "Rate below slippage limit",
227
+ slippageExceededDescription: "The current rate is below your minimum acceptable rate. Please refresh the quote and try again.",
228
+ updated: {
229
+ pleaseRetry: "Price updated, please resubmit"
230
+ },
231
+ priceUpdatedTitle: "Price updated",
232
+ priceUpdatedDescriptionRate: "Due to TBA exchange rate changes, the amount has been recalculated.",
233
+ priceUpdatedDescriptionRecalc: "The amount has been recalculated.",
234
+ priceUpdatedNewTotalLabel: "Updated total",
235
+ priceUpdatedOldTotal: "Previous total: {total}",
236
+ priceUpdatedConfirm: "Confirm and continue"
237
+ },
169
238
  staking: {
170
239
  title: "Staking Required",
171
240
  tooltip: "Staking is used to ensure that future invoices can be paid normally. Revoking the staking from DID Wallet means canceling the subscription."
@@ -232,6 +301,14 @@ export default flat({
232
301
  },
233
302
  arcSphereToast: "Successfully installed, three seconds to return to the page continue..."
234
303
  },
304
+ priceChange: {
305
+ unavailable: "Unable to fetch exchange rate. Please try again later.",
306
+ unstable: "Price is volatile. Please try again later.",
307
+ title: "Price Changed",
308
+ description: "Price changed significantly. Please refresh the quote and try again.",
309
+ action: "Refresh Quote",
310
+ cancel: "Cancel"
311
+ },
235
312
  confirm: {
236
313
  withStake: "By confirming, you allow {payee} to charge your account for future payments and, if necessary, slash your stake. You can cancel your subscription or withdraw your stake at any time.",
237
314
  withoutStake: "By confirming, you allow {payee} to charge your account for future payments. You can cancel your subscription at any time."
@@ -265,6 +342,7 @@ export default flat({
265
342
  add: "Add to order",
266
343
  remove: "Remove from order"
267
344
  },
345
+ dynamicPricing: "Dynamic Price",
268
346
  credit: {
269
347
  normal: {
270
348
  oneTime: "Purchase {amount}.",
@@ -400,6 +478,13 @@ export default flat({
400
478
  maxAttempts: "Daily Top-up Attempts Limit",
401
479
  maxAttemptsPlaceholder: "0 means unlimited",
402
480
  maxAttemptsDescription: "The maximum number of top-up attempts you can make each day, 0 means unlimited"
481
+ },
482
+ dynamicPricing: {
483
+ title: "Dynamic Pricing",
484
+ currentRate: "Current Exchange Rate",
485
+ slippageTolerance: "Slippage Tolerance",
486
+ minAcceptableRate: "Min Acceptable Rate",
487
+ configureSlippage: "Configure Slippage"
403
488
  }
404
489
  },
405
490
  customer: {
@@ -471,7 +556,10 @@ export default flat({
471
556
  submit: "Confirm change",
472
557
  confirm: "By confirming this change, you allow {payee} to charge {symbol} from your account for future payments in accordance with their terms. You can always change your payment method.",
473
558
  completed: "Your payment method has been successfully updated, all future payments will use the new payment method unless you change it again.",
474
- title: "Payment Method Change"
559
+ title: "Payment Method Change",
560
+ reauthorizationRequired: "Slippage settings updated. Re-authorization required to ensure sufficient allowance.",
561
+ reauthorizationTitle: "Re-authorize Payment",
562
+ reauthorizationCompleted: "Payment authorization has been successfully updated."
475
563
  },
476
564
  invoice: {
477
565
  summary: "Summary",
@@ -497,14 +585,30 @@ export default flat({
497
585
  invoiceNumber: "Invoice Number",
498
586
  emptyList: "No Invoices",
499
587
  noPaymentRequired: "No Payment Required",
588
+ slippageExceeded: "Slippage Exceeded",
589
+ slippageExceededDetail: "Exchange rate slippage exceeded threshold, auto-payment failed. Current rate {currentRate}, minimum acceptable {minRate}",
500
590
  payBatch: "Pay Due Invoices",
501
591
  stripePayDescription: "Complete payment using your saved payment method or add a new one.",
502
592
  amount: "Amount",
503
593
  paymentConfirmTitle: "Payment Confirmation",
504
594
  paymentConfirmDescription: "After completing this payment, the payment method you use will be automatically set as the default for this subscription. Additionally, we will retry payment for any other unpaid invoices associated with this subscription.",
505
595
  continue: "Continue",
596
+ priceChanged: "The exchange rate has changed by {percent}%. The payment amount will be updated. Do you want to continue?",
597
+ paymentCancelled: "Payment cancelled",
506
598
  credit: "Credit",
507
- creditRefresh: "Refresh every {interval} {unit}"
599
+ creditRefresh: "Refresh every {interval} {unit}",
600
+ quote: {
601
+ exchangeRate: "Exchange Rate",
602
+ baseAmount: "Base Amount",
603
+ providers: "Providers",
604
+ rateTimestamp: "Rate Timestamp",
605
+ consensusMethod: "Consensus",
606
+ rateStatus: "Rate Status",
607
+ rateStatusNormal: "Normal",
608
+ rateStatusDegraded: "Degraded",
609
+ slippage: "Slippage",
610
+ atPaymentRate: "(at payment rate {rate})"
611
+ }
508
612
  },
509
613
  overduePayment: {
510
614
  setupPaymentDescription: "Use your saved card or add a new one to complete payment via Stripe.",
@@ -580,6 +684,13 @@ export default flat({
580
684
  paid: "Paid",
581
685
  processing: "Processing"
582
686
  }
687
+ },
688
+ dynamicPricing: {
689
+ unavailable: {
690
+ title: "Unable to Calculate Real-Time Price",
691
+ message: "Exchange rate service is currently unavailable. Products with dynamic pricing cannot be purchased at this moment.",
692
+ retry: "Retry"
693
+ }
583
694
  }
584
695
  },
585
696
  refund: {
package/es/locales/zh.js CHANGED
@@ -141,7 +141,8 @@ export default flat({
141
141
  viewInvoice: "\u8D26\u5355\u8BE6\u60C5",
142
142
  submit: "\u63D0\u4EA4",
143
143
  expired: "\u5DF2\u8FC7\u671F",
144
- consumed: "\u5DF2\u6D88\u8D39"
144
+ consumed: "\u5DF2\u6D88\u8D39",
145
+ nextCharge: "\u4E0B\u6B21\u6263\u6B3E"
145
146
  },
146
147
  payment: {
147
148
  checkout: {
@@ -166,6 +167,74 @@ export default flat({
166
167
  view: "\u67E5\u770B"
167
168
  },
168
169
  paymentRequired: "\u652F\u4ED8\u91D1\u989D",
170
+ quote: {
171
+ title: "\u4EF7\u683C\u5DF2\u9501\u5B9A",
172
+ locked: "\u6C47\u7387\u5DF2\u9501\u5B9A",
173
+ expired: "\u62A5\u4EF7\u66F4\u65B0\u4E2D\u2026",
174
+ expiredMessage: "\u62A5\u4EF7\u66F4\u65B0\u4E2D\u2026",
175
+ expiring: "\u62A5\u4EF7\u66F4\u65B0\u4E2D\u2026",
176
+ remaining: "\u62A5\u4EF7\u5C06\u5728 {time} \u540E\u66F4\u65B0",
177
+ currentRate: "\u5F53\u524D\u6C47\u7387",
178
+ expiresIn: "\u66F4\u65B0\u65F6\u95F4",
179
+ exchangeRate: "\u6C47\u7387",
180
+ provider: "\u6570\u636E\u63D0\u4F9B\u65B9",
181
+ source: "\u6570\u636E\u6765\u6E90",
182
+ dynamicItems: "\u52A8\u6001\u5B9A\u4EF7\u5546\u54C1",
183
+ dynamicPricingInfo: "\u52A8\u6001\u8BA1\u4EF7\uFF1A1 {symbol} = {rate} {currency}",
184
+ referenceUnavailable: "\u7A0D\u540E\u66F4\u65B0",
185
+ rateLine: "1 {symbol} \u2248 {rate}",
186
+ validity: "\u62A5\u4EF7\u6709\u6548\u671F\uFF1A{time}",
187
+ lockedWithTime: "\u4EF7\u683C\u5DF2\u9501\u5B9A\uFF1A{time}",
188
+ lockExpired: "\u4EF7\u683C\u9501\u5B9A\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u786E\u8BA4",
189
+ detailProvider: "\u6570\u636E\u6E90",
190
+ detailUpdatedAt: "\u6700\u8FD1\u66F4\u65B0",
191
+ detailValidity: "\u62A5\u4EF7\u6709\u6548\u671F",
192
+ detailLock: "\u9501\u4EF7\u5269\u4F59",
193
+ detailPriceImpact: "\u4EF7\u683C\u5F71\u54CD",
194
+ detailSlippage: "\u6ED1\u70B9\u4E0B\u9650",
195
+ detailRefresh: "\u5237\u65B0\u62A5\u4EF7",
196
+ slippage: {
197
+ title: "\u6ED1\u70B9\u4E0B\u9650",
198
+ tooltip: "\u8BBE\u7F6E\u60A8\u613F\u610F\u63A5\u53D7\u7684\u6700\u4F4E\u6C47\u7387\u3002\u652F\u4ED8\u65F6\u6C47\u7387\u4F4E\u4E8E\u6B64\u503C\uFF0C\u4EA4\u6613\u5C06\u88AB\u62D2\u7EDD\u3002",
199
+ percentMode: "\u767E\u5206\u6BD4",
200
+ rateMode: "\u7CBE\u786E\u6C47\u7387",
201
+ invalid: "\u8BF7\u8F93\u5165\u6709\u6548\u7684\u6570\u503C",
202
+ invalidPositive: "\u8BF7\u8F93\u5165\u5927\u4E8E 0 \u7684\u6570\u503C",
203
+ rateRequired: "\u9700\u8981\u6C47\u7387\u4FE1\u606F",
204
+ invalidRate: "\u65E0\u6548\u7684\u6C47\u7387\u503C",
205
+ minAcceptableRate: "\u6700\u4F4E\u53EF\u63A5\u53D7\u6C47\u7387",
206
+ maxPayableIncrease: "\u6700\u5927\u652F\u4ED8\u589E\u5E45",
207
+ percentInputLabel: "\u6ED1\u70B9\u767E\u5206\u6BD4",
208
+ rateInputLabel: "\u6700\u4F4E\u53EF\u63A5\u53D7\u6C47\u7387 ({currency})",
209
+ minRateHint: "\u6700\u4F4E\u53EF\u63A5\u53D7\u6C47\u7387: {rate} {currency}",
210
+ maxPayableHint: "\u6700\u5927\u652F\u4ED8\u589E\u5E45: +{percent}%"
211
+ },
212
+ slippageLimit: {
213
+ title: "\u6ED1\u70B9\u4E0B\u9650\u914D\u7F6E",
214
+ description: "\u8BBE\u7F6E\u60A8\u613F\u610F\u63A5\u53D7\u7684\u6700\u4F4E\u6C47\u7387\u3002\u652F\u4ED8\u65F6\u6C47\u7387\u4F4E\u4E8E\u6B64\u503C\uFF0C\u4EA4\u6613\u5C06\u88AB\u6682\u505C\u5E76\u63D0\u793A\u60A8\u786E\u8BA4\u3002",
215
+ configTogglePercent: "\u767E\u5206\u6BD4",
216
+ configToggleRate: "\u7CBE\u786E\u6C47\u7387",
217
+ recommended: "\u63A8\u8350",
218
+ derivedCurrentRate: "\u5F53\u524D\u53C2\u8003\u6C47\u7387",
219
+ derivedMinRate: "\u6700\u4F4E\u53EF\u63A5\u53D7\u6C47\u7387"
220
+ },
221
+ rateUpdateLine: "1 {symbol} \u2248 {rate} \xB7 {time} \u540E\u81EA\u52A8\u66F4\u65B0",
222
+ updateHint: "\u66F4\u65B0\u540E\u5C06\u81EA\u52A8\u5237\u65B0\u4EF7\u683C",
223
+ lockExpiredTitle: "\u4EF7\u683C\u5DF2\u8FC7\u671F",
224
+ lockExpiredDescription: "\u9501\u5B9A\u65F6\u95F4\u5DF2\u7ED3\u675F\uFF0C\u8BF7\u91CD\u65B0\u786E\u8BA4\u4EF7\u683C\u540E\u7EE7\u7EED\u652F\u4ED8\u3002",
225
+ lockExpiredConfirm: "\u91CD\u65B0\u9501\u5B9A\u4EF7\u683C",
226
+ slippageExceededTitle: "\u6C47\u7387\u4F4E\u4E8E\u6ED1\u70B9\u4E0B\u9650",
227
+ slippageExceededDescription: "\u5F53\u524D\u6C47\u7387\u4F4E\u4E8E\u60A8\u8BBE\u7F6E\u7684\u6700\u4F4E\u53EF\u63A5\u53D7\u6C47\u7387\u3002\u8BF7\u5237\u65B0\u62A5\u4EF7\u540E\u91CD\u8BD5\u3002",
228
+ updated: {
229
+ pleaseRetry: "\u4EF7\u683C\u5DF2\u66F4\u65B0\uFF0C\u8BF7\u91CD\u65B0\u63D0\u4EA4"
230
+ },
231
+ priceUpdatedTitle: "\u4EF7\u683C\u5DF2\u66F4\u65B0",
232
+ priceUpdatedDescriptionRate: "\u7531\u4E8E TBA \u6C47\u7387\u53D8\u5316\uFF0C\u7CFB\u7EDF\u5DF2\u91CD\u65B0\u8BA1\u7B97\u672C\u6B21\u91D1\u989D\u3002",
233
+ priceUpdatedDescriptionRecalc: "\u7CFB\u7EDF\u5DF2\u91CD\u65B0\u8BA1\u7B97\u672C\u6B21\u91D1\u989D\u3002",
234
+ priceUpdatedNewTotalLabel: "\u66F4\u65B0\u540E\u603B\u8BA1",
235
+ priceUpdatedOldTotal: "\u539F\u603B\u8BA1\uFF1A{total}",
236
+ priceUpdatedConfirm: "\u786E\u8BA4\u5E76\u7EE7\u7EED\u652F\u4ED8"
237
+ },
169
238
  staking: {
170
239
  title: "\u8D28\u62BC\u91D1\u989D",
171
240
  tooltip: "\u8D28\u62BC\u76F8\u5F53\u4E8E\u4FDD\u8BC1\u91D1\uFF0C\u7528\u4E8E\u786E\u4FDD\u672A\u6765\u7684\u8D26\u5355\u80FD\u591F\u6B63\u5E38\u6263\u6B3E\uFF0C\u5982\u679C\u4F60\u4ECE DID Wallet \u64A4\u9500\u8D28\u62BC\uFF0C\u8BA2\u9605\u4E5F\u4F1A\u88AB\u53D6\u6D88\u3002"
@@ -232,6 +301,14 @@ export default flat({
232
301
  },
233
302
  arcSphereToast: "\u652F\u4ED8\u5E76\u5B89\u88C5\u6210\u529F\uFF0C\u4E09\u79D2\u540E\u8FD4\u56DE\u9875\u9762\u7EE7\u7EED..."
234
303
  },
304
+ priceChange: {
305
+ unavailable: "\u65E0\u6CD5\u83B7\u53D6\u6C47\u7387\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",
306
+ unstable: "\u5F53\u524D\u6C47\u7387\u6CE2\u52A8\u8F83\u5927\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",
307
+ title: "\u6C47\u7387\u53D8\u5316",
308
+ description: "\u6C47\u7387\u53D8\u5316\u8F83\u5927\uFF0C\u8BF7\u5237\u65B0\u62A5\u4EF7\u540E\u91CD\u8BD5\u3002",
309
+ action: "\u5237\u65B0\u62A5\u4EF7",
310
+ cancel: "\u53D6\u6D88"
311
+ },
235
312
  confirm: {
236
313
  withStake: "\u786E\u8BA4\u8BA2\u9605\uFF0C\u5373\u8868\u793A\u60A8\u6388\u6743 {payee} \u4ECE\u60A8\u7684\u8D26\u6237\u6263\u53D6\u672A\u6765\u6B3E\u9879\uFF0C\u5E76\u5728\u5FC5\u8981\u65F6\u7F5A\u6CA1\u8D28\u62BC\u3002\u60A8\u53EF\u968F\u65F6\u53D6\u6D88\u8BA2\u9605\u6216\u64A4\u9500\u8D28\u62BC\u3002",
237
314
  withoutStake: "\u786E\u8BA4\u8BA2\u9605\uFF0C\u5373\u8868\u793A\u60A8\u6388\u6743 {payee} \u4ECE\u60A8\u7684\u8D26\u6237\u6263\u53D6\u672A\u6765\u6B3E\u9879\u3002\u60A8\u53EF\u968F\u65F6\u53D6\u6D88\u8BA2\u9605\u3002"
@@ -273,6 +350,7 @@ export default flat({
273
350
  add: "\u6DFB\u52A0\u5230\u8BA2\u5355",
274
351
  remove: "\u4ECE\u8BA2\u5355\u79FB\u9664"
275
352
  },
353
+ dynamicPricing: "\u52A8\u6001\u5B9A\u4EF7",
276
354
  promotion: {
277
355
  add_code: "\u6DFB\u52A0\u4FC3\u9500\u7801",
278
356
  enter_code: "\u8F93\u5165\u4FC3\u9500\u7801",
@@ -404,6 +482,13 @@ export default flat({
404
482
  maxAttempts: "\u6BCF\u65E5\u5145\u503C\u6B21\u6570\u4E0A\u9650",
405
483
  maxAttemptsPlaceholder: "0\u8868\u793A\u65E0\u9650\u5236",
406
484
  maxAttemptsDescription: "\u6BCF\u65E5\u53EF\u5145\u503C\u7684\u6700\u5927\u6B21\u6570\uFF0C0 \u8868\u793A\u65E0\u9650\u5236"
485
+ },
486
+ dynamicPricing: {
487
+ title: "\u52A8\u6001\u5B9A\u4EF7",
488
+ currentRate: "\u5F53\u524D\u6C47\u7387",
489
+ slippageTolerance: "\u6ED1\u70B9\u5BB9\u5DEE",
490
+ minAcceptableRate: "\u6700\u4F4E\u53EF\u63A5\u53D7\u6C47\u7387",
491
+ configureSlippage: "\u914D\u7F6E\u6ED1\u70B9"
407
492
  }
408
493
  },
409
494
  customer: {
@@ -475,7 +560,10 @@ export default flat({
475
560
  submit: "\u786E\u8BA4\u53D8\u66F4",
476
561
  confirm: "\u786E\u8BA4\u53D8\u66F4\u65B9\u5F0F\u610F\u5473\u7740\u4F60\u5141\u8BB8 {payee} \u4F7F\u7528\u65B0\u7684\u652F\u4ED8\u65B9\u5F0F\u652F\u4ED8\u4F60\u7684\u672A\u6765\u8D26\u5355\u3002\u4F60\u53EF\u4EE5\u968F\u65F6\u518D\u6B21\u53D8\u66F4\u652F\u4ED8\u65B9\u5F0F\u3002",
477
562
  completed: "\u4F60\u7684\u652F\u4ED8\u65B9\u5F0F \u5DF2\u7ECF\u66F4\u65B0\u6210\u529F\u3002\u4F60\u53EF\u4EE5\u5728\u4F60\u7684\u8D26\u6237\u4E2D\u67E5\u770B\u6B64\u652F\u4ED8\u65B9\u5F0F\u7684\u8BE6\u7EC6\u4FE1\u606F\u3002",
478
- title: "\u652F\u4ED8\u65B9\u5F0F\u53D8\u66F4"
563
+ title: "\u652F\u4ED8\u65B9\u5F0F\u53D8\u66F4",
564
+ reauthorizationRequired: "\u6ED1\u70B9\u8BBE\u7F6E\u5DF2\u66F4\u65B0\u3002\u9700\u8981\u91CD\u65B0\u6388\u6743\u4EE5\u786E\u4FDD\u6388\u6743\u91D1\u989D\u5145\u8DB3\u3002",
565
+ reauthorizationTitle: "\u91CD\u65B0\u6388\u6743\u652F\u4ED8",
566
+ reauthorizationCompleted: "\u652F\u4ED8\u6388\u6743\u5DF2\u6210\u529F\u66F4\u65B0\u3002"
479
567
  },
480
568
  invoice: {
481
569
  summary: "\u6458\u8981",
@@ -501,12 +589,28 @@ export default flat({
501
589
  invoiceNumber: "\u8D26\u5355\u7F16\u53F7",
502
590
  emptyList: "\u6CA1\u6709\u8D26\u5355",
503
591
  noPaymentRequired: "\u65E0\u9700\u652F\u4ED8",
592
+ slippageExceeded: "\u6ED1\u70B9\u8D85\u9650",
593
+ slippageExceededDetail: "\u6C47\u7387\u6ED1\u70B9\u8D85\u8FC7\u4E0B\u9650\uFF0C\u65E0\u6CD5\u81EA\u52A8\u6263\u6B3E\u3002\u5F53\u524D\u6C47\u7387 {currentRate}\uFF0C\u6700\u4F4E\u53EF\u63A5\u53D7 {minRate}",
504
594
  payBatch: "\u652F\u4ED8\u6B20\u6B3E",
505
595
  paymentConfirmTitle: "\u652F\u4ED8\u786E\u8BA4",
506
596
  paymentConfirmDescription: "\u5B8C\u6210\u672C\u6B21\u652F\u4ED8\u540E\uFF0C\u60A8\u4F7F\u7528\u7684\u652F\u4ED8\u65B9\u5F0F\u5C06\u81EA\u52A8\u8BBE\u7F6E\u4E3A\u8BE5\u8BA2\u9605\u7684\u9ED8\u8BA4\u652F\u4ED8\u65B9\u5F0F\u3002\u6B64\u5916\uFF0C\u6211\u4EEC\u8FD8\u5C06\u5BF9\u8BE5\u8BA2\u9605\u7684\u5176\u4ED6\u6B20\u8D39\u8D26\u5355\u8FDB\u884C\u91CD\u8BD5\u6536\u8D39\u3002",
507
597
  continue: "\u7EE7\u7EED",
598
+ priceChanged: "\u6C47\u7387\u5DF2\u53D8\u52A8 {percent}%\u3002\u652F\u4ED8\u91D1\u989D\u5C06\u4F1A\u66F4\u65B0\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",
599
+ paymentCancelled: "\u652F\u4ED8\u5DF2\u53D6\u6D88",
508
600
  credit: "\u989D\u5EA6",
509
- creditRefresh: "\u6BCF{interval}{unit}\u5237\u65B0"
601
+ creditRefresh: "\u6BCF{interval}{unit}\u5237\u65B0",
602
+ quote: {
603
+ exchangeRate: "\u6C47\u7387",
604
+ baseAmount: "USD \u672C\u4F4D\u91D1\u989D",
605
+ providers: "\u6570\u636E\u6E90",
606
+ rateTimestamp: "\u6C47\u7387\u65F6\u95F4",
607
+ consensusMethod: "\u6C47\u7387\u7B97\u6CD5",
608
+ rateStatus: "\u6C47\u7387\u72B6\u6001",
609
+ rateStatusNormal: "\u6B63\u5E38",
610
+ rateStatusDegraded: "\u964D\u7EA7",
611
+ slippage: "\u6ED1\u70B9",
612
+ atPaymentRate: "\uFF08\u6309\u652F\u4ED8\u65F6\u6C47\u7387 {rate}\uFF09"
613
+ }
510
614
  },
511
615
  payment: {
512
616
  empty: "\u6CA1\u6709\u652F\u4ED8\u8BB0\u5F55",
@@ -578,6 +682,13 @@ export default flat({
578
682
  paid: "\u5DF2\u652F\u4ED8",
579
683
  processing: "\u652F\u4ED8\u4E2D"
580
684
  }
685
+ },
686
+ dynamicPricing: {
687
+ unavailable: {
688
+ title: "\u6682\u65F6\u65E0\u6CD5\u8BA1\u7B97\u5B9E\u65F6\u4EF7\u683C",
689
+ message: "\u5F53\u524D\u6C47\u7387\u670D\u52A1\u4E0D\u53EF\u7528\uFF0C\u57FA\u4E8E\u52A8\u6001\u5B9A\u4EF7\u7684\u5546\u54C1\u6682\u65F6\u65E0\u6CD5\u8D2D\u4E70\u3002",
690
+ retry: "\u91CD\u8BD5"
691
+ }
581
692
  }
582
693
  },
583
694
  refund: {
@@ -1,10 +1,13 @@
1
1
  import 'react-international-phone/style.css';
2
+ import type { TPaymentIntent } from '@blocklet/payment-types';
2
3
  import type { CheckoutCallbacks, CheckoutContext } from '../../types';
3
4
  export declare const waitForCheckoutComplete: (sessionId: string) => Promise<CheckoutContext>;
4
5
  export declare const hasDidWallet: (user: any) => any;
5
6
  type PageData = CheckoutContext & CheckoutCallbacks & {
7
+ onQuoteUpdated?: (data: Pick<CheckoutContext, 'checkoutSession' | 'quotes' | 'rateUnavailable' | 'rateError'>) => void;
8
+ onPaymentIntentUpdate?: (intent: TPaymentIntent | null) => void;
6
9
  onlyShowBtn?: boolean;
7
10
  isDonation?: boolean;
8
11
  };
9
- export default function PaymentForm({ checkoutSession, paymentMethods, paymentIntent, paymentLink, customer, onPaid, onError, action, onlyShowBtn, isDonation, }: PageData): import("react").JSX.Element;
12
+ export default function PaymentForm({ checkoutSession, paymentMethods, paymentIntent, paymentLink, customer, onPaid, onError, onQuoteUpdated, onPaymentIntentUpdate, action, onlyShowBtn, isDonation, rateUnavailable, }: PageData): import("react").JSX.Element;
10
13
  export {};