strapi-plugin-payone-provider 5.7.24 → 5.7.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.
- package/README.md +1191 -1191
- package/admin/src/components/Initializer/index.jsx +16 -16
- package/admin/src/components/PluginIcon/index.jsx +17 -17
- package/admin/src/index.js +57 -57
- package/admin/src/pages/App/components/AppHeader.jsx +45 -45
- package/admin/src/pages/App/components/AppTabs.jsx +105 -105
- package/admin/src/pages/App/components/ApplePayBtn.jsx +355 -355
- package/admin/src/pages/App/components/ApplePayConfig.jsx +357 -357
- package/admin/src/pages/App/components/DocsPanel.jsx +53 -53
- package/admin/src/pages/App/components/RenderInput.jsx +78 -78
- package/admin/src/pages/App/components/StatusBadge.jsx +87 -87
- package/admin/src/pages/App/components/icons/BankIcon.jsx +10 -10
- package/admin/src/pages/App/components/icons/ChevronDownIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/ChevronUpIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/CreditCardIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/ErrorIcon.jsx +10 -10
- package/admin/src/pages/App/components/icons/InfoIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/MarkCircle.jsx +19 -19
- package/admin/src/pages/App/components/icons/PaymentIcon.jsx +10 -10
- package/admin/src/pages/App/components/icons/PendingIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/PersonIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/SuccessIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/WalletIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/index.jsx +12 -12
- package/admin/src/pages/App/components/payment-actions/AuthorizationForm.jsx +334 -334
- package/admin/src/pages/App/components/payment-actions/CaptureForm.jsx +120 -120
- package/admin/src/pages/App/components/payment-actions/PaymentActionsPanel.jsx +183 -183
- package/admin/src/pages/App/components/payment-actions/PaymentMethodSelector.jsx +315 -315
- package/admin/src/pages/App/components/payment-actions/PaymentResult.jsx +129 -129
- package/admin/src/pages/App/components/payment-actions/PreauthorizationForm.jsx +273 -273
- package/admin/src/pages/App/components/payment-actions/RefundForm.jsx +114 -114
- package/admin/src/pages/App/components/transaction-history/ImportExportBar.jsx +153 -153
- package/admin/src/pages/App/components/transaction-history/details/TransactionHistoryItem.jsx +526 -526
- package/admin/src/pages/App/index.jsx +96 -96
- package/admin/src/pages/App/styles.css +176 -176
- package/admin/src/pages/constants/paymentConstants.js +71 -71
- package/admin/src/pages/hooks/use-system-theme.js +27 -27
- package/admin/src/pages/hooks/usePaymentActions.js +498 -498
- package/admin/src/pages/hooks/usePluginTranslations.js +12 -12
- package/admin/src/pages/hooks/useSettings.js +183 -183
- package/admin/src/pages/hooks/useTransactionHistory.js +148 -148
- package/admin/src/pages/utils/api.js +97 -97
- package/admin/src/pages/utils/applePayConstants.js +196 -196
- package/admin/src/pages/utils/formatTransactionData.js +15 -15
- package/admin/src/pages/utils/getInputComponent.jsx +200 -200
- package/admin/src/pages/utils/paymentUtils.js +661 -661
- package/admin/src/pages/utils/tooltipHelpers.js +18 -18
- package/admin/src/pages/utils/transactionTableUtils.js +71 -71
- package/admin/src/pluginId.js +9 -9
- package/admin/src/translations/de.json +235 -235
- package/admin/src/translations/en.json +235 -235
- package/admin/src/translations/fr.json +235 -235
- package/admin/src/translations/ru.json +235 -235
- package/admin/src/utils/prefixPluginTranslations.js +13 -13
- package/package.json +45 -45
- package/server/bootstrap.js +107 -107
- package/server/config/index.js +83 -83
- package/server/content-types/index.js +4 -4
- package/server/content-types/transactions/index.js +4 -4
- package/server/content-types/transactions/schema.json +86 -86
- package/server/controllers/index.js +7 -7
- package/server/controllers/payone.js +506 -451
- package/server/destroy.js +5 -5
- package/server/index.js +23 -23
- package/server/policies/index.js +7 -7
- package/server/policies/is-auth.js +29 -29
- package/server/policies/isSuperAdmin.js +20 -20
- package/server/register.js +5 -5
- package/server/routes/index.js +218 -218
- package/server/services/applePayService.js +295 -295
- package/server/services/index.js +9 -9
- package/server/services/paymentService.js +223 -223
- package/server/services/payone.js +78 -78
- package/server/services/settingsService.js +59 -59
- package/server/services/testConnectionService.js +115 -115
- package/server/services/transactionService.js +262 -262
- package/server/utils/csvTransactions.js +82 -82
- package/server/utils/normalize.js +39 -39
- package/server/utils/paymentMethodParams.js +288 -288
- package/server/utils/requestBuilder.js +100 -100
- package/server/utils/responseParser.js +141 -141
- package/strapi-admin.js +4 -4
- package/strapi-server.js +3 -3
|
@@ -1,200 +1,200 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TextInput,
|
|
3
|
-
NumberInput,
|
|
4
|
-
SingleSelect,
|
|
5
|
-
SingleSelectOption,
|
|
6
|
-
Switch,
|
|
7
|
-
Tooltip,
|
|
8
|
-
Textarea,
|
|
9
|
-
Toggle,
|
|
10
|
-
Checkbox,
|
|
11
|
-
Typography
|
|
12
|
-
} from "@strapi/design-system";
|
|
13
|
-
import { Information } from "@strapi/icons";
|
|
14
|
-
|
|
15
|
-
const TooltipIcon = ({ tooltipContent }) => {
|
|
16
|
-
if (!tooltipContent) return null;
|
|
17
|
-
return (
|
|
18
|
-
<Tooltip label={tooltipContent ?? ""}>
|
|
19
|
-
<Information
|
|
20
|
-
style={{
|
|
21
|
-
cursor: "pointer"
|
|
22
|
-
}}
|
|
23
|
-
/>
|
|
24
|
-
</Tooltip>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const InputComponent = ({
|
|
29
|
-
inputType,
|
|
30
|
-
name,
|
|
31
|
-
value,
|
|
32
|
-
onChange,
|
|
33
|
-
tooltipContent,
|
|
34
|
-
options,
|
|
35
|
-
required = false,
|
|
36
|
-
placeholder = "",
|
|
37
|
-
onLabel = "True",
|
|
38
|
-
offLabel = "False",
|
|
39
|
-
className = "payment-input",
|
|
40
|
-
type = "text",
|
|
41
|
-
...props
|
|
42
|
-
}) => {
|
|
43
|
-
switch (inputType) {
|
|
44
|
-
case "textInput":
|
|
45
|
-
return (
|
|
46
|
-
<TextInput
|
|
47
|
-
className={className}
|
|
48
|
-
name={name}
|
|
49
|
-
value={value ?? ""}
|
|
50
|
-
id={name}
|
|
51
|
-
placeholder={placeholder}
|
|
52
|
-
required={required}
|
|
53
|
-
onChange={onChange}
|
|
54
|
-
type={type}
|
|
55
|
-
endAction={
|
|
56
|
-
tooltipContent ? (
|
|
57
|
-
<TooltipIcon tooltipContent={tooltipContent} />
|
|
58
|
-
) : null
|
|
59
|
-
}
|
|
60
|
-
{...props}
|
|
61
|
-
/>
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
case "numberInput":
|
|
65
|
-
return (
|
|
66
|
-
<NumberInput
|
|
67
|
-
className={className}
|
|
68
|
-
onValueChange={onChange}
|
|
69
|
-
value={value ?? ""}
|
|
70
|
-
id={name}
|
|
71
|
-
name={name}
|
|
72
|
-
placeholder={placeholder}
|
|
73
|
-
required={required}
|
|
74
|
-
startAction={
|
|
75
|
-
tooltipContent ? (
|
|
76
|
-
<TooltipIcon tooltipContent={tooltipContent} />
|
|
77
|
-
) : null
|
|
78
|
-
}
|
|
79
|
-
{...props}
|
|
80
|
-
/>
|
|
81
|
-
);
|
|
82
|
-
|
|
83
|
-
case "textarea":
|
|
84
|
-
return (
|
|
85
|
-
<Textarea
|
|
86
|
-
className={className}
|
|
87
|
-
name={name}
|
|
88
|
-
value={value ?? ""}
|
|
89
|
-
onChange={(e) => onChange(e.target.value)}
|
|
90
|
-
id={name}
|
|
91
|
-
placeholder={placeholder}
|
|
92
|
-
required={required}
|
|
93
|
-
cols={9}
|
|
94
|
-
rows={3}
|
|
95
|
-
{...props}
|
|
96
|
-
/>
|
|
97
|
-
);
|
|
98
|
-
|
|
99
|
-
case "toggle":
|
|
100
|
-
return (
|
|
101
|
-
<Toggle
|
|
102
|
-
className={className}
|
|
103
|
-
name={name}
|
|
104
|
-
checked={value === true}
|
|
105
|
-
onChange={onChange}
|
|
106
|
-
id={name}
|
|
107
|
-
required={required}
|
|
108
|
-
onLabel={onLabel}
|
|
109
|
-
offLabel={offLabel}
|
|
110
|
-
{...props}
|
|
111
|
-
/>
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
case "checkbox":
|
|
115
|
-
return (
|
|
116
|
-
<Checkbox
|
|
117
|
-
className={className}
|
|
118
|
-
name={name}
|
|
119
|
-
checked={value === true}
|
|
120
|
-
onCheckedChange={onChange}
|
|
121
|
-
id={name}
|
|
122
|
-
required={required}
|
|
123
|
-
{...props}
|
|
124
|
-
/>
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
case "dateInput":
|
|
128
|
-
return (
|
|
129
|
-
<TextInput
|
|
130
|
-
className={className}
|
|
131
|
-
name={name}
|
|
132
|
-
value={value ?? ""}
|
|
133
|
-
onChange={onChange}
|
|
134
|
-
placeholder={placeholder}
|
|
135
|
-
required={required}
|
|
136
|
-
type="date"
|
|
137
|
-
startAction={
|
|
138
|
-
tooltipContent ? (
|
|
139
|
-
<TooltipIcon tooltipContent={tooltipContent} />
|
|
140
|
-
) : null
|
|
141
|
-
}
|
|
142
|
-
{...props}
|
|
143
|
-
/>
|
|
144
|
-
);
|
|
145
|
-
|
|
146
|
-
case "switch":
|
|
147
|
-
return (
|
|
148
|
-
<Switch
|
|
149
|
-
className={className}
|
|
150
|
-
onCheckedChange={onChange}
|
|
151
|
-
checked={value === true}
|
|
152
|
-
{...props}
|
|
153
|
-
/>
|
|
154
|
-
);
|
|
155
|
-
|
|
156
|
-
case "select":
|
|
157
|
-
return (
|
|
158
|
-
<SingleSelect
|
|
159
|
-
className={className}
|
|
160
|
-
name={name}
|
|
161
|
-
value={value ?? ""}
|
|
162
|
-
onChange={(selectedValue) => {
|
|
163
|
-
if (typeof onChange === "function") {
|
|
164
|
-
const syntheticEvent = {
|
|
165
|
-
target: { value: selectedValue },
|
|
166
|
-
currentTarget: { value: selectedValue }
|
|
167
|
-
};
|
|
168
|
-
onChange(syntheticEvent);
|
|
169
|
-
}
|
|
170
|
-
}}
|
|
171
|
-
required={required}
|
|
172
|
-
placeholder={placeholder}
|
|
173
|
-
startIcon={
|
|
174
|
-
tooltipContent ? (
|
|
175
|
-
<TooltipIcon tooltipContent={tooltipContent} />
|
|
176
|
-
) : null
|
|
177
|
-
}
|
|
178
|
-
{...props}
|
|
179
|
-
>
|
|
180
|
-
{options.map((option) => (
|
|
181
|
-
<SingleSelectOption
|
|
182
|
-
className={className}
|
|
183
|
-
key={option.value}
|
|
184
|
-
value={option.value}
|
|
185
|
-
disabled={option.disabled || false}
|
|
186
|
-
>
|
|
187
|
-
{option.label}
|
|
188
|
-
</SingleSelectOption>
|
|
189
|
-
))}
|
|
190
|
-
</SingleSelect>
|
|
191
|
-
);
|
|
192
|
-
|
|
193
|
-
default:
|
|
194
|
-
return (
|
|
195
|
-
<Typography variant="omega" fontWeight="semiBold">
|
|
196
|
-
Invalid input type: {inputType}
|
|
197
|
-
</Typography>
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
TextInput,
|
|
3
|
+
NumberInput,
|
|
4
|
+
SingleSelect,
|
|
5
|
+
SingleSelectOption,
|
|
6
|
+
Switch,
|
|
7
|
+
Tooltip,
|
|
8
|
+
Textarea,
|
|
9
|
+
Toggle,
|
|
10
|
+
Checkbox,
|
|
11
|
+
Typography
|
|
12
|
+
} from "@strapi/design-system";
|
|
13
|
+
import { Information } from "@strapi/icons";
|
|
14
|
+
|
|
15
|
+
const TooltipIcon = ({ tooltipContent }) => {
|
|
16
|
+
if (!tooltipContent) return null;
|
|
17
|
+
return (
|
|
18
|
+
<Tooltip label={tooltipContent ?? ""}>
|
|
19
|
+
<Information
|
|
20
|
+
style={{
|
|
21
|
+
cursor: "pointer"
|
|
22
|
+
}}
|
|
23
|
+
/>
|
|
24
|
+
</Tooltip>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const InputComponent = ({
|
|
29
|
+
inputType,
|
|
30
|
+
name,
|
|
31
|
+
value,
|
|
32
|
+
onChange,
|
|
33
|
+
tooltipContent,
|
|
34
|
+
options,
|
|
35
|
+
required = false,
|
|
36
|
+
placeholder = "",
|
|
37
|
+
onLabel = "True",
|
|
38
|
+
offLabel = "False",
|
|
39
|
+
className = "payment-input",
|
|
40
|
+
type = "text",
|
|
41
|
+
...props
|
|
42
|
+
}) => {
|
|
43
|
+
switch (inputType) {
|
|
44
|
+
case "textInput":
|
|
45
|
+
return (
|
|
46
|
+
<TextInput
|
|
47
|
+
className={className}
|
|
48
|
+
name={name}
|
|
49
|
+
value={value ?? ""}
|
|
50
|
+
id={name}
|
|
51
|
+
placeholder={placeholder}
|
|
52
|
+
required={required}
|
|
53
|
+
onChange={onChange}
|
|
54
|
+
type={type}
|
|
55
|
+
endAction={
|
|
56
|
+
tooltipContent ? (
|
|
57
|
+
<TooltipIcon tooltipContent={tooltipContent} />
|
|
58
|
+
) : null
|
|
59
|
+
}
|
|
60
|
+
{...props}
|
|
61
|
+
/>
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
case "numberInput":
|
|
65
|
+
return (
|
|
66
|
+
<NumberInput
|
|
67
|
+
className={className}
|
|
68
|
+
onValueChange={onChange}
|
|
69
|
+
value={value ?? ""}
|
|
70
|
+
id={name}
|
|
71
|
+
name={name}
|
|
72
|
+
placeholder={placeholder}
|
|
73
|
+
required={required}
|
|
74
|
+
startAction={
|
|
75
|
+
tooltipContent ? (
|
|
76
|
+
<TooltipIcon tooltipContent={tooltipContent} />
|
|
77
|
+
) : null
|
|
78
|
+
}
|
|
79
|
+
{...props}
|
|
80
|
+
/>
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
case "textarea":
|
|
84
|
+
return (
|
|
85
|
+
<Textarea
|
|
86
|
+
className={className}
|
|
87
|
+
name={name}
|
|
88
|
+
value={value ?? ""}
|
|
89
|
+
onChange={(e) => onChange(e.target.value)}
|
|
90
|
+
id={name}
|
|
91
|
+
placeholder={placeholder}
|
|
92
|
+
required={required}
|
|
93
|
+
cols={9}
|
|
94
|
+
rows={3}
|
|
95
|
+
{...props}
|
|
96
|
+
/>
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
case "toggle":
|
|
100
|
+
return (
|
|
101
|
+
<Toggle
|
|
102
|
+
className={className}
|
|
103
|
+
name={name}
|
|
104
|
+
checked={value === true}
|
|
105
|
+
onChange={onChange}
|
|
106
|
+
id={name}
|
|
107
|
+
required={required}
|
|
108
|
+
onLabel={onLabel}
|
|
109
|
+
offLabel={offLabel}
|
|
110
|
+
{...props}
|
|
111
|
+
/>
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
case "checkbox":
|
|
115
|
+
return (
|
|
116
|
+
<Checkbox
|
|
117
|
+
className={className}
|
|
118
|
+
name={name}
|
|
119
|
+
checked={value === true}
|
|
120
|
+
onCheckedChange={onChange}
|
|
121
|
+
id={name}
|
|
122
|
+
required={required}
|
|
123
|
+
{...props}
|
|
124
|
+
/>
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
case "dateInput":
|
|
128
|
+
return (
|
|
129
|
+
<TextInput
|
|
130
|
+
className={className}
|
|
131
|
+
name={name}
|
|
132
|
+
value={value ?? ""}
|
|
133
|
+
onChange={onChange}
|
|
134
|
+
placeholder={placeholder}
|
|
135
|
+
required={required}
|
|
136
|
+
type="date"
|
|
137
|
+
startAction={
|
|
138
|
+
tooltipContent ? (
|
|
139
|
+
<TooltipIcon tooltipContent={tooltipContent} />
|
|
140
|
+
) : null
|
|
141
|
+
}
|
|
142
|
+
{...props}
|
|
143
|
+
/>
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
case "switch":
|
|
147
|
+
return (
|
|
148
|
+
<Switch
|
|
149
|
+
className={className}
|
|
150
|
+
onCheckedChange={onChange}
|
|
151
|
+
checked={value === true}
|
|
152
|
+
{...props}
|
|
153
|
+
/>
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
case "select":
|
|
157
|
+
return (
|
|
158
|
+
<SingleSelect
|
|
159
|
+
className={className}
|
|
160
|
+
name={name}
|
|
161
|
+
value={value ?? ""}
|
|
162
|
+
onChange={(selectedValue) => {
|
|
163
|
+
if (typeof onChange === "function") {
|
|
164
|
+
const syntheticEvent = {
|
|
165
|
+
target: { value: selectedValue },
|
|
166
|
+
currentTarget: { value: selectedValue }
|
|
167
|
+
};
|
|
168
|
+
onChange(syntheticEvent);
|
|
169
|
+
}
|
|
170
|
+
}}
|
|
171
|
+
required={required}
|
|
172
|
+
placeholder={placeholder}
|
|
173
|
+
startIcon={
|
|
174
|
+
tooltipContent ? (
|
|
175
|
+
<TooltipIcon tooltipContent={tooltipContent} />
|
|
176
|
+
) : null
|
|
177
|
+
}
|
|
178
|
+
{...props}
|
|
179
|
+
>
|
|
180
|
+
{options.map((option) => (
|
|
181
|
+
<SingleSelectOption
|
|
182
|
+
className={className}
|
|
183
|
+
key={option.value}
|
|
184
|
+
value={option.value}
|
|
185
|
+
disabled={option.disabled || false}
|
|
186
|
+
>
|
|
187
|
+
{option.label}
|
|
188
|
+
</SingleSelectOption>
|
|
189
|
+
))}
|
|
190
|
+
</SingleSelect>
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
default:
|
|
194
|
+
return (
|
|
195
|
+
<Typography variant="omega" fontWeight="semiBold">
|
|
196
|
+
Invalid input type: {inputType}
|
|
197
|
+
</Typography>
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
};
|