strapi-plugin-payone-provider 5.7.26 → 5.8.26

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 (83) hide show
  1. package/README.md +1191 -1191
  2. package/admin/src/components/Initializer/index.jsx +16 -16
  3. package/admin/src/components/PluginIcon/index.jsx +17 -17
  4. package/admin/src/index.js +57 -57
  5. package/admin/src/pages/App/components/AppHeader.jsx +45 -45
  6. package/admin/src/pages/App/components/AppTabs.jsx +105 -105
  7. package/admin/src/pages/App/components/ApplePayBtn.jsx +355 -355
  8. package/admin/src/pages/App/components/ApplePayConfig.jsx +357 -357
  9. package/admin/src/pages/App/components/DocsPanel.jsx +53 -53
  10. package/admin/src/pages/App/components/RenderInput.jsx +78 -78
  11. package/admin/src/pages/App/components/StatusBadge.jsx +87 -87
  12. package/admin/src/pages/App/components/icons/BankIcon.jsx +10 -10
  13. package/admin/src/pages/App/components/icons/ChevronDownIcon.jsx +9 -9
  14. package/admin/src/pages/App/components/icons/ChevronUpIcon.jsx +9 -9
  15. package/admin/src/pages/App/components/icons/CreditCardIcon.jsx +9 -9
  16. package/admin/src/pages/App/components/icons/ErrorIcon.jsx +10 -10
  17. package/admin/src/pages/App/components/icons/InfoIcon.jsx +9 -9
  18. package/admin/src/pages/App/components/icons/MarkCircle.jsx +19 -19
  19. package/admin/src/pages/App/components/icons/PaymentIcon.jsx +10 -10
  20. package/admin/src/pages/App/components/icons/PendingIcon.jsx +9 -9
  21. package/admin/src/pages/App/components/icons/PersonIcon.jsx +9 -9
  22. package/admin/src/pages/App/components/icons/SuccessIcon.jsx +9 -9
  23. package/admin/src/pages/App/components/icons/WalletIcon.jsx +9 -9
  24. package/admin/src/pages/App/components/icons/index.jsx +12 -12
  25. package/admin/src/pages/App/components/payment-actions/AuthorizationForm.jsx +334 -334
  26. package/admin/src/pages/App/components/payment-actions/CaptureForm.jsx +120 -120
  27. package/admin/src/pages/App/components/payment-actions/PaymentActionsPanel.jsx +183 -183
  28. package/admin/src/pages/App/components/payment-actions/PaymentMethodSelector.jsx +315 -315
  29. package/admin/src/pages/App/components/payment-actions/PaymentResult.jsx +129 -129
  30. package/admin/src/pages/App/components/payment-actions/PreauthorizationForm.jsx +273 -273
  31. package/admin/src/pages/App/components/payment-actions/RefundForm.jsx +114 -114
  32. package/admin/src/pages/App/components/transaction-history/ImportExportBar.jsx +153 -153
  33. package/admin/src/pages/App/components/transaction-history/details/TransactionHistoryItem.jsx +526 -526
  34. package/admin/src/pages/App/index.jsx +96 -96
  35. package/admin/src/pages/App/styles.css +176 -176
  36. package/admin/src/pages/constants/paymentConstants.js +71 -71
  37. package/admin/src/pages/hooks/use-system-theme.js +27 -27
  38. package/admin/src/pages/hooks/usePaymentActions.js +498 -498
  39. package/admin/src/pages/hooks/usePluginTranslations.js +12 -12
  40. package/admin/src/pages/hooks/useSettings.js +183 -183
  41. package/admin/src/pages/hooks/useTransactionHistory.js +148 -148
  42. package/admin/src/pages/utils/api.js +97 -97
  43. package/admin/src/pages/utils/applePayConstants.js +196 -196
  44. package/admin/src/pages/utils/formatTransactionData.js +15 -15
  45. package/admin/src/pages/utils/getInputComponent.jsx +200 -200
  46. package/admin/src/pages/utils/paymentUtils.js +661 -661
  47. package/admin/src/pages/utils/tooltipHelpers.js +18 -18
  48. package/admin/src/pages/utils/transactionTableUtils.js +71 -71
  49. package/admin/src/pluginId.js +9 -9
  50. package/admin/src/translations/de.json +235 -235
  51. package/admin/src/translations/en.json +235 -235
  52. package/admin/src/translations/fr.json +235 -235
  53. package/admin/src/translations/ru.json +235 -235
  54. package/admin/src/utils/prefixPluginTranslations.js +13 -13
  55. package/package.json +45 -45
  56. package/server/bootstrap.js +107 -107
  57. package/server/config/index.js +83 -83
  58. package/server/content-types/index.js +4 -4
  59. package/server/content-types/transactions/index.js +4 -4
  60. package/server/content-types/transactions/schema.json +86 -86
  61. package/server/controllers/index.js +7 -7
  62. package/server/controllers/payone.js +503 -506
  63. package/server/destroy.js +5 -5
  64. package/server/index.js +23 -23
  65. package/server/policies/index.js +7 -7
  66. package/server/policies/is-auth.js +29 -29
  67. package/server/policies/isSuperAdmin.js +20 -20
  68. package/server/register.js +5 -5
  69. package/server/routes/index.js +218 -218
  70. package/server/services/applePayService.js +295 -295
  71. package/server/services/index.js +9 -9
  72. package/server/services/paymentService.js +264 -223
  73. package/server/services/payone.js +78 -78
  74. package/server/services/settingsService.js +59 -59
  75. package/server/services/testConnectionService.js +115 -115
  76. package/server/services/transactionService.js +262 -262
  77. package/server/utils/csvTransactions.js +82 -82
  78. package/server/utils/normalize.js +39 -39
  79. package/server/utils/paymentMethodParams.js +288 -288
  80. package/server/utils/requestBuilder.js +115 -100
  81. package/server/utils/responseParser.js +141 -141
  82. package/strapi-admin.js +4 -4
  83. package/strapi-server.js +3 -3
@@ -1,273 +1,273 @@
1
- import * as React from "react";
2
- import { Box, Flex, Typography, Button } from "@strapi/design-system";
3
- import { Play } from "@strapi/icons";
4
- import GooglePayButton from "../GooglePaybutton";
5
- import CardDetailsInput from "./CardDetailsInput";
6
- import RenderInput from "../RenderInput";
7
- import {
8
- getSalutationOptions,
9
- getGenderOptions,
10
- getCurrencyOptions,
11
- getCountryOptions,
12
- } from "../../../utils/countryLanguageUtils";
13
- import { usePluginTranslations } from "../../../hooks/usePluginTranslations";
14
-
15
- const PreauthorizationForm = ({ paymentActions, settings }) => {
16
- const { t } = usePluginTranslations();
17
- const handleGooglePayToken = (token) => {
18
- if (!token) {
19
- return;
20
- }
21
- paymentActions.handleFieldChange("googlePayToken", token);
22
- paymentActions.handlePreauthorization(token);
23
- };
24
-
25
- const handleGooglePayError = (error) => {
26
- console.error("Google Pay error:", error);
27
- };
28
-
29
- const countryOptions = getCountryOptions(
30
- paymentActions.paymentState.paymentMethod
31
- );
32
-
33
- const salutationOptions = getSalutationOptions(
34
- paymentActions.paymentState.country || "US"
35
- );
36
- const genderOptions = getGenderOptions(
37
- paymentActions.paymentState.country || "US"
38
- );
39
- const currencyOptions = getCurrencyOptions();
40
-
41
- return (
42
- <Flex direction="column" alignItems="stretch" gap={4}>
43
- <Flex direction="row" gap={2}>
44
- <Typography variant="omega" fontWeight="semiBold" textColor="neutral800" className="payment-form-title">
45
- {t("preauth.title", "Preauthorization")}
46
- </Typography>
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.")}
49
- </Typography>
50
- </Flex>
51
-
52
- <Box
53
- style={{
54
- display: "grid",
55
- gridTemplateColumns: "repeat(auto-fit, minmax(250px, 1fr))",
56
- gap: "16px",
57
- }}
58
- >
59
- <RenderInput
60
- name="paymentAmount"
61
- label={t("preauth.amount", "Amount *")}
62
- value={paymentActions.paymentState.paymentAmount || ""}
63
- onChange={(e) =>
64
- paymentActions.handleFieldChange("paymentAmount", e.target.value)
65
- }
66
- inputType="textInput"
67
- placeholder={t("preauth.amountPlaceholder", "Enter amount (e.g., 1000 for €10.00)")}
68
- required
69
- tooltipContent={t("preauth.amountTooltip", "Amount in cents (e.g., 1000 = €10.00)")}
70
- />
71
-
72
- <RenderInput
73
- name="firstname"
74
- label={t("preauth.firstName", "First Name")}
75
- value={paymentActions.paymentState.firstname || ""}
76
- onChange={(e) =>
77
- paymentActions.handleFieldChange("firstname", e.target.value)
78
- }
79
- inputType="textInput"
80
- placeholder="John"
81
- tooltipContent="Customer first name"
82
- />
83
-
84
- <RenderInput
85
- name="lastname"
86
- label={t("preauth.lastName", "Last Name")}
87
- value={paymentActions.paymentState.lastname || ""}
88
- onChange={(e) =>
89
- paymentActions.handleFieldChange("lastname", e.target.value)
90
- }
91
- inputType="textInput"
92
- placeholder="Doe"
93
- tooltipContent="Customer last name"
94
- />
95
-
96
- <RenderInput
97
- name="email"
98
- label="Email"
99
- value={paymentActions.paymentState.email || ""}
100
- onChange={(e) =>
101
- paymentActions.handleFieldChange("email", e.target.value)
102
- }
103
- inputType="textInput"
104
- placeholder="john.doe@example.com"
105
- tooltipContent="Customer email address"
106
- />
107
-
108
- <RenderInput
109
- name="telephonenumber"
110
- label="Phone Number"
111
- value={paymentActions.paymentState.telephonenumber || ""}
112
- onChange={(e) =>
113
- paymentActions.handleFieldChange("telephonenumber", e.target.value)
114
- }
115
- inputType="textInput"
116
- placeholder="+4917512345678"
117
- tooltipContent="Customer phone number"
118
- />
119
-
120
- <RenderInput
121
- name="gender"
122
- label="Gender"
123
- value={paymentActions.paymentState.gender || ""}
124
- onChange={(e) =>
125
- paymentActions.handleFieldChange("gender", e.target.value)
126
- }
127
- inputType="select"
128
- options={genderOptions}
129
- placeholder="Select gender"
130
- tooltipContent="Customer gender"
131
- />
132
-
133
- <RenderInput
134
- name="salutation"
135
- label="Salutation"
136
- value={paymentActions.paymentState.salutation || ""}
137
- onChange={(e) =>
138
- paymentActions.handleFieldChange("salutation", e.target.value)
139
- }
140
- inputType="select"
141
- options={salutationOptions}
142
- placeholder="Select salutation"
143
- tooltipContent="Customer salutation"
144
- />
145
-
146
- <RenderInput
147
- name="country"
148
- label="Country"
149
- value={paymentActions.paymentState.country || ""}
150
- onChange={(e) =>
151
- paymentActions.handleFieldChange("country", e.target.value)
152
- }
153
- inputType="select"
154
- options={countryOptions}
155
- placeholder="Select country"
156
- tooltipContent="Billing address country"
157
- />
158
-
159
- <RenderInput
160
- name="currency"
161
- label="Currency"
162
- value={paymentActions.paymentState.currency || "EUR"}
163
- onChange={(e) =>
164
- paymentActions.handleFieldChange("currency", e.target.value)
165
- }
166
- inputType="select"
167
- options={currencyOptions}
168
- placeholder="Select currency"
169
- tooltipContent="Currency code"
170
- />
171
-
172
- <RenderInput
173
- name="city"
174
- label="City"
175
- value={paymentActions.paymentState.city || ""}
176
- onChange={(e) =>
177
- paymentActions.handleFieldChange("city", e.target.value)
178
- }
179
- inputType="textInput"
180
- placeholder="Berlin"
181
- tooltipContent="Billing address city"
182
- />
183
-
184
- <RenderInput
185
- name="street"
186
- label="Street"
187
- value={paymentActions.paymentState.street || ""}
188
- onChange={(e) =>
189
- paymentActions.handleFieldChange("street", e.target.value)
190
- }
191
- inputType="textInput"
192
- placeholder="Main Street 123"
193
- tooltipContent="Billing address street"
194
- />
195
-
196
- <RenderInput
197
- name="zip"
198
- label="ZIP Code"
199
- value={paymentActions.paymentState.zip || ""}
200
- onChange={(e) =>
201
- paymentActions.handleFieldChange("zip", e.target.value)
202
- }
203
- inputType="textInput"
204
- placeholder="12345"
205
- tooltipContent="Billing address ZIP code"
206
- />
207
- </Box>
208
-
209
- {paymentActions.paymentState.paymentMethod === "cc" &&
210
- settings?.settings?.enable3DSecure && (
211
- <Box marginTop={4}>
212
- <CardDetailsInput
213
- cardtype={paymentActions.paymentState.cardtype}
214
- setCardtype={(value) =>
215
- paymentActions.handleFieldChange("cardtype", value)
216
- }
217
- cardpan={paymentActions.paymentState.cardpan}
218
- setCardpan={(value) =>
219
- paymentActions.handleFieldChange("cardpan", value)
220
- }
221
- cardexpiredate={paymentActions.paymentState.cardexpiredate}
222
- setCardexpiredate={(value) =>
223
- paymentActions.handleFieldChange("cardexpiredate", value)
224
- }
225
- cardcvc2={paymentActions.paymentState.cardcvc2}
226
- setCardcvc2={(value) =>
227
- paymentActions.handleFieldChange("cardcvc2", value)
228
- }
229
- />
230
- </Box>
231
- )}
232
-
233
- {paymentActions.paymentState.paymentMethod === "gpp" ? (
234
- <GooglePayButton
235
- amount={paymentActions.paymentState.paymentAmount}
236
- currency="EUR"
237
- onTokenReceived={handleGooglePayToken}
238
- onError={handleGooglePayError}
239
- settings={settings?.settings}
240
- />
241
- ) : paymentActions.paymentState.paymentMethod === "apl" ? (
242
- <Box>
243
- <Typography variant="pi" textColor="neutral600">
244
- Apple Pay is only supported for Authorization, not Preauthorization.
245
- </Typography>
246
- </Box>
247
- ) : (
248
- <Button
249
- variant="default"
250
- onClick={() => paymentActions.handlePreauthorization()}
251
- loading={paymentActions.isProcessingPayment}
252
- startIcon={<Play />}
253
- style={{ maxWidth: "200px" }}
254
- className="payment-button payment-button-primary"
255
- disabled={
256
- !paymentActions.paymentState.paymentAmount.trim() ||
257
- (paymentActions.paymentState.paymentMethod === "cc" &&
258
- settings?.settings?.enable3DSecure !== false &&
259
- (!paymentActions.paymentState.cardtype ||
260
- !paymentActions.paymentState.cardpan ||
261
- !paymentActions.paymentState.cardexpiredate ||
262
- !paymentActions.paymentState.cardcvc2)) ||
263
- paymentActions.isLiveMode
264
- }
265
- >
266
- {t("preauth.submit", "Preauthorize")}
267
- </Button>
268
- )}
269
- </Flex>
270
- );
271
- };
272
-
273
- export default PreauthorizationForm;
1
+ import * as React from "react";
2
+ import { Box, Flex, Typography, Button } from "@strapi/design-system";
3
+ import { Play } from "@strapi/icons";
4
+ import GooglePayButton from "../GooglePaybutton";
5
+ import CardDetailsInput from "./CardDetailsInput";
6
+ import RenderInput from "../RenderInput";
7
+ import {
8
+ getSalutationOptions,
9
+ getGenderOptions,
10
+ getCurrencyOptions,
11
+ getCountryOptions,
12
+ } from "../../../utils/countryLanguageUtils";
13
+ import { usePluginTranslations } from "../../../hooks/usePluginTranslations";
14
+
15
+ const PreauthorizationForm = ({ paymentActions, settings }) => {
16
+ const { t } = usePluginTranslations();
17
+ const handleGooglePayToken = (token) => {
18
+ if (!token) {
19
+ return;
20
+ }
21
+ paymentActions.handleFieldChange("googlePayToken", token);
22
+ paymentActions.handlePreauthorization(token);
23
+ };
24
+
25
+ const handleGooglePayError = (error) => {
26
+ console.error("Google Pay error:", error);
27
+ };
28
+
29
+ const countryOptions = getCountryOptions(
30
+ paymentActions.paymentState.paymentMethod
31
+ );
32
+
33
+ const salutationOptions = getSalutationOptions(
34
+ paymentActions.paymentState.country || "US"
35
+ );
36
+ const genderOptions = getGenderOptions(
37
+ paymentActions.paymentState.country || "US"
38
+ );
39
+ const currencyOptions = getCurrencyOptions();
40
+
41
+ return (
42
+ <Flex direction="column" alignItems="stretch" gap={4}>
43
+ <Flex direction="row" gap={2}>
44
+ <Typography variant="omega" fontWeight="semiBold" textColor="neutral800" className="payment-form-title">
45
+ {t("preauth.title", "Preauthorization")}
46
+ </Typography>
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.")}
49
+ </Typography>
50
+ </Flex>
51
+
52
+ <Box
53
+ style={{
54
+ display: "grid",
55
+ gridTemplateColumns: "repeat(auto-fit, minmax(250px, 1fr))",
56
+ gap: "16px",
57
+ }}
58
+ >
59
+ <RenderInput
60
+ name="paymentAmount"
61
+ label={t("preauth.amount", "Amount *")}
62
+ value={paymentActions.paymentState.paymentAmount || ""}
63
+ onChange={(e) =>
64
+ paymentActions.handleFieldChange("paymentAmount", e.target.value)
65
+ }
66
+ inputType="textInput"
67
+ placeholder={t("preauth.amountPlaceholder", "Enter amount (e.g., 1000 for €10.00)")}
68
+ required
69
+ tooltipContent={t("preauth.amountTooltip", "Amount in cents (e.g., 1000 = €10.00)")}
70
+ />
71
+
72
+ <RenderInput
73
+ name="firstname"
74
+ label={t("preauth.firstName", "First Name")}
75
+ value={paymentActions.paymentState.firstname || ""}
76
+ onChange={(e) =>
77
+ paymentActions.handleFieldChange("firstname", e.target.value)
78
+ }
79
+ inputType="textInput"
80
+ placeholder="John"
81
+ tooltipContent="Customer first name"
82
+ />
83
+
84
+ <RenderInput
85
+ name="lastname"
86
+ label={t("preauth.lastName", "Last Name")}
87
+ value={paymentActions.paymentState.lastname || ""}
88
+ onChange={(e) =>
89
+ paymentActions.handleFieldChange("lastname", e.target.value)
90
+ }
91
+ inputType="textInput"
92
+ placeholder="Doe"
93
+ tooltipContent="Customer last name"
94
+ />
95
+
96
+ <RenderInput
97
+ name="email"
98
+ label="Email"
99
+ value={paymentActions.paymentState.email || ""}
100
+ onChange={(e) =>
101
+ paymentActions.handleFieldChange("email", e.target.value)
102
+ }
103
+ inputType="textInput"
104
+ placeholder="john.doe@example.com"
105
+ tooltipContent="Customer email address"
106
+ />
107
+
108
+ <RenderInput
109
+ name="telephonenumber"
110
+ label="Phone Number"
111
+ value={paymentActions.paymentState.telephonenumber || ""}
112
+ onChange={(e) =>
113
+ paymentActions.handleFieldChange("telephonenumber", e.target.value)
114
+ }
115
+ inputType="textInput"
116
+ placeholder="+4917512345678"
117
+ tooltipContent="Customer phone number"
118
+ />
119
+
120
+ <RenderInput
121
+ name="gender"
122
+ label="Gender"
123
+ value={paymentActions.paymentState.gender || ""}
124
+ onChange={(e) =>
125
+ paymentActions.handleFieldChange("gender", e.target.value)
126
+ }
127
+ inputType="select"
128
+ options={genderOptions}
129
+ placeholder="Select gender"
130
+ tooltipContent="Customer gender"
131
+ />
132
+
133
+ <RenderInput
134
+ name="salutation"
135
+ label="Salutation"
136
+ value={paymentActions.paymentState.salutation || ""}
137
+ onChange={(e) =>
138
+ paymentActions.handleFieldChange("salutation", e.target.value)
139
+ }
140
+ inputType="select"
141
+ options={salutationOptions}
142
+ placeholder="Select salutation"
143
+ tooltipContent="Customer salutation"
144
+ />
145
+
146
+ <RenderInput
147
+ name="country"
148
+ label="Country"
149
+ value={paymentActions.paymentState.country || ""}
150
+ onChange={(e) =>
151
+ paymentActions.handleFieldChange("country", e.target.value)
152
+ }
153
+ inputType="select"
154
+ options={countryOptions}
155
+ placeholder="Select country"
156
+ tooltipContent="Billing address country"
157
+ />
158
+
159
+ <RenderInput
160
+ name="currency"
161
+ label="Currency"
162
+ value={paymentActions.paymentState.currency || "EUR"}
163
+ onChange={(e) =>
164
+ paymentActions.handleFieldChange("currency", e.target.value)
165
+ }
166
+ inputType="select"
167
+ options={currencyOptions}
168
+ placeholder="Select currency"
169
+ tooltipContent="Currency code"
170
+ />
171
+
172
+ <RenderInput
173
+ name="city"
174
+ label="City"
175
+ value={paymentActions.paymentState.city || ""}
176
+ onChange={(e) =>
177
+ paymentActions.handleFieldChange("city", e.target.value)
178
+ }
179
+ inputType="textInput"
180
+ placeholder="Berlin"
181
+ tooltipContent="Billing address city"
182
+ />
183
+
184
+ <RenderInput
185
+ name="street"
186
+ label="Street"
187
+ value={paymentActions.paymentState.street || ""}
188
+ onChange={(e) =>
189
+ paymentActions.handleFieldChange("street", e.target.value)
190
+ }
191
+ inputType="textInput"
192
+ placeholder="Main Street 123"
193
+ tooltipContent="Billing address street"
194
+ />
195
+
196
+ <RenderInput
197
+ name="zip"
198
+ label="ZIP Code"
199
+ value={paymentActions.paymentState.zip || ""}
200
+ onChange={(e) =>
201
+ paymentActions.handleFieldChange("zip", e.target.value)
202
+ }
203
+ inputType="textInput"
204
+ placeholder="12345"
205
+ tooltipContent="Billing address ZIP code"
206
+ />
207
+ </Box>
208
+
209
+ {paymentActions.paymentState.paymentMethod === "cc" &&
210
+ settings?.settings?.enable3DSecure && (
211
+ <Box marginTop={4}>
212
+ <CardDetailsInput
213
+ cardtype={paymentActions.paymentState.cardtype}
214
+ setCardtype={(value) =>
215
+ paymentActions.handleFieldChange("cardtype", value)
216
+ }
217
+ cardpan={paymentActions.paymentState.cardpan}
218
+ setCardpan={(value) =>
219
+ paymentActions.handleFieldChange("cardpan", value)
220
+ }
221
+ cardexpiredate={paymentActions.paymentState.cardexpiredate}
222
+ setCardexpiredate={(value) =>
223
+ paymentActions.handleFieldChange("cardexpiredate", value)
224
+ }
225
+ cardcvc2={paymentActions.paymentState.cardcvc2}
226
+ setCardcvc2={(value) =>
227
+ paymentActions.handleFieldChange("cardcvc2", value)
228
+ }
229
+ />
230
+ </Box>
231
+ )}
232
+
233
+ {paymentActions.paymentState.paymentMethod === "gpp" ? (
234
+ <GooglePayButton
235
+ amount={paymentActions.paymentState.paymentAmount}
236
+ currency="EUR"
237
+ onTokenReceived={handleGooglePayToken}
238
+ onError={handleGooglePayError}
239
+ settings={settings?.settings}
240
+ />
241
+ ) : paymentActions.paymentState.paymentMethod === "apl" ? (
242
+ <Box>
243
+ <Typography variant="pi" textColor="neutral600">
244
+ Apple Pay is only supported for Authorization, not Preauthorization.
245
+ </Typography>
246
+ </Box>
247
+ ) : (
248
+ <Button
249
+ variant="default"
250
+ onClick={() => paymentActions.handlePreauthorization()}
251
+ loading={paymentActions.isProcessingPayment}
252
+ startIcon={<Play />}
253
+ style={{ maxWidth: "200px" }}
254
+ className="payment-button payment-button-primary"
255
+ disabled={
256
+ !paymentActions.paymentState.paymentAmount.trim() ||
257
+ (paymentActions.paymentState.paymentMethod === "cc" &&
258
+ settings?.settings?.enable3DSecure !== false &&
259
+ (!paymentActions.paymentState.cardtype ||
260
+ !paymentActions.paymentState.cardpan ||
261
+ !paymentActions.paymentState.cardexpiredate ||
262
+ !paymentActions.paymentState.cardcvc2)) ||
263
+ paymentActions.isLiveMode
264
+ }
265
+ >
266
+ {t("preauth.submit", "Preauthorize")}
267
+ </Button>
268
+ )}
269
+ </Flex>
270
+ );
271
+ };
272
+
273
+ export default PreauthorizationForm;