strapi-plugin-payone-provider 4.6.9 → 5.6.10

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 (104) hide show
  1. package/README.md +156 -11
  2. package/admin/src/components/Initializer/index.jsx +3 -3
  3. package/admin/src/components/PluginIcon/index.jsx +3 -3
  4. package/admin/src/index.js +33 -11
  5. package/admin/src/pages/App/components/AppHeader.jsx +17 -32
  6. package/admin/src/pages/App/components/AppTabs.jsx +36 -162
  7. package/admin/src/pages/App/components/ApplePayBtn.jsx +9 -11
  8. package/admin/src/pages/App/components/ApplePayConfig.jsx +221 -161
  9. package/admin/src/pages/App/components/ApplePayConfigPanel.jsx +33 -45
  10. package/admin/src/pages/App/components/DocsPanel.jsx +66 -1726
  11. package/admin/src/pages/App/components/GooglePayConfig.jsx +136 -169
  12. package/admin/src/pages/App/components/GooglePayConfigPanel.jsx +37 -55
  13. package/admin/src/pages/App/components/GooglePaybutton.jsx +101 -43
  14. package/admin/src/pages/App/components/RenderInput.jsx +94 -0
  15. package/admin/src/pages/App/components/StatusBadge.jsx +24 -71
  16. package/admin/src/pages/App/components/configuration/ConfigurationFields.jsx +255 -0
  17. package/admin/src/pages/App/components/configuration/ConfigurationPanel.jsx +54 -0
  18. package/admin/src/pages/App/components/configuration/TestConnection.jsx +130 -0
  19. package/admin/src/pages/App/components/docs/ApplePaySection.jsx +260 -0
  20. package/admin/src/pages/App/components/docs/BaseUrlSection.jsx +53 -0
  21. package/admin/src/pages/App/components/docs/CaptureRefundSection.jsx +113 -0
  22. package/admin/src/pages/App/components/docs/CodeBlock.jsx +59 -0
  23. package/admin/src/pages/App/components/docs/CreditCardSection.jsx +93 -0
  24. package/admin/src/pages/App/components/docs/GooglePaySection.jsx +248 -0
  25. package/admin/src/pages/App/components/docs/PayPalSection.jsx +116 -0
  26. package/admin/src/pages/App/components/docs/PaymentMethodsSection.jsx +55 -0
  27. package/admin/src/pages/App/components/docs/TableOfContents.jsx +47 -0
  28. package/admin/src/pages/App/components/docs/TestCredentialsSection.jsx +304 -0
  29. package/admin/src/pages/App/components/docs/ThreeDSecureSection.jsx +188 -0
  30. package/admin/src/pages/App/components/icons/BankIcon.jsx +1 -1
  31. package/admin/src/pages/App/components/icons/ChevronDownIcon.jsx +1 -1
  32. package/admin/src/pages/App/components/icons/ChevronUpIcon.jsx +1 -1
  33. package/admin/src/pages/App/components/icons/CreditCardIcon.jsx +1 -1
  34. package/admin/src/pages/App/components/icons/ErrorIcon.jsx +1 -1
  35. package/admin/src/pages/App/components/icons/InfoIcon.jsx +1 -1
  36. package/admin/src/pages/App/components/icons/MarkCircle.jsx +19 -0
  37. package/admin/src/pages/App/components/icons/PaymentIcon.jsx +1 -1
  38. package/admin/src/pages/App/components/icons/PendingIcon.jsx +1 -1
  39. package/admin/src/pages/App/components/icons/PersonIcon.jsx +1 -1
  40. package/admin/src/pages/App/components/icons/SuccessIcon.jsx +1 -1
  41. package/admin/src/pages/App/components/icons/WalletIcon.jsx +1 -1
  42. package/admin/src/pages/App/components/payment-actions/ApplePayPanel.jsx +51 -0
  43. package/admin/src/pages/App/components/payment-actions/AuthorizationForm.jsx +341 -0
  44. package/admin/src/pages/App/components/payment-actions/CaptureForm.jsx +128 -0
  45. package/admin/src/pages/App/components/{paymentActions → payment-actions}/CardDetailsInput.jsx +77 -72
  46. package/admin/src/pages/App/components/payment-actions/PaymentActionsPanel.jsx +194 -0
  47. package/admin/src/pages/App/components/payment-actions/PaymentMethodSelector.jsx +313 -0
  48. package/admin/src/pages/App/components/payment-actions/PaymentResult.jsx +133 -0
  49. package/admin/src/pages/App/components/payment-actions/PreauthorizationForm.jsx +280 -0
  50. package/admin/src/pages/App/components/payment-actions/RefundForm.jsx +121 -0
  51. package/admin/src/pages/App/components/transaction-history/FiltersPanel.jsx +145 -0
  52. package/admin/src/pages/App/components/transaction-history/HistoryPanel.jsx +50 -0
  53. package/admin/src/pages/App/components/transaction-history/TransactionTable.jsx +163 -0
  54. package/admin/src/pages/App/components/transaction-history/details/TransactionDetails.jsx +156 -0
  55. package/admin/src/pages/App/components/{TransactionHistoryItem.jsx → transaction-history/details/TransactionHistoryItem.jsx} +16 -28
  56. package/admin/src/pages/App/index.jsx +27 -70
  57. package/admin/src/pages/App/styles.css +46 -169
  58. package/admin/src/pages/constants/paymentConstants.js +52 -16
  59. package/admin/src/pages/hooks/use-system-theme.js +27 -0
  60. package/admin/src/pages/hooks/usePaymentActions.js +273 -210
  61. package/admin/src/pages/hooks/useSettings.js +87 -48
  62. package/admin/src/pages/hooks/useTransactionHistory.js +105 -108
  63. package/admin/src/pages/utils/api.js +57 -72
  64. package/admin/src/pages/utils/applePayConstants.js +2 -28
  65. package/admin/src/pages/utils/countryLanguageUtils.js +280 -0
  66. package/admin/src/pages/utils/getInputComponent.jsx +225 -0
  67. package/admin/src/pages/utils/googlePayConstants.js +2 -9
  68. package/admin/src/pages/utils/paymentUtils.js +13 -26
  69. package/admin/src/pages/utils/tooltipHelpers.js +18 -0
  70. package/admin/src/pages/utils/transactionTableUtils.js +60 -0
  71. package/package.json +8 -14
  72. package/server/config/index.js +18 -2
  73. package/server/controllers/payone.js +98 -31
  74. package/server/policies/index.js +2 -1
  75. package/server/policies/is-auth.js +9 -3
  76. package/server/policies/is-payone-notification.js +31 -0
  77. package/server/policies/isSuperAdmin.js +7 -5
  78. package/server/routes/index.js +11 -0
  79. package/server/services/paymentService.js +6 -22
  80. package/server/services/payone.js +10 -3
  81. package/server/services/settingsService.js +13 -3
  82. package/server/services/testConnectionService.js +11 -73
  83. package/server/services/transactionService.js +62 -99
  84. package/server/services/transactionStatusService.js +87 -0
  85. package/server/utils/normalize.js +0 -12
  86. package/server/utils/paymentMethodParams.js +0 -1
  87. package/server/utils/requestBuilder.js +34 -5
  88. package/server/utils/responseParser.js +9 -14
  89. package/strapi-admin.js +3 -1
  90. package/admin/src/pages/App/components/ConfigurationPanel.jsx +0 -517
  91. package/admin/src/pages/App/components/CustomerInfoPopover.jsx +0 -147
  92. package/admin/src/pages/App/components/HistoryPanel.jsx +0 -94
  93. package/admin/src/pages/App/components/PaymentActionsPanel.jsx +0 -280
  94. package/admin/src/pages/App/components/RawDataPopover.jsx +0 -113
  95. package/admin/src/pages/App/components/TransactionHistoryTable/TransactionHistoryTableFilters.jsx +0 -113
  96. package/admin/src/pages/App/components/TransactionHistoryTable/TransactionHistoryTablePagination.jsx +0 -180
  97. package/admin/src/pages/App/components/TransactionHistoryTable/index.jsx +0 -225
  98. package/admin/src/pages/App/components/paymentActions/ApplePayPanel.jsx +0 -95
  99. package/admin/src/pages/App/components/paymentActions/AuthorizationForm.jsx +0 -197
  100. package/admin/src/pages/App/components/paymentActions/CaptureForm.jsx +0 -65
  101. package/admin/src/pages/App/components/paymentActions/PaymentMethodSelector.jsx +0 -306
  102. package/admin/src/pages/App/components/paymentActions/PaymentResult.jsx +0 -192
  103. package/admin/src/pages/App/components/paymentActions/PreauthorizationForm.jsx +0 -142
  104. package/admin/src/pages/App/components/paymentActions/RefundForm.jsx +0 -90
@@ -0,0 +1,304 @@
1
+ import * as React from "react";
2
+ import { Accordion, Box, Flex, Typography } from "@strapi/design-system";
3
+ import { Link } from "@strapi/design-system";
4
+
5
+ const TestCredentialsSection = () => {
6
+ return (
7
+ <Accordion.Item value="test-credentials" id="test-credentials">
8
+ <Accordion.Header>
9
+ <Accordion.Trigger>Test Credentials</Accordion.Trigger>
10
+ </Accordion.Header>
11
+ <Accordion.Content>
12
+ <Flex direction="column" alignItems={"stretch"} gap={4} padding={4}>
13
+ <Typography variant="delta" as="h3" fontWeight="bold">
14
+ Test Credentials
15
+ </Typography>
16
+ <Box>
17
+ <Typography variant="pi" fontWeight="bold">
18
+ Credit Card Test Cards (Standard):
19
+ </Typography>
20
+ <Flex
21
+ direction="column"
22
+ marginTop={2}
23
+ marginBottom={2}
24
+ alignItems={"stretch"}
25
+ gap={2}
26
+ >
27
+ <Typography variant="pi">
28
+ • <strong>Visa:</strong> 4111111111111111
29
+ </Typography>
30
+ <Typography variant="pi">
31
+ • <strong>Mastercard:</strong> 5555555555554444
32
+ </Typography>
33
+ <Typography variant="pi">
34
+ • <strong>Amex:</strong> 378282246310005
35
+ </Typography>
36
+ <Typography variant="pi">
37
+ • <strong>Expiry:</strong> Any future date (e.g., 12/25 =
38
+ "2512")
39
+ </Typography>
40
+ <Typography variant="pi">
41
+ • <strong>CVC:</strong> Any 3 digits (4 digits for Amex)
42
+ </Typography>
43
+ </Flex>
44
+ <Typography variant="pi" textColor="neutral600">
45
+ 📚 <strong>Payone Documentation:</strong>{" "}
46
+ <Link
47
+ href="https://docs.payone.com/display/public/PLATFORM/Test+and+Live+Data"
48
+ target="_blank"
49
+ rel="noopener noreferrer"
50
+ >
51
+ https://docs.payone.com/display/public/PLATFORM/Test+and+Live+Data
52
+ </Link>
53
+ </Typography>
54
+ </Box>
55
+ <Box>
56
+ <Typography variant="pi" fontWeight="bold">
57
+ 3D Secure Test Cards (Special Test Data):
58
+ </Typography>
59
+ <Flex
60
+ direction="column"
61
+ marginBottom={2}
62
+ marginTop={2}
63
+ alignItems={"stretch"}
64
+ gap={2}
65
+ >
66
+ <Typography variant="pi">
67
+ • <strong>Visa 3DS Test Card:</strong> 4000000000000002
68
+ </Typography>
69
+ <Typography variant="pi">
70
+ • <strong>Mastercard 3DS Test Card:</strong>{" "}
71
+ 5453010000059543
72
+ </Typography>
73
+ <Typography variant="pi">
74
+ • <strong>3DS Password:</strong> Usually "123456" or as
75
+ provided by Payone
76
+ </Typography>
77
+ <Typography variant="pi">
78
+ • <strong>Expiry:</strong> Any future date (e.g., 12/25 =
79
+ "2512")
80
+ </Typography>
81
+ <Typography variant="pi">
82
+ • <strong>CVC:</strong> Any 3 digits
83
+ </Typography>
84
+ </Flex>
85
+ <Typography variant="pi" textColor="neutral600">
86
+ 📚 <strong>Payone 3D Secure Documentation:</strong>{" "}
87
+ <Link
88
+ href="https://docs.payone.com/display/public/PLATFORM/3D+Secure"
89
+ target="_blank"
90
+ rel="noopener noreferrer"
91
+ >
92
+ https://docs.payone.com/display/public/PLATFORM/3D+Secure
93
+ </Link>
94
+ </Typography>
95
+ </Box>
96
+ <Box>
97
+ <Typography variant="pi" fontWeight="bold">
98
+ PayPal Test Data:
99
+ </Typography>
100
+ <Flex
101
+ direction="column"
102
+ marginTop={2}
103
+ marginBottom={2}
104
+ alignItems={"stretch"}
105
+ gap={2}
106
+ >
107
+ <Typography variant="pi">
108
+ • Use PayPal Sandbox test accounts
109
+ </Typography>
110
+ <Typography variant="pi">
111
+ • Create test accounts in PayPal Developer Dashboard
112
+ </Typography>
113
+ <Typography variant="pi">
114
+ • Test with both buyer and merchant sandbox accounts
115
+ </Typography>
116
+ </Flex>
117
+ <Typography variant="pi" textColor="neutral600">
118
+ 📚 <strong>Payone PayPal Documentation:</strong>{" "}
119
+ <Link
120
+ href="https://docs.payone.com/display/public/PLATFORM/PayPal"
121
+ target="_blank"
122
+ rel="noopener noreferrer"
123
+ >
124
+ https://docs.payone.com/display/public/PLATFORM/PayPal
125
+ </Link>
126
+ </Typography>
127
+ </Box>
128
+ <Box>
129
+ <Typography variant="pi" fontWeight="bold">
130
+ Google Pay Test Data:
131
+ </Typography>
132
+ <Flex
133
+ direction="column"
134
+ marginTop={2}
135
+ marginBottom={2}
136
+ alignItems={"stretch"}
137
+ gap={2}
138
+ >
139
+ <Typography variant="pi">
140
+ • Use Google Pay test environment
141
+ </Typography>
142
+ <Typography variant="pi">
143
+ • Test cards are automatically provided by Google Pay SDK
144
+ </Typography>
145
+ <Typography variant="pi">
146
+ • Set <code>environment: 'TEST'</code> in Google Pay
147
+ configuration
148
+ </Typography>
149
+ </Flex>
150
+ <Typography variant="pi" textColor="neutral600">
151
+ 📚 <strong>Payone Google Pay Documentation:</strong>{" "}
152
+ <Link
153
+ href="https://docs.payone.com/display/public/PLATFORM/Google+Pay"
154
+ target="_blank"
155
+ rel="noopener noreferrer"
156
+ >
157
+ https://docs.payone.com/display/public/PLATFORM/Google+Pay
158
+ </Link>
159
+ </Typography>
160
+ </Box>
161
+ <Box>
162
+ <Typography variant="pi" fontWeight="bold">
163
+ Apple Pay Test Data:
164
+ </Typography>
165
+ <Flex
166
+ direction="column"
167
+ marginTop={2}
168
+ marginBottom={2}
169
+ alignItems={"stretch"}
170
+ gap={2}
171
+ >
172
+ <Typography variant="pi">
173
+ • Use Apple Pay test environment
174
+ </Typography>
175
+ <Typography variant="pi">
176
+ • Test cards are available in Wallet app on test devices
177
+ </Typography>
178
+ <Typography variant="pi">
179
+ • Requires registered domain with HTTPS (not localhost)
180
+ </Typography>
181
+ </Flex>
182
+ <Typography variant="pi" textColor="neutral600">
183
+ 📚 <strong>Payone Apple Pay Documentation:</strong>{" "}
184
+ <Link
185
+ href="https://docs.payone.com/display/public/PLATFORM/Apple+Pay"
186
+ target="_blank"
187
+ rel="noopener noreferrer"
188
+ >
189
+ https://docs.payone.com/display/public/PLATFORM/Apple+Pay
190
+ </Link>
191
+ </Typography>
192
+ </Box>
193
+ <Box>
194
+ <Typography variant="pi" fontWeight="bold">
195
+ Sofort Banking Test Data:
196
+ </Typography>
197
+ <Flex
198
+ direction="column"
199
+ marginTop={2}
200
+ marginBottom={2}
201
+ alignItems={"stretch"}
202
+ gap={2}
203
+ >
204
+ <Typography variant="pi">
205
+ • Use Sofort test environment
206
+ </Typography>
207
+ <Typography variant="pi">
208
+ • Test credentials provided by Payone
209
+ </Typography>
210
+ </Flex>
211
+ <Typography variant="pi" textColor="neutral600">
212
+ 📚 <strong>Payone Sofort Documentation:</strong>{" "}
213
+ <Link
214
+ href="https://docs.payone.com/display/public/PLATFORM/Sofort"
215
+ target="_blank"
216
+ rel="noopener noreferrer"
217
+ >
218
+ https://docs.payone.com/display/public/PLATFORM/Sofort
219
+ </Link>
220
+ </Typography>
221
+ </Box>
222
+ <Box>
223
+ <Typography variant="pi" fontWeight="bold">
224
+ SEPA Direct Debit Test Data:
225
+ </Typography>
226
+ <Flex
227
+ direction="column"
228
+ marginTop={2}
229
+ marginBottom={2}
230
+ alignItems={"stretch"}
231
+ gap={2}
232
+ >
233
+ <Typography variant="pi">
234
+ • <strong>Test IBAN:</strong> DE89370400440532013000
235
+ </Typography>
236
+ <Typography variant="pi">
237
+ • <strong>Test BIC:</strong> COBADEFFXXX
238
+ </Typography>
239
+ <Typography variant="pi">
240
+ • <strong>Account Holder:</strong> Any test name
241
+ </Typography>
242
+ </Flex>
243
+ <Typography variant="pi" textColor="neutral600">
244
+ 📚 <strong>Payone SEPA Documentation:</strong>{" "}
245
+ <Link
246
+ href="https://docs.payone.com/display/public/PLATFORM/SEPA+Direct+Debit"
247
+ target="_blank"
248
+ rel="noopener noreferrer"
249
+ >
250
+ https://docs.payone.com/display/public/PLATFORM/SEPA+Direct+Debit
251
+ </Link>
252
+ </Typography>
253
+ </Box>
254
+ <Box>
255
+ <Typography variant="pi" fontWeight="bold">
256
+ General Test Data Resources:
257
+ </Typography>
258
+ <Flex
259
+ direction="column"
260
+ marginTop={2}
261
+ marginBottom={2}
262
+ alignItems={"stretch"}
263
+ gap={2}
264
+ >
265
+ <Typography variant="pi">
266
+ 📚 <strong>Payone Test Data Overview:</strong>{" "}
267
+ <Link
268
+ href="https://docs.payone.com/display/public/PLATFORM/Test+and+Live+Data"
269
+ target="_blank"
270
+ rel="noopener noreferrer"
271
+ >
272
+ https://docs.payone.com/display/public/PLATFORM/Test+and+Live+Data
273
+ </Link>
274
+ </Typography>
275
+ <Typography variant="pi">
276
+ 📚 <strong>Payone Test Cards:</strong>{" "}
277
+ <Link
278
+ href="https://docs.payone.com/display/public/PLATFORM/Credit+Card+Test+Cards"
279
+ target="_blank"
280
+ rel="noopener noreferrer"
281
+ >
282
+ https://docs.payone.com/display/public/PLATFORM/Credit+Card+Test+Cards
283
+ </Link>
284
+ </Typography>
285
+ <Typography variant="pi">
286
+ 📚 <strong>Payone Test Environment:</strong>{" "}
287
+ <Link
288
+ href="https://docs.payone.com/display/public/PLATFORM/Test+Environment"
289
+ target="_blank"
290
+ rel="noopener noreferrer"
291
+ >
292
+ https://docs.payone.com/display/public/PLATFORM/Test+Environment
293
+ </Link>
294
+ </Typography>
295
+ </Flex>
296
+ </Box>
297
+ </Flex>
298
+ </Accordion.Content>
299
+ </Accordion.Item>
300
+ );
301
+ };
302
+
303
+ export default TestCredentialsSection;
304
+
@@ -0,0 +1,188 @@
1
+ import * as React from "react";
2
+ import { Accordion, Box, Flex, Typography } from "@strapi/design-system";
3
+ import { Link } from "@strapi/design-system";
4
+ import CodeBlock from "./CodeBlock";
5
+
6
+ const ThreeDSecureSection = () => {
7
+ return (
8
+ <Accordion.Item value="3d-secure" id="3d-secure">
9
+ <Accordion.Header>
10
+ <Accordion.Trigger>3D Secure Authentication</Accordion.Trigger>
11
+ </Accordion.Header>
12
+ <Accordion.Content>
13
+ <Flex direction="column" alignItems={"stretch"} gap={4} padding={4}>
14
+ <Typography variant="delta" as="h3" fontWeight="bold">
15
+ 3D Secure Authentication
16
+ </Typography>
17
+ <Box>
18
+ <Typography variant="pi" fontWeight="bold">
19
+ How 3D Secure Works:
20
+ </Typography>
21
+ <Flex
22
+ direction="column"
23
+ marginTop={2}
24
+ alignItems={"stretch"}
25
+ gap={2}
26
+ >
27
+ <Typography variant="pi">
28
+ 1. Enable 3D Secure in Strapi admin panel (Configuration tab)
29
+ </Typography>
30
+ <Typography variant="pi">
31
+ 2. Make a credit card payment request
32
+ </Typography>
33
+ <Typography variant="pi">
34
+ 3. If 3DS is required, you'll receive a{" "}
35
+ <code>redirecturl</code> in the response
36
+ </Typography>
37
+ <Typography variant="pi">
38
+ 4. Redirect the user to the <code>redirecturl</code> for
39
+ authentication
40
+ </Typography>
41
+ <Typography variant="pi">
42
+ 5. User enters password/confirms with bank
43
+ </Typography>
44
+ <Typography variant="pi">
45
+ 6. User is redirected back to your <code>successurl</code>,{" "}
46
+ <code>errorurl</code>, or <code>backurl</code>
47
+ </Typography>
48
+ <Typography variant="pi">
49
+ 7. Handle the callback and check transaction status
50
+ </Typography>
51
+ </Flex>
52
+ </Box>
53
+
54
+ <Box>
55
+ <Typography variant="pi" fontWeight="bold">
56
+ Special 3D Secure Test Cards (from Payone Documentation):
57
+ </Typography>
58
+ <Flex
59
+ direction="column"
60
+ marginTop={2}
61
+ marginBottom={2}
62
+ alignItems={"stretch"}
63
+ gap={2}
64
+ >
65
+ <Typography variant="pi">
66
+ • <strong>Visa 3DS Test Card:</strong> 4000000000000002
67
+ </Typography>
68
+ <Typography variant="pi">
69
+ • <strong>Mastercard 3DS Test Card:</strong>{" "}
70
+ 5453010000059543
71
+ </Typography>
72
+ <Typography variant="pi">
73
+ • <strong>Expiry:</strong> Any future date (e.g., 12/25 =
74
+ "2512")
75
+ </Typography>
76
+ <Typography variant="pi">
77
+ • <strong>CVC:</strong> Any 3 digits (e.g., 123)
78
+ </Typography>
79
+ <Typography variant="pi">
80
+ • <strong>3DS Password:</strong> Usually "123456" or as provided
81
+ by Payone (check your Payone test documentation)
82
+ </Typography>
83
+ </Flex>
84
+ <Typography variant="pi" textColor="neutral600">
85
+ 📚 <strong>Payone 3D Secure Documentation:</strong>{" "}
86
+ <Link
87
+ href="https://docs.payone.com/display/public/PLATFORM/3D+Secure"
88
+ target="_blank"
89
+ rel="noopener noreferrer"
90
+ >
91
+ https://docs.payone.com/display/public/PLATFORM/3D+Secure
92
+ </Link>
93
+ </Typography>
94
+ </Box>
95
+ <Box>
96
+ <Typography variant="pi" fontWeight="bold">
97
+ Standard Credit Card Test Cards (without 3DS):
98
+ </Typography>
99
+ <Flex
100
+ direction="column"
101
+ marginTop={2}
102
+ marginBottom={2}
103
+ alignItems={"stretch"}
104
+ gap={2}
105
+ >
106
+ <Typography variant="pi">
107
+ • <strong>Visa:</strong> 4111111111111111
108
+ </Typography>
109
+ <Typography variant="pi">
110
+ • <strong>Mastercard:</strong> 5555555555554444
111
+ </Typography>
112
+ <Typography variant="pi">
113
+ • <strong>Amex:</strong> 378282246310005
114
+ </Typography>
115
+ <Typography variant="pi">
116
+ • <strong>Expiry:</strong> Any future date (e.g., 12/25 =
117
+ "2512")
118
+ </Typography>
119
+ <Typography variant="pi">
120
+ • <strong>CVC:</strong> Any 3 digits (4 digits for Amex)
121
+ </Typography>
122
+ </Flex>
123
+ <Typography variant="pi" textColor="neutral600">
124
+ 📚 <strong>Payone Test Cards Documentation:</strong>{" "}
125
+ <Link
126
+ href="https://docs.payone.com/display/public/PLATFORM/Credit+Card+Test+Cards"
127
+ target="_blank"
128
+ rel="noopener noreferrer"
129
+ >
130
+ https://docs.payone.com/display/public/PLATFORM/Credit+Card+Test+Cards
131
+ </Link>
132
+ </Typography>
133
+ </Box>
134
+ <Box>
135
+ <Typography variant="pi" fontWeight="bold">
136
+ Example Flow:
137
+ </Typography>
138
+ <div style={{ marginTop: "12px" }}>
139
+ <CodeBlock>{`// 1. Make payment request
140
+ const response = await fetch('/api/strapi-plugin-payone-provider/preauthorization', {
141
+ method: 'POST',
142
+ body: JSON.stringify({
143
+ amount: 1000,
144
+ currency: 'EUR',
145
+ clearingtype: 'cc',
146
+ cardtype: 'V',
147
+ cardpan: '4111111111111111',
148
+ cardexpiredate: '2512',
149
+ cardcvc2: '123',
150
+ successurl: 'https://yoursite.com/payment/success',
151
+ errorurl: 'https://yoursite.com/payment/error',
152
+ backurl: 'https://yoursite.com/payment/back',
153
+ // ... other params
154
+ })
155
+ });
156
+
157
+ const result = await response.json();
158
+
159
+ // 2. Check if 3DS redirect is required
160
+ if (result.status === 'REDIRECT' && result.redirecturl) {
161
+ // 3. Redirect user to 3DS authentication page
162
+ window.location.href = result.redirecturl;
163
+ }
164
+
165
+ // 4. Handle callback (in your success/error/back URL handler)
166
+ // The callback will include transaction status and txid`}</CodeBlock>
167
+ </div>
168
+ </Box>
169
+ <Box marginTop={2}>
170
+ <Typography variant="pi" textColor="neutral600">
171
+ 📚 <strong>Payone 3D Secure Documentation:</strong>{" "}
172
+ <Link
173
+ href="https://docs.payone.com/display/public/PLATFORM/3D+Secure"
174
+ target="_blank"
175
+ rel="noopener noreferrer"
176
+ >
177
+ https://docs.payone.com/display/public/PLATFORM/3D+Secure
178
+ </Link>
179
+ </Typography>
180
+ </Box>
181
+ </Flex>
182
+ </Accordion.Content>
183
+ </Accordion.Item>
184
+ );
185
+ };
186
+
187
+ export default ThreeDSecureSection;
188
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from '@strapi/strapi/admin';
2
2
 
3
3
  const BankIcon = ({ size = 16, color = 'currentColor' }) => (
4
4
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from '@strapi/strapi/admin';
2
2
 
3
3
  const ChevronDownIcon = ({ size = 16, color = 'currentColor' }) => (
4
4
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from '@strapi/strapi/admin';
2
2
 
3
3
  const ChevronUpIcon = ({ size = 16, color = 'currentColor' }) => (
4
4
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from '@strapi/strapi/admin';
2
2
 
3
3
  const CreditCardIcon = ({ size = 16, color = 'currentColor' }) => (
4
4
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from '@strapi/strapi/admin';
2
2
 
3
3
  const ErrorIcon = ({ size = 16, color = 'currentColor' }) => (
4
4
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from '@strapi/strapi/admin';
2
2
 
3
3
  const InfoIcon = ({ size = 16, color = 'currentColor' }) => (
4
4
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+
3
+ const MarkCircle = (props) => (
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width={12.5}
7
+ height={12.5}
8
+ fill="none"
9
+ viewBox="0 0 24 24"
10
+ {...props}
11
+ >
12
+ <path
13
+ fill="#212134"
14
+ d="M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12 12-5.383 12-12S18.617 0 12 0Zm1.154 18.456h-2.308V16.15h2.308v2.307Zm-.23-3.687h-1.847l-.346-9.23h2.538l-.346 9.23Z"
15
+ />
16
+ </svg>
17
+ );
18
+
19
+ export default MarkCircle;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from '@strapi/strapi/admin';
2
2
 
3
3
  const PaymentIcon = ({ size = 16, color = 'currentColor' }) => (
4
4
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from '@strapi/strapi/admin';
2
2
 
3
3
  const PendingIcon = ({ size = 16, color = 'currentColor' }) => (
4
4
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from '@strapi/strapi/admin';
2
2
 
3
3
  const PersonIcon = ({ size = 16, color = 'currentColor' }) => (
4
4
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from '@strapi/strapi/admin';
2
2
 
3
3
  const SuccessIcon = ({ size = 16, color = 'currentColor' }) => (
4
4
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from '@strapi/strapi/admin';
2
2
 
3
3
  const WalletIcon = ({ size = 16, color = 'currentColor' }) => (
4
4
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -0,0 +1,51 @@
1
+ import * as React from "@strapi/strapi/admin";
2
+ import { Box, Typography } from "@strapi/design-system";
3
+ import PaymentMethodSelector from "./PaymentMethodSelector";
4
+ import AuthorizationForm from "./AuthorizationForm";
5
+
6
+ const ApplePayOnlyPanel = ({
7
+ onNavigateToConfig,
8
+ isLiveMode,
9
+ paymentActions,
10
+ settings,
11
+ }) => {
12
+ return (
13
+ <Box
14
+ style={{
15
+ display: "flex",
16
+ flexDirection: "column",
17
+ alignItems: "flex-start",
18
+ gap: "16px",
19
+ marginTop: "24px",
20
+ width: "100%",
21
+ }}
22
+ >
23
+ <Typography
24
+ variant="pi"
25
+ textColor="warning600"
26
+ style={{
27
+ fontSize: "14px",
28
+ marginTop: "12px",
29
+ marginBottom: "12px",
30
+ fontWeight: "bold",
31
+ }}
32
+ >
33
+ ⚠️ Apple Pay can only be tested on a production domain with HTTPS and
34
+ Live mode. Testing in Strapi admin panel is not supported. Please test
35
+ Apple Pay on your production website.
36
+ </Typography>
37
+
38
+ <PaymentMethodSelector
39
+ paymentActions={paymentActions}
40
+ onNavigateToConfig={onNavigateToConfig}
41
+ isLiveMode={isLiveMode}
42
+ />
43
+
44
+ <hr className="payment-divider" />
45
+
46
+ <AuthorizationForm paymentActions={paymentActions} settings={settings} />
47
+ </Box>
48
+ );
49
+ };
50
+
51
+ export default ApplePayOnlyPanel;