strapi-plugin-payone-provider 5.6.13 → 5.6.14

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 (39) hide show
  1. package/admin/src/index.js +14 -20
  2. package/admin/src/pages/App/components/AppHeader.jsx +16 -17
  3. package/admin/src/pages/App/components/AppTabs.jsx +14 -15
  4. package/admin/src/pages/App/components/ApplePayBtn.jsx +9 -14
  5. package/admin/src/pages/App/components/ApplePayConfig.jsx +25 -26
  6. package/admin/src/pages/App/components/ApplePayConfigPanel.jsx +4 -4
  7. package/admin/src/pages/App/components/DocsPanel.jsx +8 -21
  8. package/admin/src/pages/App/components/GooglePayConfig.jsx +16 -14
  9. package/admin/src/pages/App/components/GooglePayConfigPanel.jsx +4 -4
  10. package/admin/src/pages/App/components/GooglePaybutton.jsx +6 -5
  11. package/admin/src/pages/App/components/configuration/ConfigurationFields.jsx +39 -47
  12. package/admin/src/pages/App/components/configuration/ConfigurationPanel.jsx +5 -4
  13. package/admin/src/pages/App/components/configuration/TestConnection.jsx +19 -36
  14. package/admin/src/pages/App/components/payment-actions/ApplePayPanel.jsx +4 -4
  15. package/admin/src/pages/App/components/payment-actions/AuthorizationForm.jsx +12 -19
  16. package/admin/src/pages/App/components/payment-actions/CaptureForm.jsx +15 -23
  17. package/admin/src/pages/App/components/payment-actions/CardDetailsInput.jsx +20 -19
  18. package/admin/src/pages/App/components/payment-actions/PaymentActionsPanel.jsx +13 -24
  19. package/admin/src/pages/App/components/payment-actions/PaymentMethodSelector.jsx +8 -6
  20. package/admin/src/pages/App/components/payment-actions/PaymentResult.jsx +6 -10
  21. package/admin/src/pages/App/components/payment-actions/PreauthorizationForm.jsx +12 -19
  22. package/admin/src/pages/App/components/payment-actions/RefundForm.jsx +15 -22
  23. package/admin/src/pages/App/components/transaction-history/FiltersPanel.jsx +83 -84
  24. package/admin/src/pages/App/components/transaction-history/HistoryPanel.jsx +7 -17
  25. package/admin/src/pages/App/components/transaction-history/ImportExportBar.jsx +153 -0
  26. package/admin/src/pages/App/components/transaction-history/TransactionTable.jsx +22 -15
  27. package/admin/src/pages/hooks/usePluginTranslations.js +12 -0
  28. package/admin/src/pages/utils/api.js +27 -0
  29. package/admin/src/translations/de.json +235 -0
  30. package/admin/src/translations/en.json +235 -0
  31. package/admin/src/translations/fr.json +235 -0
  32. package/admin/src/translations/ru.json +235 -0
  33. package/admin/src/utils/prefixPluginTranslations.js +13 -0
  34. package/package.json +2 -2
  35. package/server/controllers/payone.js +70 -0
  36. package/server/routes/index.js +16 -0
  37. package/server/services/payone.js +8 -0
  38. package/server/services/transactionService.js +80 -1
  39. package/server/utils/csvTransactions.js +82 -0
@@ -3,27 +3,19 @@ import { Box, Flex, Typography, Button } from "@strapi/design-system";
3
3
  import { Play } from "@strapi/icons";
4
4
  import RenderInput from "../RenderInput";
5
5
  import { getCurrencyOptions } from "../../../utils/countryLanguageUtils";
6
+ import { usePluginTranslations } from "../../../hooks/usePluginTranslations";
6
7
 
7
8
  const CaptureForm = ({ paymentActions }) => {
9
+ const { t } = usePluginTranslations();
8
10
  const currencyOptions = getCurrencyOptions();
9
11
  return (
10
12
  <Flex direction="column" alignItems="stretch" gap={4}>
11
13
  <Flex direction="row" gap={2}>
12
- <Typography
13
- variant="omega"
14
- fontWeight="semiBold"
15
- textColor="neutral800"
16
- className="payment-form-title"
17
- >
18
- Capture
14
+ <Typography variant="omega" fontWeight="semiBold" textColor="neutral800" className="payment-form-title">
15
+ {t("capture.title", "Capture")}
19
16
  </Typography>
20
- <Typography
21
- variant="pi"
22
- textColor="neutral600"
23
- className="payment-form-description"
24
- >
25
- Capture a previously authorized amount. Note: Reference parameter is
26
- not supported by Payone capture.
17
+ <Typography variant="pi" textColor="neutral600" className="payment-form-description">
18
+ {t("capture.description", "Capture a previously preauthorized amount.")}
27
19
  </Typography>
28
20
  </Flex>
29
21
 
@@ -36,20 +28,20 @@ const CaptureForm = ({ paymentActions }) => {
36
28
  >
37
29
  <RenderInput
38
30
  name="captureTxid"
39
- label="Transaction ID *"
31
+ label={t("common.transactionId", "Transaction ID *")}
40
32
  value={paymentActions.paymentState.captureTxid || ""}
41
33
  onChange={(e) =>
42
34
  paymentActions.handleFieldChange("captureTxid", e.target.value)
43
35
  }
44
36
  inputType="textInput"
45
- placeholder="Enter TxId from preauthorization"
37
+ placeholder={t("capture.placeholderTxid", "Enter TxId from preauthorization")}
46
38
  required
47
- tooltipContent="Transaction ID from a previous preauthorization"
39
+ tooltipContent={t("capture.tooltipTxid", "Transaction ID from a previous preauthorization")}
48
40
  />
49
41
 
50
42
  <RenderInput
51
43
  name="captureAmount"
52
- label="Amount *"
44
+ label={t("common.amount", "Amount *")}
53
45
  value={paymentActions.paymentState.paymentAmount || ""}
54
46
  onChange={(e) =>
55
47
  paymentActions.handleFieldChange("paymentAmount", e.target.value)
@@ -57,12 +49,12 @@ const CaptureForm = ({ paymentActions }) => {
57
49
  inputType="textInput"
58
50
  placeholder="1000"
59
51
  required
60
- tooltipContent="Amount in cents to capture"
52
+ tooltipContent={t("capture.tooltipAmount", "Amount in cents to capture")}
61
53
  />
62
54
 
63
55
  <RenderInput
64
56
  name="captureCurrency"
65
- label="Currency"
57
+ label={t("common.currency", "Currency")}
66
58
  value={paymentActions.paymentState.captureCurrency || "EUR"}
67
59
  onChange={(e) =>
68
60
  paymentActions.handleFieldChange("captureCurrency", e.target.value)
@@ -75,7 +67,7 @@ const CaptureForm = ({ paymentActions }) => {
75
67
 
76
68
  <RenderInput
77
69
  name="captureSequenceNumber"
78
- label="Sequence Number"
70
+ label={t("capture.sequenceNumber", "Sequence Number")}
79
71
  value={paymentActions.paymentState.captureSequenceNumber || "1"}
80
72
  onChange={(e) =>
81
73
  paymentActions.handleFieldChange(
@@ -85,7 +77,7 @@ const CaptureForm = ({ paymentActions }) => {
85
77
  }
86
78
  inputType="textInput"
87
79
  placeholder="1"
88
- tooltipContent="Sequence number for this capture (1-127), default is 1"
80
+ tooltipContent={t("capture.tooltipSequence", "Sequence number for this capture (1-127), default is 1")}
89
81
  />
90
82
 
91
83
  {["wlt", "gpp", "apl"].includes(
@@ -119,7 +111,7 @@ const CaptureForm = ({ paymentActions }) => {
119
111
  !paymentActions.paymentState.paymentAmount?.trim()
120
112
  }
121
113
  >
122
- Process Capture
114
+ {t("capture.submit", "Capture")}
123
115
  </Button>
124
116
  </Flex>
125
117
  );
@@ -1,6 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { Box, Flex, Typography, Link } from "@strapi/design-system";
3
3
  import RenderInput from "../RenderInput";
4
+ import { usePluginTranslations } from "../../../hooks/usePluginTranslations";
4
5
 
5
6
  const TEST_3DS_CARDS = [
6
7
  {
@@ -31,6 +32,7 @@ const CardDetailsInput = ({
31
32
  cardcvc2,
32
33
  setCardcvc2,
33
34
  }) => {
35
+ const { t } = usePluginTranslations();
34
36
  const [selectedTestCard, setSelectedTestCard] = React.useState("");
35
37
  const isUpdatingFromTestCard = React.useRef(false);
36
38
 
@@ -81,17 +83,17 @@ const CardDetailsInput = ({
81
83
  <Flex direction="row" gap={2} alignItems="flex-start">
82
84
  <RenderInput
83
85
  name="testCard"
84
- label="3D Secure Test Cards"
86
+ label={t("card.testCards", "3D Secure Test Cards")}
85
87
  value={selectedTestCard || ""}
86
88
  onChange={(e) => {
87
89
  const value = e.target?.value || e;
88
90
  handleTestCardSelect(value);
89
91
  }}
90
92
  inputType="select"
91
- placeholder="Select a 3DS test card to auto-fill"
92
- tooltipContent="These cards will trigger 3DS authentication redirect. Password: 12345"
93
+ placeholder={t("card.selectTestCard", "Select a 3DS test card to auto-fill")}
94
+ tooltipContent={t("card.testCardsTooltip", "These cards will trigger 3DS authentication redirect. Password: 12345")}
93
95
  options={[
94
- { value: "", label: "-- Select a test card --" },
96
+ { value: "", label: t("card.selectTestCardOption", "-- Select a test card --") },
95
97
  ...TEST_3DS_CARDS.map((card, index) => ({
96
98
  value: `${card.cardtype}-${card.cardpan}`,
97
99
  label: `${card.name} - ${card.description}`,
@@ -103,7 +105,7 @@ const CardDetailsInput = ({
103
105
  <Flex gap={4} wrap="wrap" alignItems="flex-start">
104
106
  <RenderInput
105
107
  name="cardtype"
106
- label="Card Type *"
108
+ label={t("card.cardType", "Card Type *")}
107
109
  value={cardtype || ""}
108
110
  onChange={(e) => {
109
111
  const value = e.target?.value || e;
@@ -111,7 +113,7 @@ const CardDetailsInput = ({
111
113
  }}
112
114
  inputType="select"
113
115
  required
114
- tooltipContent="Select credit card type"
116
+ tooltipContent={t("card.cardTypeTooltip", "Select credit card type")}
115
117
  options={[
116
118
  { value: "V", label: "VISA" },
117
119
  { value: "M", label: "Mastercard" },
@@ -125,13 +127,13 @@ const CardDetailsInput = ({
125
127
 
126
128
  <RenderInput
127
129
  name="cardpan"
128
- label="Card Number (PAN) *"
130
+ label={t("card.cardNumber", "Card Number (PAN) *")}
129
131
  value={cardpan || ""}
130
132
  onChange={(e) => setCardpan(e.target.value)}
131
133
  inputType="textInput"
132
- placeholder="Enter card number"
134
+ placeholder={t("card.cardNumberPlaceholder", "Enter card number")}
133
135
  required
134
- tooltipContent="Credit card number (PAN)"
136
+ tooltipContent={t("card.cardNumberTooltip", "Credit card number (PAN)")}
135
137
  style={{ flex: 2, minWidth: "300px" }}
136
138
  />
137
139
  </Flex>
@@ -139,13 +141,13 @@ const CardDetailsInput = ({
139
141
  <Flex gap={4} wrap="wrap" alignItems="flex-start">
140
142
  <RenderInput
141
143
  name="cardexpiredate"
142
- label="Expiry Date *"
144
+ label={t("card.expiryDate", "Expiry Date *")}
143
145
  value={cardexpiredate || ""}
144
146
  onChange={(e) => setCardexpiredate(e.target.value)}
145
147
  inputType="textInput"
146
- placeholder="YYMM (e.g., 2512)"
148
+ placeholder={t("card.expiryPlaceholder", "YYMM (e.g., 2512)")}
147
149
  required
148
- tooltipContent="Format: YYMM (e.g., 2512 = December 2025)"
150
+ tooltipContent={t("card.expiryTooltip", "Format: YYMM (e.g., 2512 = December 2025)")}
149
151
  type="text"
150
152
  maxLength={4}
151
153
  style={{ flex: 1, minWidth: "150px" }}
@@ -153,16 +155,16 @@ const CardDetailsInput = ({
153
155
 
154
156
  <RenderInput
155
157
  name="cardcvc2"
156
- label="CVC/CVV *"
158
+ label={t("card.cvc", "CVC/CVV *")}
157
159
  value={cardcvc2 || ""}
158
160
  onChange={(e) => setCardcvc2(e.target.value)}
159
161
  inputType="textInput"
160
- placeholder="123 or 1234"
162
+ placeholder={t("card.cvcPlaceholder", "123 or 1234")}
161
163
  required
162
164
  tooltipContent={
163
165
  cardtype === "A"
164
- ? "4 digits for AMEX"
165
- : "3 digits for other cards"
166
+ ? t("card.cvcAmex", "4 digits for AMEX")
167
+ : t("card.cvcOther", "3 digits for other cards")
166
168
  }
167
169
  type="text"
168
170
  maxLength={4}
@@ -176,14 +178,13 @@ const CardDetailsInput = ({
176
178
  textColor="neutral600"
177
179
  style={{ textAlign: "left" }}
178
180
  >
179
- For all test card numbers (positive, negative, frictionless 3DS), 3D
180
- Secure test data, and detailed documentation, please refer to the{" "}
181
+ {t("card.3dsDocLink", "For all test card numbers (positive, negative, frictionless 3DS), 3D Secure test data, and detailed documentation, please refer to the")}{" "}
181
182
  <Link
182
183
  href="https://docs.payone.com/security-risk-management/3d-secure#/"
183
184
  target="_blank"
184
185
  rel="noopener noreferrer"
185
186
  >
186
- Payone 3D Secure Documentation
187
+ {t("card.3dsDocTitle", "Payone 3D Secure Documentation")}
187
188
  </Link>
188
189
  .
189
190
  </Typography>
@@ -7,12 +7,14 @@ import CaptureForm from "./CaptureForm";
7
7
  import RefundForm from "./RefundForm";
8
8
  import PaymentResult from "./PaymentResult";
9
9
  import ApplePayPanel from "./ApplePayPanel";
10
+ import { usePluginTranslations } from "../../../hooks/usePluginTranslations";
10
11
 
11
12
  const PaymentActionsPanel = ({
12
13
  onNavigateToConfig,
13
14
  settings,
14
15
  paymentActions,
15
16
  }) => {
17
+ const { t } = usePluginTranslations();
16
18
  const mode = (settings?.settings?.mode || "test").toLowerCase();
17
19
  const isLiveMode = mode === "live";
18
20
 
@@ -39,10 +41,10 @@ const PaymentActionsPanel = ({
39
41
  }}
40
42
  >
41
43
  <Typography variant="pi" textColor="neutral600">
42
- Test Payments are only works in test mode.
44
+ {t("paymentActions.testModeOnly", "Test Payments are only works in test mode.")}
43
45
  </Typography>
44
46
  <Typography variant="pi" textColor="neutral600">
45
- Please switch to test mode in plugin settings to use test payments.
47
+ {t("paymentActions.switchToTestMode", "Please switch to test mode in plugin settings to use test payments.")}
46
48
  </Typography>
47
49
  </Box>
48
50
  );
@@ -76,22 +78,11 @@ const PaymentActionsPanel = ({
76
78
  gap: "8px",
77
79
  }}
78
80
  >
79
- <Typography
80
- variant="beta"
81
- as="h2"
82
- className="payment-title"
83
- style={{ fontSize: "20px", marginBottom: "4px" }}
84
- >
85
- Payment Actions
81
+ <Typography variant="beta" as="h2" className="payment-title" style={{ fontSize: "20px", marginBottom: "4px" }}>
82
+ {t("paymentActions.title", "Payment Actions")}
86
83
  </Typography>
87
- <Typography
88
- variant="pi"
89
- textColor="neutral600"
90
- className="payment-subtitle"
91
- style={{ fontSize: "14px" }}
92
- >
93
- Process payments, captures, and refunds with multiple payment
94
- methods
84
+ <Typography variant="pi" textColor="neutral600" className="payment-subtitle" style={{ fontSize: "14px" }}>
85
+ {t("paymentActions.subtitle", "Perform preauthorization, capture, refund and other payment operations.")}
95
86
  </Typography>
96
87
  </Box>
97
88
 
@@ -105,7 +96,7 @@ const PaymentActionsPanel = ({
105
96
  {/* Preauthorization */}
106
97
  <Accordion.Item value="preauthorization">
107
98
  <Accordion.Header>
108
- <Accordion.Trigger>Preauthorization</Accordion.Trigger>
99
+ <Accordion.Trigger>{t("preauth.title", "Preauthorization")}</Accordion.Trigger>
109
100
  </Accordion.Header>
110
101
  <Accordion.Content>
111
102
  <Box
@@ -125,7 +116,7 @@ const PaymentActionsPanel = ({
125
116
  {/* Authorization */}
126
117
  <Accordion.Item value="authorization">
127
118
  <Accordion.Header>
128
- <Accordion.Trigger>Authorization</Accordion.Trigger>
119
+ <Accordion.Trigger>{t("auth.title", "Authorization")}</Accordion.Trigger>
129
120
  </Accordion.Header>
130
121
  <Accordion.Content>
131
122
  <Box className="payment-form-section">
@@ -139,7 +130,7 @@ const PaymentActionsPanel = ({
139
130
  {/* Capture */}
140
131
  <Accordion.Item value="capture">
141
132
  <Accordion.Header>
142
- <Accordion.Trigger>Capture</Accordion.Trigger>
133
+ <Accordion.Trigger>{t("capture.title", "Capture")}</Accordion.Trigger>
143
134
  </Accordion.Header>
144
135
  <Accordion.Content>
145
136
  <Box
@@ -156,7 +147,7 @@ const PaymentActionsPanel = ({
156
147
  {/* Refund */}
157
148
  <Accordion.Item value="refund">
158
149
  <Accordion.Header>
159
- <Accordion.Trigger>Refund</Accordion.Trigger>
150
+ <Accordion.Trigger>{t("refund.title", "Refund")}</Accordion.Trigger>
160
151
  </Accordion.Header>
161
152
  <Accordion.Content>
162
153
  <Box
@@ -181,9 +172,7 @@ const PaymentActionsPanel = ({
181
172
 
182
173
  <Box paddingTop={4}>
183
174
  <Typography variant="sigma" textColor="neutral600">
184
- Note: These payment actions allow you to test the complete payment
185
- flow: Preauthorization → Capture → Refund. Make sure to use valid
186
- Transaction IDs for capture and refund operations.
175
+ {t("paymentActions.note", "Note: These payment actions allow you to test the complete payment flow: Preauthorization → Capture → Refund. Make sure to use valid Transaction IDs for capture and refund operations.")}
187
176
  </Typography>
188
177
  </Box>
189
178
  </Flex>
@@ -1,25 +1,27 @@
1
- import * as React from "@strapi/strapi/admin";
1
+ import * as React from "react";
2
2
  import { Box, Flex, Typography, Link, Alert } from "@strapi/design-system";
3
3
  import pluginId from "../../../../pluginId";
4
4
  import {
5
5
  getPaymentMethodOptions,
6
+ getPaymentMethodDisplayName,
6
7
  supportsCaptureMode,
7
8
  getCaptureModeOptions,
8
- getPaymentMethodDisplayName,
9
9
  } from "../../../utils/paymentUtils";
10
10
  import RenderInput from "../RenderInput";
11
+ import { usePluginTranslations } from "../../../hooks/usePluginTranslations";
11
12
 
12
13
  const PaymentMethodSelector = ({
13
14
  paymentActions,
14
15
  onNavigateToConfig,
15
16
  isLiveMode,
16
17
  }) => {
18
+ const { t } = usePluginTranslations();
17
19
  return (
18
20
  <Box>
19
21
  <Flex direction="column" alignItems="stretch" gap={4}>
20
22
  <RenderInput
21
23
  name="paymentMethod"
22
- label="Select Payment Method"
24
+ label={t("paymentMethodSelector.label", "Select Payment Method")}
23
25
  value={paymentActions.paymentState.paymentMethod || ""}
24
26
  onChange={(e) => {
25
27
  const value = e.target?.value || e;
@@ -30,9 +32,9 @@ const PaymentMethodSelector = ({
30
32
  value: option.value,
31
33
  label: option.label,
32
34
  }))}
33
- placeholder="Select payment method"
34
- hint={`Current: ${getPaymentMethodDisplayName(paymentActions.paymentState.paymentMethod)}`}
35
- tooltipContent="Select the payment method you want to use for this transaction"
35
+ placeholder={t("paymentMethodSelector.placeholder", "Select payment method")}
36
+ hint={`${t("paymentMethodSelector.hintCurrent", "Current")}: ${getPaymentMethodDisplayName(paymentActions.paymentState.paymentMethod)}`}
37
+ tooltipContent={t("paymentMethodSelector.tooltip", "Select the payment method you want to use for this transaction")}
36
38
  />
37
39
  {paymentActions.paymentState.paymentMethod === "apl" &&
38
40
  onNavigateToConfig && (
@@ -1,19 +1,19 @@
1
- import * as React from "@strapi/strapi/admin";
1
+ import * as React from "react";
2
2
  import { Card, CardBody, Flex, Typography, Alert } from "@strapi/design-system";
3
3
  import StatusBadge from "../StatusBadge";
4
4
  import { formatTransactionData } from "../../../utils/formatTransactionData";
5
+ import { usePluginTranslations } from "../../../hooks/usePluginTranslations";
5
6
 
6
7
  const PaymentResult = ({ paymentError, paymentResult }) => {
8
+ const { t } = usePluginTranslations();
7
9
  if (!paymentError && !paymentResult) {
8
10
  return null;
9
11
  }
10
- console.log(paymentResult);
11
- console.log(paymentError);
12
12
 
13
13
  return (
14
14
  <>
15
15
  {paymentError && (
16
- <Alert variant="danger" title="Error" className="payment-alert">
16
+ <Alert variant="danger" title={t("paymentResult.errorTitle", "Error")} className="payment-alert">
17
17
  {paymentError}
18
18
  </Alert>
19
19
  )}
@@ -23,12 +23,8 @@ const PaymentResult = ({ paymentError, paymentResult }) => {
23
23
  <CardBody>
24
24
  <Flex direction="column" gap={4} alignItems={"stretch"}>
25
25
  <Flex direction={"row"} alignItems={"center"} gap={2}>
26
- <Typography
27
- variant="delta"
28
- as="h3"
29
- className="payment-section-title"
30
- >
31
- Payment Result
26
+ <Typography variant="delta" as="h3" className="payment-section-title">
27
+ {t("paymentResult.title", "Payment Result")}
32
28
  </Typography>
33
29
  {paymentResult?.Status && (
34
30
  <StatusBadge status={paymentResult.Status} />
@@ -10,8 +10,10 @@ import {
10
10
  getCurrencyOptions,
11
11
  getCountryOptions,
12
12
  } from "../../../utils/countryLanguageUtils";
13
+ import { usePluginTranslations } from "../../../hooks/usePluginTranslations";
13
14
 
14
15
  const PreauthorizationForm = ({ paymentActions, settings }) => {
16
+ const { t } = usePluginTranslations();
15
17
  const handleGooglePayToken = (token) => {
16
18
  if (!token) {
17
19
  return;
@@ -39,20 +41,11 @@ const PreauthorizationForm = ({ paymentActions, settings }) => {
39
41
  return (
40
42
  <Flex direction="column" alignItems="stretch" gap={4}>
41
43
  <Flex direction="row" gap={2}>
42
- <Typography
43
- variant="omega"
44
- fontWeight="semiBold"
45
- textColor="neutral800"
46
- className="payment-form-title"
47
- >
48
- Preauthorization
44
+ <Typography variant="omega" fontWeight="semiBold" textColor="neutral800" className="payment-form-title">
45
+ {t("preauth.title", "Preauthorization")}
49
46
  </Typography>
50
- <Typography
51
- variant="pi"
52
- textColor="neutral600"
53
- className="payment-form-description"
54
- >
55
- Reserve an amount on a credit card without capturing it immediately.
47
+ <Typography variant="pi" textColor="neutral600" className="payment-form-description">
48
+ {t("preauth.description", "Reserve an amount on a credit card without capturing it immediately.")}
56
49
  </Typography>
57
50
  </Flex>
58
51
 
@@ -65,20 +58,20 @@ const PreauthorizationForm = ({ paymentActions, settings }) => {
65
58
  >
66
59
  <RenderInput
67
60
  name="paymentAmount"
68
- label="Amount *"
61
+ label={t("preauth.amount", "Amount *")}
69
62
  value={paymentActions.paymentState.paymentAmount || ""}
70
63
  onChange={(e) =>
71
64
  paymentActions.handleFieldChange("paymentAmount", e.target.value)
72
65
  }
73
66
  inputType="textInput"
74
- placeholder="Enter amount (e.g., 1000 for €10.00)"
67
+ placeholder={t("preauth.amountPlaceholder", "Enter amount (e.g., 1000 for €10.00)")}
75
68
  required
76
- tooltipContent="Amount in cents (e.g., 1000 = €10.00)"
69
+ tooltipContent={t("preauth.amountTooltip", "Amount in cents (e.g., 1000 = €10.00)")}
77
70
  />
78
71
 
79
72
  <RenderInput
80
73
  name="firstname"
81
- label="First Name"
74
+ label={t("preauth.firstName", "First Name")}
82
75
  value={paymentActions.paymentState.firstname || ""}
83
76
  onChange={(e) =>
84
77
  paymentActions.handleFieldChange("firstname", e.target.value)
@@ -90,7 +83,7 @@ const PreauthorizationForm = ({ paymentActions, settings }) => {
90
83
 
91
84
  <RenderInput
92
85
  name="lastname"
93
- label="Last Name"
86
+ label={t("preauth.lastName", "Last Name")}
94
87
  value={paymentActions.paymentState.lastname || ""}
95
88
  onChange={(e) =>
96
89
  paymentActions.handleFieldChange("lastname", e.target.value)
@@ -270,7 +263,7 @@ const PreauthorizationForm = ({ paymentActions, settings }) => {
270
263
  paymentActions.isLiveMode
271
264
  }
272
265
  >
273
- Process Preauthorization
266
+ {t("preauth.submit", "Preauthorize")}
274
267
  </Button>
275
268
  )}
276
269
  </Flex>
@@ -3,26 +3,19 @@ import { Box, Flex, Typography, Button } from "@strapi/design-system";
3
3
  import { Play } from "@strapi/icons";
4
4
  import RenderInput from "../RenderInput";
5
5
  import { getCurrencyOptions } from "../../../utils/countryLanguageUtils";
6
+ import { usePluginTranslations } from "../../../hooks/usePluginTranslations";
6
7
 
7
8
  const RefundForm = ({ paymentActions }) => {
9
+ const { t } = usePluginTranslations();
8
10
  const currencyOptions = getCurrencyOptions();
9
11
  return (
10
12
  <Flex direction="column" alignItems="stretch" gap={4}>
11
13
  <Flex direction="row" gap={2}>
12
- <Typography
13
- variant="omega"
14
- fontWeight="semiBold"
15
- textColor="neutral800"
16
- className="payment-form-title"
17
- >
18
- Refund
14
+ <Typography variant="omega" fontWeight="semiBold" textColor="neutral800" className="payment-form-title">
15
+ {t("refund.title", "Refund")}
19
16
  </Typography>
20
- <Typography
21
- variant="pi"
22
- textColor="neutral600"
23
- className="payment-form-description"
24
- >
25
- Refund a previously captured amount.
17
+ <Typography variant="pi" textColor="neutral600" className="payment-form-description">
18
+ {t("refund.description", "Refund a captured payment.")}
26
19
  </Typography>
27
20
  </Flex>
28
21
 
@@ -35,20 +28,20 @@ const RefundForm = ({ paymentActions }) => {
35
28
  >
36
29
  <RenderInput
37
30
  name="refundTxid"
38
- label="Transaction ID *"
31
+ label={t("common.transactionId", "Transaction ID *")}
39
32
  value={paymentActions.paymentState.refundTxid || ""}
40
33
  onChange={(e) =>
41
34
  paymentActions.handleFieldChange("refundTxid", e.target.value)
42
35
  }
43
36
  inputType="textInput"
44
- placeholder="Enter TxId from capture"
37
+ placeholder={t("refund.placeholderTxid", "Enter TxId from capture")}
45
38
  required
46
- tooltipContent="Transaction ID from a previous capture"
39
+ tooltipContent={t("refund.tooltipTxid", "Transaction ID from a previous capture")}
47
40
  />
48
41
 
49
42
  <RenderInput
50
43
  name="refundSequenceNumber"
51
- label="Sequence Number"
44
+ label={t("refund.sequenceNumber", "Sequence Number")}
52
45
  value={paymentActions.paymentState.refundSequenceNumber || "2"}
53
46
  onChange={(e) =>
54
47
  paymentActions.handleFieldChange(
@@ -58,12 +51,12 @@ const RefundForm = ({ paymentActions }) => {
58
51
  }
59
52
  inputType="textInput"
60
53
  placeholder="2"
61
- tooltipContent="Sequence number for this refund (1-127), default is 2 for first refund"
54
+ tooltipContent={t("refund.tooltipSequence", "Sequence number for this refund (1-127), default is 2 for first refund")}
62
55
  />
63
56
 
64
57
  <RenderInput
65
58
  name="refundAmount"
66
- label="Amount *"
59
+ label={t("common.amount", "Amount *")}
67
60
  value={paymentActions.paymentState.paymentAmount || ""}
68
61
  onChange={(e) =>
69
62
  paymentActions.handleFieldChange("paymentAmount", e.target.value)
@@ -71,12 +64,12 @@ const RefundForm = ({ paymentActions }) => {
71
64
  inputType="textInput"
72
65
  placeholder="1000"
73
66
  required
74
- tooltipContent="Amount in cents to refund (will be negative automatically)"
67
+ tooltipContent={t("refund.tooltipAmount", "Amount in cents to refund (will be negative automatically)")}
75
68
  />
76
69
 
77
70
  <RenderInput
78
71
  name="refundCurrency"
79
- label="Currency"
72
+ label={t("common.currency", "Currency")}
80
73
  value={paymentActions.paymentState.refundCurrency || "EUR"}
81
74
  onChange={(e) =>
82
75
  paymentActions.handleFieldChange("refundCurrency", e.target.value)
@@ -112,7 +105,7 @@ const RefundForm = ({ paymentActions }) => {
112
105
  !paymentActions.paymentState.paymentAmount.trim()
113
106
  }
114
107
  >
115
- Process Refund
108
+ {t("refund.submit", "Refund")}
116
109
  </Button>
117
110
  </Flex>
118
111
  );