@blocklet/payment-react
Version:
Reusable react components for payment kit v2
566 lines (564 loc) • 24.2 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _flat = _interopRequireDefault(require("flat"));
var _constant = require("../libs/constant");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
module.exports = (0, _flat.default)({
common: {
id: "ID",
url: "URL",
none: "None",
createdAt: "Created At",
updatedAt: "Updated At",
resumesAt: "Resume At",
actions: "Actions",
options: "Options",
advanced: "Advanced options",
login: "Login to access this page",
settings: "Settings",
preview: "Preview",
required: "Required",
setup: "Setup",
amount: "Amount",
total: "Total",
subtotal: "Subtotal",
status: "Status",
livemode: "Test mode",
afterTime: "After {time}",
timeAgo: "{time} ago",
save: "Save",
saved: "Changes saved",
remove: "Remove",
removed: "Resource removed",
confirm: "Confirm",
clear: "Clear",
show: "Show",
hide: "Hide",
selectTimeRange: "Select time range",
startDate: "Start date",
endDate: "End date",
upload: "Upload",
change: "Change",
cancel: "Cancel",
close: "Close",
back: "Back",
every: "every",
per: "per {interval}",
slash: "/ {interval}",
unit: "units",
edit: "Edit",
quantity: "Quantity",
yes: "Yes",
no: "No",
email: "Email",
did: "DID",
txHash: "Transaction",
txGas: "Transaction Gas",
delegateTxHash: "Delegate Transaction",
stakeTxHash: "Stake Transaction",
slashTxHash: "Slash Transaction",
transferTxHash: "Transfer Transaction",
customer: "Customer",
currency: "Currency",
custom: "Custom",
description: "Description",
statementDescriptor: "Statement descriptor",
loadMore: "View more {resource}",
loadingMore: "Loading more {resource}...",
noMore: "No more {resource}",
copied: "Copied",
previous: "Back",
continue: "Continue",
qty: "Qty {count}",
each: "{unit} each",
trial: "Free for {count} {interval}{count > 1 ? 's' : ''}",
billed: "billed {rule}",
metered: "based on usage",
minute: "minute",
hour: "hour",
day: "day",
week: "week",
month: "month",
year: "year",
hourly: "hourly",
daily: "daily",
weekly: "weekly",
monthly: "monthly",
yearly: "yearly",
month3: "every 3 months",
month6: "every 6 months",
recurring: "every {count} {interval}",
hours: "hours",
days: "days",
weeks: "weeks",
months: "months",
years: "years",
type: "type",
donation: "Donation",
recoverFrom: "Recovered From",
quantityLimitPerCheckout: "Exceed purchase limit",
quantityNotEnough: "Exceed inventory",
amountPrecisionLimit: "Amount decimal places must be less than or equal to {precision}",
saveAsDefaultPriceSuccess: "Set default price successfully",
stakeAmount: "Stake Amount",
slashStakeAmount: "Slash Stake Amount",
know: "I know",
relatedSubscription: "Subscription",
connect: {
defaultScan: "Use the following methods to complete this action",
scan: "Use the following methods to complete this {action}",
confirm: "Confirm",
cancel: "Cancel"
},
paymentMethod: "Payment Method",
viewInvoice: "View Invoice",
submit: "Submit"
},
payment: {
checkout: {
contact: "Contact information",
method: "Payment method",
processing: "Processing",
payment: "Pay",
try: "Try for free",
include: "This includes:",
subscription: "Subscribe",
donate: "Donate",
select: "Select",
selected: "Selected",
noPricing: "No items to purchase",
setup: "Subscribe",
continue: "Confirm {action}",
connect: "Connect and {action}",
login: "Login to load and save contact information",
next: {
subscription: "View subscription",
invoice: "View invoice",
view: "View"
},
paymentRequired: "Payment Required",
staking: {
title: "Staking Required",
tooltip: "Staking is used to ensure that future invoices can be paid normally. Revoking the staking from DID Wallet means canceling the subscription."
},
stakingConfirm: "In this payment, the staked amount is separate from the product cost.",
donation: {
between: "Please enter an amount between {min} and {max}.",
custom: "Custom Amount",
select: "Select Amount",
summary: "{total} supporters {totalAmount} {symbol}",
empty: "No supporters yet",
gaveTips: "{count} people gave tips",
tipAmount: "Tip Amount",
tabHint: "to switch amount",
benefits: {
one: "{name} will receive all tips",
multiple: "Tips will be distributed to {count} beneficiaries",
view: "Click to view details"
},
inactive: "Donation feature is not enabled",
enable: "Enable Donation",
enableSuccess: "Successfully enabled",
configPrompt: "The donation feature is enabled. You can configure donation options in Payment Kit",
configNow: "Configure Now",
later: "Configure Later",
configTip: "Configure donation settings in Payment Kit"
},
cardPay: "{action} with bank card",
empty: "Nothing to pay",
per: "per",
pay: "Pay {payee}",
try1: "Try {name}",
try2: "Try {name} and {count} more",
sub1: "Subscribe to {name}",
sub2: "Subscribe to {name} and {count} more",
then: "Then {subscription} {recurring}",
meteredThen: "Then {recurring} based on usage",
metered: "{recurring} based on usage",
free: "{count} {interval}{count > 1 ? 's' : ''} free",
least: "continue with at least",
completed: {
payment: "Thanks for your purchase",
subscription: "Thanks for subscribing",
setup: "Thanks for subscribing",
donate: "Thanks for your tip",
tip: "A payment to {payee} has been completed. You can view the details of this payment in your account."
},
vendor: {
accountRequired: "This action requires a unified account. Please switch accounts and try again.",
processing: "Processing...",
progress: "Progress {progress}%",
delivered: "Installation completed",
failed: "Processing failed",
failedMsg: "An exception occurred during installation. We will automatically process a refund for you. We apologize for the inconvenience. Thank you for your understanding!",
launcher: {
processing: "Installing {name}",
completed: "{name} installed successfully",
failed: "Failed to install {name}"
},
didnames: {
processing: "Domain ({name}) registering",
completed: "Domain ({name}) registered successfully",
failed: "Domain ({name}) registered failed"
},
arcSphereToast: "Successfully installed, three seconds to return to the page continue..."
},
confirm: {
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.",
withoutStake: "By confirming, you allow {payee} to charge your account for future payments. You can cancel your subscription at any time."
},
required: "Required",
invalid: "Invalid",
billing: {
auto: "Country",
required: "Billing address",
country: "Country",
state: "State or province",
city: "City or town",
line1: "Address",
line2: "Line2",
postal_code: "Postal code"
},
customer: {
name: "Name",
email: "Email",
phone: "Phone",
phonePlaceholder: "Phone number",
phoneTip: "In case we need to contact you about your order"
},
customerInfo: "Customer Information",
upsell: {
save: "Save with {recurring} billing",
revert: "Switch to {recurring} billing",
off: "{saving}% off"
},
cross_sell: {
add: "Add to order",
remove: "Remove from order"
},
credit: {
normal: {
oneTime: "You will receive {amount} {symbol} after payment.",
oneTimeWithExpiry: "You will receive {amount} {symbol} after payment, valid for {duration} {unit}.",
recurring: "You will receive {amount} {symbol} {period}.",
recurringWithExpiry: "You will receive {amount} {symbol} {period}, valid for {duration} {unit}."
},
pending: {
notEnough: "Your outstanding balance is {amount} {symbol}. To settle it, a minimum purchase of {quantity} units is required.",
oneTimeEnough: "Your outstanding balance is {amount} {symbol}. Upon payment, you will receive {totalAmount} {symbol}, resulting in a net balance of {availableAmount} {symbol} after the deduction.",
oneTimeEnoughWithExpiry: "Your outstanding balance is {amount} {symbol}. Upon payment, you will receive {totalAmount} {symbol} (valid for {duration} {unit}), resulting in a net balance of {availableAmount} {symbol} after the deduction.",
recurringEnough: "Your outstanding balance is {amount} {symbol}. Upon payment, you will receive {totalAmount} {symbol} {period}, resulting in a net balance of {availableAmount} {symbol} after the deduction.",
recurringEnoughWithExpiry: "Your outstanding balance is {amount} {symbol}. Upon payment, you will receive {totalAmount} {symbol} {period} (valid for {duration} {unit}), resulting in a net balance of {availableAmount} {symbol} after the deduction."
}
},
expired: {
title: "Expired Link",
description: "This link has expired. This means that your payment has already been processed or your session has expired."
},
complete: {
title: "Checkout Completed",
description: "This checkout session has completed. This means that your payment has already been successfully processed."
},
emptyItems: {
title: "Nothing to show here",
description: "It seems this checkout session is not configured properly"
},
orderSummary: "Order Summary",
paymentDetails: "Payment Details",
productListTotal: "Includes {total} items",
promotion: {
add_code: "Add promotion code",
enter_code: "Enter promotion code",
placeholder: "Enter code",
apply: "Apply",
applied: "Applied promotion codes",
dialog: {
title: "Add promotion code"
},
error: {
unknown: "Unknown error",
network: "Network error occurred",
removal: "Failed to remove code"
}
},
coupon: {
noDiscount: "No discount",
percentage: "{percent}% off",
fixedAmount: "{amount} {symbol} off",
terms: {
forever: "{couponOff} forever",
once: "{couponOff} once",
repeating: "{couponOff} for {months} month{months > 1 ? 's' : ''}"
}
},
connectModal: {
title: "{action}",
scan: "Use the following methods to complete this payment",
confirm: "Confirm",
cancel: "Cancel"
},
fastPay: {
title: "Confirm Payment",
confirmMessage: "You will pay {amount} {symbol} from {sourceType}.",
autoPaymentReason: "Your payment will be processed automatically as your account has sufficient balance. Please confirm the following details before proceeding.",
payer: "Account",
amount: "Amount",
failed: "Account changed, please pay manually.",
balanceLink: "View Balance",
credit: {
title: "Confirm Credit Payment",
availableAmount: "Available Credit: {amount}",
confirmMessage: "You will use {amount} credits to subscribe to this service.",
meteringSubscriptionMessage: "This subscription service will deduct credits in real-time based on actual usage. You currently have {available} credits available. Confirm to continue?",
insufficientTitle: "Insufficient Credit",
insufficientMessage: "This subscription service will deduct credits in real-time based on actual usage. You currently have insufficient credits. Please top up your credits first."
}
}
},
autoTopup: {
title: "Auto Top-Up",
enableLabel: "Auto Top-Up",
purchaseConfig: "Credit Purchase Configuration",
triggerThreshold: "When credits are below",
thresholdPlaceholder: "Enter threshold amount",
thresholdDescription: "Credits remaining to trigger auto top-up",
thresholdMinError: "Threshold must be greater than 0",
thresholdFormatError: "Please enter a valid number",
creditsIncluded: "{num} {name} included",
purchaseBelow: "Purchase this package",
perPackage: "per package",
quantity: "Quantity",
selectPaymentMethod: "Select payment method",
paymentInformation: "Payment Information",
saveConfiguration: "Save Configuration",
saveSuccess: "Auto top-up configuration saved successfully",
disableSuccess: "Auto top-up disabled successfully",
authorizationRequired: "Payment authorization is required to complete the setup",
cryptoAuthorizationNote: "You will need to authorize payments from your wallet to enable automatic top-ups",
tip: "With auto top-up enabled, the system automatically buys the specified credit package when your balance drops below the threshold.",
authTitle: "Auto Top-Up Authorization",
authTip: "Please complete the authorization process to enable automatic top-up",
rechargeAmount: "Top-up Amount per Time",
currentPaymentMethod: "Current Payment Method",
changePaymentMethod: "Change Payment Method",
keepCurrent: "Keep Current",
changePaymentMethodTip: "You will be redirected to set up a new payment method when saving.",
noPaymentMethodSetup: "No payment method configured. Please set up a payment method first.",
addFunds: "Add Funds",
advanced: "Advanced Options",
enabled: "Enabled",
disabled: "Disabled",
notConfigured: "Auto Top-Up not configured",
setup: "Enable Auto Top-Up",
ruleDisplay: "When balance < {threshold}, top-up {amount} to get {credits} credits",
activeDescription: "Auto top-up is enabled. When Credits drop below {threshold}, the system will automatically purchase {credits} Credits for {amount}",
activeDescriptionWithCredits: "Auto top-up is enabled. When Credits drop below {threshold}, the system will automatically purchase {credits}.",
purchaseAmount: "Purchase Amount",
paymentMethod: "Payment Method",
walletBalance: "Wallet Balance",
paymentAddress: "Payment Address",
inactiveDescription: "Enable auto top-up to automatically renew when {name} are insufficient, effectively avoiding service interruptions.",
showDetails: "Show Method",
hideDetails: "Hide Method",
dailyLimits: {
maxAmount: "Daily Top-up Amount Limit",
maxAmountPlaceholder: "0 means unlimited",
maxAmountDescription: "The maximum amount of top-up you can make each day, 0 means unlimited",
maxAttempts: "Daily Top-up Attempts Limit",
maxAttemptsPlaceholder: "0 means unlimited",
maxAttemptsDescription: "The maximum number of top-up attempts you can make each day, 0 means unlimited"
}
},
customer: {
payments: "Payment History",
invoices: "Invoice History",
details: "Details",
summary: "Summary",
products: "Products",
update: "Update Information",
empty: "It seems you do not have any subscriptions or payments here",
cancel: {
button: "Unsubscribe",
title: "Cancel your subscription",
comment: "Any additional feedback?",
description: "Your subscription will be canceled, but it is still available until the end of your current billing period on {date}.",
trialDescription: "Free trial subscriptions will be canceled immediately and no longer available, confirm to continue.",
feedback: {
tip: "We would love your feedback, it will help us improve our service",
too_expensive: "The service is too expensive",
missing_features: "Features are missing for this service",
switched_service: "I have switched to an alternative service",
unused: "I no longer use this service",
customer_service: "The customer service is poor",
too_complex: "The service is too complex to use",
low_quality: "The service does not work well",
other: "Other reasons"
}
},
pastDue: {
button: "Pay",
invoices: "Past Due Invoices",
warning: "Past due invoices need to be paid immediately, otherwise you cannot make new purchases anymore.",
alert: {
title: "You have unpaid invoices",
customMessage: "Please pay immediately, otherwise new purchases or subscriptions will be prohibited.",
confirm: "Pay Now"
},
view: "View Due Invoices"
},
recover: {
button: "Resume Subscription",
title: "Resume Your Subscription",
description: "Your subscription will not be canceled and will be automatically renewed on {date}, please confirm to continue.",
success: "Subscription resumed successfully",
reStakeTitle: "Re-stake to resume subscription",
stakeRequiredDescription: "Your previous stake has been revoked. You need to re-stake to resume your subscription.",
stakeWarning: "Please ensure you have sufficient balance for staking before proceeding."
},
changePlan: {
button: "Change Plan",
current: "Current",
pay: "Payment Required",
scan: "Complete the payment to upgrade your subscription",
success: "Your subscription is successfully upgraded",
error: "Failed to upgrade your subscription",
config: "Switch to another plan or billing cycle",
confirm: "Confirm changes to your subscription",
summary: "What you will pay for starting {date}",
total: "Total (metered items excluded)",
appliedCredit: "Credit applied",
newCredit: "Credit issued",
remaining: "Amount due today",
tableNotFound: "Plan updates are not available"
},
changePayment: {
limit: "Your changes to payment method will not affect existing open or past-due invoices, all future payments will use the new payment method unless you change it again.",
review: "Review subscription items",
select: "Select payment method",
submit: "Confirm change",
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.",
completed: "Your payment method has been successfully updated, all future payments will use the new payment method unless you change it again.",
title: "Payment Method Change"
},
invoice: {
summary: "Summary",
details: "Details",
download: "Download PDF",
unitPrice: "Unit Price",
amountPaid: "Amount Paid",
rawQuantity: "Raw Quantity: {quantity}",
amountDue: "Amount Due",
amountApplied: "Applied Credit",
pay: "Pay this invoice",
paySuccess: "You have successfully paid the invoice",
payProcessing: "Payment is being processed, please refresh in a moment",
payError: "Failed to pay the invoice",
sync: "Sync Status",
syncing: "Syncing...",
syncSuccess: "Synced successfully",
renew: "Renew the subscription",
renewSuccess: "You have successfully renewed the subscription",
renewError: "Failed to renew the subscription",
empty: "There are no invoices",
next: "No invoices yet, next invoice will be generated on {date}",
invoiceNumber: "Invoice Number",
emptyList: "No Invoices",
noPaymentRequired: "No Payment Required",
payBatch: "Pay Due Invoices",
stripePayDescription: "Complete payment using your saved payment method or add a new one.",
amount: "Amount",
paymentConfirmTitle: "Payment Confirmation",
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.",
continue: "Continue"
},
overduePayment: {
setupPaymentDescription: "Use your saved card or add a new one to complete payment via Stripe.",
totalAmount: "Total Amount"
},
payment: {
empty: "There are no payments",
emptyList: "No Payments"
},
refund: {
empty: "There are no refunds",
emptyList: "No Refunds"
},
subscriptions: {
plan: "Plan",
nextInvoice: "Next Invoice",
title: "Manage subscriptions",
view: "Manage Subscription",
current: "Current subscription",
viewAll: "View all",
empty: "There are no subscriptions here",
changePayment: "Change payment method",
trialLeft: "Trial Left",
owner: "Subscription Owner"
},
overdue: {
title: "You have {count} due invoices for {subscriptionCount} subscriptions, totaling {total} {symbol}{method}. ",
simpleTitle: "You have {count} due invoices. ",
empty: "Great! You have no due invoices.",
defaultAlert: "Please pay immediately to avoid service disruption."
}
},
invoice: {
reason: {
creation: "Subscription create",
cycle: "Subscription cycle",
staking: "Subscription staking",
update: "Subscription update",
recover: "Subscription recover",
threshold: "Metered usage billing",
cancel: "Subscription cancel",
manual: "Manual invoice",
upcoming: "Upcoming invoice",
slashStake: "Slash stake",
stake: "Stake",
payment: "Payment",
returnStake: "Return stake",
stakeForChangePlan: "Subscription plan update",
stakeForChangePayment: "Subscription payment method update",
recharge: "Add funds",
rechargeForSubscription: "Add funds for subscription",
overdraftProtection: "SubGuard\u2122 Fee",
stakeForSubscriptionOverdraftProtection: "SubGuard\u2122",
reStakeToResumeSubscription: "Subscription resume",
gas: "Gas",
fee: "Fee"
}
},
subscription: {
overdue: {
simpleTitle: "There are {count} due invoices for your subscription {name}, you need to pay them to activate your subscription or before making new purchases.",
title: "There are {count} due invoices for your subscription {name}, the total due amount is {total} {symbol}{method}, you need to pay them to activate your subscription or before making new purchases.",
payNow: "Pay Now",
notSupport: "This payment method is not supported",
total: "Total {total} {currency}{method}",
view: "View Subscription Details",
viewNow: "View Now",
pastDue: "Past Due Invoices",
description: "If you have any questions, you can choose ",
list: "Past Due Invoices:",
empty: "There are no overdue invoices for your subscription {name}.",
retry: "Retry",
paid: "Paid",
processing: "Processing"
}
}
},
refund: {
type: {
[_constant.RefundType.refund]: "Refund",
[_constant.RefundType.stakeReturn]: "Stake Return"
}
},
empty: {
records: "No matching records found"
},
benefits: {
title: "{count} Beneficiaries"
}
});