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.
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 +506 -451
  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 +223 -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 +100 -100
  81. package/server/utils/responseParser.js +141 -141
  82. package/strapi-admin.js +4 -4
  83. 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
+ };