strapi-plugin-payone-provider 4.6.10 → 4.6.11

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 (62) hide show
  1. package/README.md +64 -0
  2. package/admin/src/pages/App/components/AppHeader.jsx +3 -2
  3. package/admin/src/pages/App/components/AppTabs.jsx +34 -88
  4. package/admin/src/pages/App/components/DocsPanel.jsx +1726 -1726
  5. package/admin/src/pages/App/components/GooglePaybutton.jsx +300 -300
  6. package/admin/src/pages/App/components/StatusBadge.jsx +1 -1
  7. package/admin/src/pages/App/components/common/InfoTooltip.jsx +16 -0
  8. package/admin/src/pages/App/components/{ApplePayConfig.jsx → configuration/ApplePayConfig.jsx} +191 -62
  9. package/admin/src/pages/App/components/{ApplePayConfigPanel.jsx → configuration/ApplePayConfigPanel.jsx} +71 -70
  10. package/admin/src/pages/App/components/configuration/ConfigurationFields.jsx +408 -0
  11. package/admin/src/pages/App/components/configuration/ConfigurationPanel.jsx +67 -0
  12. package/admin/src/pages/App/components/{GooglePayConfig.jsx → configuration/GooglePayConfig.jsx} +254 -254
  13. package/admin/src/pages/App/components/{GooglePayConfigPanel.jsx → configuration/GooglePayConfigPanel.jsx} +82 -82
  14. package/admin/src/pages/App/components/configuration/TestConnection.jsx +129 -0
  15. package/admin/src/pages/App/components/paymentActions/ApplePayPanel.jsx +137 -95
  16. package/admin/src/pages/App/components/paymentActions/CaptureForm.jsx +119 -14
  17. package/admin/src/pages/App/components/paymentActions/CardDetailsInput.jsx +85 -24
  18. package/admin/src/pages/App/components/paymentActions/PaymentActionsPanel.jsx +361 -0
  19. package/admin/src/pages/App/components/paymentActions/PaymentMethodSelector.jsx +22 -4
  20. package/admin/src/pages/App/components/paymentActions/RefundForm.jsx +91 -20
  21. package/admin/src/pages/App/components/paymentActions/authorization/AuthorizationForm.jsx +157 -0
  22. package/admin/src/pages/App/components/paymentActions/authorization/AuthorizationFormFields.jsx +308 -0
  23. package/admin/src/pages/App/components/paymentActions/authorization/AuthorizationFormHeader.jsx +27 -0
  24. package/admin/src/pages/App/components/paymentActions/authorization/AuthorizationPaymentButtons.jsx +93 -0
  25. package/admin/src/pages/App/components/paymentActions/preauthorization/PreauthorizationForm.jsx +134 -0
  26. package/admin/src/pages/App/components/paymentActions/preauthorization/PreauthorizationFormFields.jsx +295 -0
  27. package/admin/src/pages/App/components/paymentActions/preauthorization/PreauthorizationFormHeader.jsx +27 -0
  28. package/admin/src/pages/App/components/paymentActions/preauthorization/PreauthorizationPaymentButtons.jsx +53 -0
  29. package/admin/src/pages/App/components/transaction-history/FiltersPanel.jsx +182 -0
  30. package/admin/src/pages/App/components/transaction-history/HistoryPanel.jsx +49 -0
  31. package/admin/src/pages/App/components/transaction-history/TransactionTable.jsx +169 -0
  32. package/admin/src/pages/App/components/transaction-history/TransactionTablePagination.jsx +28 -0
  33. package/admin/src/pages/App/components/transaction-history/details/TransactionDetails.jsx +155 -0
  34. package/admin/src/pages/App/index.jsx +5 -29
  35. package/admin/src/pages/hooks/usePaymentActions.js +87 -11
  36. package/admin/src/pages/hooks/useSettings.js +64 -22
  37. package/admin/src/pages/hooks/useTransactionHistory.js +100 -88
  38. package/admin/src/pages/utils/api.js +31 -3
  39. package/admin/src/pages/utils/countryLanguageUtils.js +236 -0
  40. package/admin/src/pages/utils/transactionTableUtils.js +60 -0
  41. package/package.json +1 -1
  42. package/server/bootstrap.js +6 -6
  43. package/server/controllers/payone.js +27 -3
  44. package/server/policies/index.js +2 -1
  45. package/server/policies/is-payone-notification.js +31 -0
  46. package/server/routes/index.js +10 -0
  47. package/server/services/payone.js +11 -4
  48. package/server/services/settingsService.js +8 -2
  49. package/server/services/testConnectionService.js +11 -72
  50. package/server/services/transactionService.js +58 -78
  51. package/server/services/transactionStatusService.js +87 -0
  52. package/admin/src/pages/App/components/ConfigurationPanel.jsx +0 -517
  53. package/admin/src/pages/App/components/CustomerInfoPopover.jsx +0 -147
  54. package/admin/src/pages/App/components/HistoryPanel.jsx +0 -94
  55. package/admin/src/pages/App/components/PaymentActionsPanel.jsx +0 -280
  56. package/admin/src/pages/App/components/RawDataPopover.jsx +0 -113
  57. package/admin/src/pages/App/components/TransactionHistoryItem.jsx +0 -522
  58. package/admin/src/pages/App/components/TransactionHistoryTable/TransactionHistoryTableFilters.jsx +0 -113
  59. package/admin/src/pages/App/components/TransactionHistoryTable/TransactionHistoryTablePagination.jsx +0 -180
  60. package/admin/src/pages/App/components/TransactionHistoryTable/index.jsx +0 -225
  61. package/admin/src/pages/App/components/paymentActions/AuthorizationForm.jsx +0 -197
  62. package/admin/src/pages/App/components/paymentActions/PreauthorizationForm.jsx +0 -142
@@ -1,1726 +1,1726 @@
1
- import React, { useEffect, useState } from "react";
2
- import {
3
- Box,
4
- Card,
5
- CardBody,
6
- Flex,
7
- Typography,
8
- Stack,
9
- Accordion,
10
- AccordionToggle,
11
- AccordionContent,
12
- } from "@strapi/design-system";
13
-
14
- const CodeBlock = ({ children }) => {
15
- const [isDark, setIsDark] = useState(false);
16
-
17
- useEffect(() => {
18
- const checkTheme = () => {
19
- if (typeof window !== "undefined") {
20
- const bodyBg = window.getComputedStyle(document.body).backgroundColor;
21
- const rgb = bodyBg.match(/\d+/g);
22
- if (rgb && rgb.length >= 3) {
23
- const brightness =
24
- (parseInt(rgb[0]) * 299 +
25
- parseInt(rgb[1]) * 587 +
26
- parseInt(rgb[2]) * 114) /
27
- 1000;
28
- setIsDark(brightness < 128);
29
- } else {
30
- const prefersDark =
31
- window.matchMedia &&
32
- window.matchMedia("(prefers-color-scheme: dark)").matches;
33
- setIsDark(prefersDark);
34
- }
35
- }
36
- };
37
-
38
- checkTheme();
39
- const mediaQuery =
40
- window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)");
41
- if (mediaQuery) {
42
- mediaQuery.addEventListener("change", checkTheme);
43
- return () => mediaQuery.removeEventListener("change", checkTheme);
44
- }
45
- }, []);
46
-
47
- return (
48
- <Box
49
- padding={3}
50
- borderRadius="4px"
51
- style={{
52
- backgroundColor: isDark ? "#1e1e1e" : "#f6f6f9",
53
- color: isDark ? "#d4d4d4" : "#32324d",
54
- fontFamily: "monospace",
55
- fontSize: "14px",
56
- overflow: "auto",
57
- }}
58
- >
59
- <pre
60
- style={{ margin: 0, whiteSpace: "pre-wrap", wordBreak: "break-word" }}
61
- >
62
- {children}
63
- </pre>
64
- </Box>
65
- );
66
- };
67
-
68
- const DocsPanel = () => {
69
- const [expandedAccordions, setExpandedAccordions] = useState({
70
- toc: false,
71
- creditCard: false,
72
- paypal: false,
73
- googlePay: false,
74
- applePay: false,
75
- threeDSecure: false,
76
- captureRefund: false,
77
- testCredentials: false,
78
- });
79
-
80
- const toggleAccordion = (key) => {
81
- setExpandedAccordions((prev) => ({
82
- ...prev,
83
- [key]: !prev[key],
84
- }));
85
- };
86
-
87
- return (
88
- <Box
89
- className="payment-container"
90
- paddingTop={8}
91
- paddingBottom={8}
92
- paddingLeft={8}
93
- paddingRight={8}
94
- >
95
- <Flex direction="column" alignItems="stretch" gap={6}>
96
- <Box>
97
- <Typography
98
- variant="beta"
99
- as="h2"
100
- fontWeight="bold"
101
- className="payment-title"
102
- style={{ fontSize: "24px", marginBottom: "12px" }}
103
- >
104
- Payone Provider Plugin - Frontend Integration Guide
105
- </Typography>
106
- <Typography
107
- variant="pi"
108
- textColor="neutral600"
109
- marginTop={2}
110
- className="payment-subtitle"
111
- style={{ fontSize: "16px" }}
112
- >
113
- Complete documentation for integrating Payone payment methods in
114
- your frontend application
115
- </Typography>
116
- </Box>
117
-
118
- <Accordion
119
- expanded={expandedAccordions.toc}
120
- onToggle={() => toggleAccordion("toc")}
121
- >
122
- <AccordionToggle title="Table of Contents" />
123
- <AccordionContent>
124
- <Stack spacing={2} padding={4}>
125
- <Typography variant="pi">
126
- 1. <a href="#base-url">Base URL & Authentication</a>
127
- </Typography>
128
- <Typography variant="pi">
129
- 2. <a href="#payment-methods">Supported Payment Methods</a>
130
- </Typography>
131
- <Typography variant="pi">
132
- 3. <a href="#credit-card">Credit Card Integration</a>
133
- </Typography>
134
- <Typography variant="pi">
135
- 4. <a href="#paypal">PayPal Integration</a>
136
- </Typography>
137
- <Typography variant="pi">
138
- 5. <a href="#google-pay">Google Pay Integration</a>
139
- </Typography>
140
- <Typography variant="pi">
141
- 6. <a href="#apple-pay">Apple Pay Integration</a>
142
- </Typography>
143
- <Typography variant="pi">
144
- 7. <a href="#3d-secure">3D Secure Authentication</a>
145
- </Typography>
146
- <Typography variant="pi">
147
- 8. <a href="#capture-refund">Capture & Refund Operations</a>
148
- </Typography>
149
- <Typography variant="pi">
150
- 9. <a href="#test-credentials">Test Credentials</a>
151
- </Typography>
152
- </Stack>
153
- </AccordionContent>
154
- </Accordion>
155
-
156
- <Card className="payment-card" id="base-url">
157
- <CardBody padding={6}>
158
- <Stack spacing={4}>
159
- <Typography
160
- variant="delta"
161
- as="h3"
162
- fontWeight="bold"
163
- style={{ marginBottom: "12px" }}
164
- >
165
- Base URL & Authentication
166
- </Typography>
167
- <Box>
168
- <Typography variant="pi" fontWeight="bold" marginBottom={2}>
169
- Content API (Frontend):
170
- </Typography>
171
- <CodeBlock>/api/strapi-plugin-payone-provider</CodeBlock>
172
- </Box>
173
- <Box>
174
- <Typography variant="pi" fontWeight="bold" marginBottom={2}>
175
- Required Headers:
176
- </Typography>
177
- <CodeBlock>{`{
178
- "Content-Type": "application/json",
179
- "Authorization": "Bearer YOUR_AUTH_TOKEN"
180
- }`}</CodeBlock>
181
- <Typography variant="pi" textColor="neutral600" marginTop={6}>
182
- <strong>Note:</strong> <code>YOUR_AUTH_TOKEN</code> is your
183
- Strapi authentication token (JWT), not a Payone token. You can
184
- get this token by logging into Strapi admin panel or using
185
- Strapi's authentication API.
186
- </Typography>
187
- </Box>
188
- </Stack>
189
- </CardBody>
190
- </Card>
191
-
192
- <Card className="payment-card" id="payment-methods">
193
- <CardBody padding={6}>
194
- <Stack spacing={4}>
195
- <Typography
196
- variant="delta"
197
- as="h3"
198
- fontWeight="bold"
199
- style={{ marginBottom: "12px" }}
200
- >
201
- Supported Payment Methods
202
- </Typography>
203
- <Box>
204
- <Typography variant="pi" fontWeight="bold" marginBottom={2}>
205
- Available Payment Methods:
206
- </Typography>
207
- <Stack spacing={2}>
208
- <Typography variant="pi">
209
- • <strong>cc</strong> - Credit Card (Visa, Mastercard, Amex)
210
- </Typography>
211
- <Typography variant="pi">
212
- • <strong>wlt</strong> - PayPal
213
- </Typography>
214
- <Typography variant="pi">
215
- • <strong>gpp</strong> - Google Pay
216
- </Typography>
217
- <Typography variant="pi">
218
- • <strong>apl</strong> - Apple Pay
219
- </Typography>
220
- <Typography variant="pi">
221
- • <strong>sb</strong> - Sofort Banking
222
- </Typography>
223
- <Typography variant="pi">
224
- • <strong>elv</strong> - SEPA Direct Debit
225
- </Typography>
226
- </Stack>
227
- </Box>
228
- <Box>
229
- <Typography variant="pi" fontWeight="bold" marginBottom={2}>
230
- Available Card Types (for Credit Card):
231
- </Typography>
232
- <Stack spacing={2}>
233
- <Typography variant="pi">
234
- • <strong>V</strong> - Visa
235
- </Typography>
236
- <Typography variant="pi">
237
- • <strong>M</strong> - Mastercard
238
- </Typography>
239
- <Typography variant="pi">
240
- • <strong>A</strong> - American Express (Amex)
241
- </Typography>
242
- </Stack>
243
- </Box>
244
- </Stack>
245
- </CardBody>
246
- </Card>
247
-
248
- <Accordion
249
- id="credit-card"
250
- expanded={expandedAccordions.creditCard}
251
- onToggle={() => toggleAccordion("creditCard")}
252
- >
253
- <AccordionToggle title="Credit Card Integration" />
254
- <AccordionContent>
255
- <Card className="payment-card">
256
- <CardBody padding={6}>
257
- <Stack spacing={4}>
258
- <Typography
259
- variant="delta"
260
- as="h3"
261
- fontWeight="bold"
262
- style={{ marginBottom: "12px" }}
263
- >
264
- Credit Card Integration
265
- </Typography>
266
- <Box>
267
- <Typography
268
- variant="pi"
269
- fontWeight="bold"
270
- marginBottom={2}
271
- style={{ marginBottom: "12px" }}
272
- >
273
- Preauthorization Request:
274
- </Typography>
275
- <CodeBlock>{`POST /api/strapi-plugin-payone-provider/preauthorization
276
-
277
- {
278
- "amount": 1000,
279
- "currency": "EUR",
280
- "reference": "ORD-00123-ABCD",
281
- "clearingtype": "cc",
282
- "cardtype": "V",
283
- "cardpan": "4111111111111111",
284
- "cardexpiredate": "2512",
285
- "cardcvc2": "123",
286
- "firstname": "John",
287
- "lastname": "Doe",
288
- "email": "john.doe@example.com",
289
- "street": "Main Street 123",
290
- "zip": "12345",
291
- "city": "Berlin",
292
- "country": "DE",
293
- "successurl": "https://www.example.com/success",
294
- "errorurl": "https://www.example.com/error",
295
- "backurl": "https://www.example.com/back"
296
- }`}</CodeBlock>
297
- </Box>
298
- <Box>
299
- <Typography
300
- variant="pi"
301
- fontWeight="bold"
302
- marginBottom={2}
303
- style={{ marginBottom: "12px" }}
304
- >
305
- Response (Success):
306
- </Typography>
307
- <CodeBlock>{`{
308
- "status": "APPROVED",
309
- "txid": "12345678",
310
- "reference": "ORD-00123-ABCD",
311
- "amount": 1000,
312
- "currency": "EUR"
313
- }`}</CodeBlock>
314
- </Box>
315
- <Box>
316
- <Typography
317
- variant="pi"
318
- fontWeight="bold"
319
- marginBottom={2}
320
- style={{ marginBottom: "12px" }}
321
- >
322
- Response (3D Secure Redirect):
323
- </Typography>
324
- <CodeBlock>{`{
325
- "status": "REDIRECT",
326
- "redirecturl": "https://secure.pay1.de/3ds/...",
327
- "requires3DSRedirect": true
328
- }`}</CodeBlock>
329
- <Typography
330
- variant="pi"
331
- textColor="neutral600"
332
- marginTop={2}
333
- >
334
- ⚠️ When 3D Secure is enabled, you must redirect the user
335
- to the <code>redirecturl</code> for authentication.
336
- </Typography>
337
- </Box>
338
- <Box>
339
- <Typography
340
- variant="pi"
341
- textColor="neutral600"
342
- marginTop={2}
343
- >
344
- 📚 <strong>Payone Credit Card Documentation:</strong>{" "}
345
- <a
346
- href="https://docs.payone.com/display/public/PLATFORM/Credit+Card"
347
- target="_blank"
348
- rel="noopener noreferrer"
349
- >
350
- https://docs.payone.com/display/public/PLATFORM/Credit+Card
351
- </a>
352
- </Typography>
353
- </Box>
354
- </Stack>
355
- </CardBody>
356
- </Card>
357
- </AccordionContent>
358
- </Accordion>
359
-
360
- <Accordion
361
- id="paypal"
362
- expanded={expandedAccordions.paypal}
363
- onToggle={() => toggleAccordion("paypal")}
364
- >
365
- <AccordionToggle title="PayPal Integration" />
366
- <AccordionContent>
367
- <Card className="payment-card">
368
- <CardBody padding={6}>
369
- <Stack spacing={4}>
370
- <Typography
371
- variant="delta"
372
- as="h3"
373
- fontWeight="bold"
374
- style={{ marginBottom: "12px" }}
375
- >
376
- PayPal Integration
377
- </Typography>
378
- <Box>
379
- <Typography
380
- variant="pi"
381
- fontWeight="bold"
382
- marginBottom={2}
383
- style={{ marginBottom: "12px" }}
384
- >
385
- Required Parameters:
386
- </Typography>
387
- <Stack spacing={2}>
388
- <Typography variant="pi">
389
- • <strong>clearingtype</strong>: "wlt"
390
- </Typography>
391
- <Typography variant="pi">
392
- • <strong>wallettype</strong>: "PPE" (PayPal Express)
393
- </Typography>
394
- <Typography variant="pi">
395
- • <strong>shipping_firstname</strong>,{" "}
396
- <strong>shipping_lastname</strong>,{" "}
397
- <strong>shipping_street</strong>,{" "}
398
- <strong>shipping_zip</strong>,{" "}
399
- <strong>shipping_city</strong>,{" "}
400
- <strong>shipping_country</strong> - Shipping address
401
- </Typography>
402
- </Stack>
403
- </Box>
404
- <Box>
405
- <Typography
406
- variant="pi"
407
- fontWeight="bold"
408
- marginBottom={2}
409
- style={{ marginBottom: "12px" }}
410
- >
411
- Preauthorization Request:
412
- </Typography>
413
- <CodeBlock>{`POST /api/strapi-plugin-payone-provider/preauthorization
414
-
415
- {
416
- "amount": 1000,
417
- "currency": "EUR",
418
- "reference": "ORD-00123-ABCD",
419
- "clearingtype": "wlt",
420
- "wallettype": "PPE",
421
- "firstname": "John",
422
- "lastname": "Doe",
423
- "email": "john.doe@example.com",
424
- "street": "Main Street 123",
425
- "zip": "12345",
426
- "city": "Berlin",
427
- "country": "DE",
428
- "shipping_firstname": "John",
429
- "shipping_lastname": "Doe",
430
- "shipping_street": "Main Street 123",
431
- "shipping_zip": "12345",
432
- "shipping_city": "Berlin",
433
- "shipping_country": "DE",
434
- "successurl": "https://www.example.com/success",
435
- "errorurl": "https://www.example.com/error",
436
- "backurl": "https://www.example.com/back"
437
- }`}</CodeBlock>
438
- </Box>
439
- <Box>
440
- <Typography
441
- variant="pi"
442
- fontWeight="bold"
443
- marginBottom={2}
444
- style={{ marginBottom: "12px" }}
445
- >
446
- Response (Redirect to PayPal):
447
- </Typography>
448
- <CodeBlock>{`{
449
- "status": "REDIRECT",
450
- "redirecturl": "https://www.paypal.com/checkoutnow?token=..."
451
- }`}</CodeBlock>
452
- <Typography
453
- variant="pi"
454
- textColor="neutral600"
455
- marginTop={2}
456
- >
457
- ⚠️ PayPal always redirects. You must redirect the user to{" "}
458
- <code>redirecturl</code> to complete the payment.
459
- </Typography>
460
- </Box>
461
- <Box>
462
- <Typography
463
- variant="pi"
464
- fontWeight="bold"
465
- marginBottom={2}
466
- style={{ marginBottom: "12px" }}
467
- >
468
- PayPal Callback Response (after redirect):
469
- </Typography>
470
- <CodeBlock>{`{
471
- "status": "APPROVED",
472
- "txid": "12345678",
473
- "reference": "ORD-00123-ABCD"
474
- }`}</CodeBlock>
475
- </Box>
476
- <Box>
477
- <Typography
478
- variant="pi"
479
- textColor="neutral600"
480
- marginTop={2}
481
- >
482
- 📚 <strong>Payone PayPal Documentation:</strong>{" "}
483
- <a
484
- href="https://docs.payone.com/display/public/PLATFORM/PayPal"
485
- target="_blank"
486
- rel="noopener noreferrer"
487
- >
488
- https://docs.payone.com/display/public/PLATFORM/PayPal
489
- </a>
490
- </Typography>
491
- </Box>
492
- </Stack>
493
- </CardBody>
494
- </Card>
495
- </AccordionContent>
496
- </Accordion>
497
-
498
- <Accordion
499
- id="google-pay"
500
- expanded={expandedAccordions.googlePay}
501
- onToggle={() => toggleAccordion("googlePay")}
502
- >
503
- <AccordionToggle title="Google Pay Integration" />
504
- <AccordionContent>
505
- <Card className="payment-card">
506
- <CardBody padding={6}>
507
- <Stack spacing={4}>
508
- <Typography
509
- variant="delta"
510
- as="h3"
511
- fontWeight="bold"
512
- style={{ marginBottom: "12px" }}
513
- >
514
- Google Pay Integration
515
- </Typography>
516
- <Box>
517
- <Typography
518
- variant="pi"
519
- fontWeight="bold"
520
- marginBottom={2}
521
- style={{ marginBottom: "12px" }}
522
- >
523
- Step 1: Configure Strapi Middleware
524
- </Typography>
525
- <Typography variant="pi" marginBottom={2}>
526
- Add Google Pay SDK to your{" "}
527
- <code>config/middlewares.js</code>:
528
- </Typography>
529
- <CodeBlock>{`module.exports = [
530
- 'strapi::logger',
531
- 'strapi::errors',
532
- {
533
- name: 'strapi::security',
534
- config: {
535
- contentSecurityPolicy: {
536
- useDefaults: true,
537
- directives: {
538
- 'script-src': [
539
- "'self'",
540
- "'unsafe-inline'",
541
- "'unsafe-eval'",
542
- 'https://pay.google.com',
543
- ],
544
- 'connect-src': [
545
- "'self'",
546
- 'https:',
547
- 'https://pay.google.com',
548
- ],
549
- 'frame-src': [
550
- "'self'",
551
- 'https://pay.google.com',
552
- ],
553
- },
554
- },
555
- },
556
- },
557
- // ... other middlewares
558
- ];`}</CodeBlock>
559
- </Box>
560
- <Box>
561
- <Typography
562
- variant="pi"
563
- fontWeight="bold"
564
- marginBottom={2}
565
- style={{ marginBottom: "12px" }}
566
- >
567
- Step 2: Install Google Pay Button Library (Optional)
568
- </Typography>
569
- <CodeBlock>npm install @google-pay/button-react</CodeBlock>
570
- </Box>
571
- <Box>
572
- <Typography
573
- variant="pi"
574
- fontWeight="bold"
575
- marginBottom={2}
576
- style={{ marginBottom: "12px" }}
577
- >
578
- Step 3: Implement Google Pay Button (Using NPM Library)
579
- </Typography>
580
- <CodeBlock>{`import { GooglePayButton } from '@google-pay/button-react';
581
-
582
- function PaymentForm() {
583
- const handleGooglePay = async (paymentData) => {
584
- const token = paymentData.paymentMethodData.tokenizationData.token;
585
-
586
- // Send token to your backend
587
- const response = await fetch('/api/strapi-plugin-payone-provider/preauthorization', {
588
- method: 'POST',
589
- headers: {
590
- 'Content-Type': 'application/json',
591
- 'Authorization': 'Bearer YOUR_TOKEN'
592
- },
593
- body: JSON.stringify({
594
- amount: 1000,
595
- currency: 'EUR',
596
- reference: 'ORD-00123-ABCD',
597
- clearingtype: 'wlt',
598
- wallettype: 'GGP',
599
- 'add_paydata[paymentmethod_token_data]': token,
600
- 'add_paydata[paymentmethod]': 'GGP',
601
- 'add_paydata[paymentmethod_type]': 'GOOGLEPAY',
602
- 'add_paydata[gatewayid]': 'payonegmbh',
603
- firstname: 'John',
604
- lastname: 'Doe',
605
- email: 'john.doe@example.com',
606
- street: 'Main Street 123',
607
- zip: '12345',
608
- city: 'Berlin',
609
- country: 'DE',
610
- shipping_firstname: 'John',
611
- shipping_lastname: 'Doe',
612
- shipping_street: 'Main Street 123',
613
- shipping_zip: '12345',
614
- shipping_city: 'Berlin',
615
- shipping_country: 'DE'
616
- })
617
- });
618
-
619
- const result = await response.json();
620
- };
621
-
622
- return (
623
- <GooglePayButton
624
- environment="TEST"
625
- paymentRequest={{
626
- apiVersion: 2,
627
- apiVersionMinor: 0,
628
- allowedPaymentMethods: [{
629
- type: 'CARD',
630
- parameters: {
631
- allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
632
- allowedCardNetworks: ['MASTERCARD', 'VISA']
633
- },
634
- tokenizationSpecification: {
635
- type: 'PAYMENT_GATEWAY',
636
- parameters: {
637
- gateway: 'payonegmbh',
638
- gatewayMerchantId: 'YOUR_MERCHANT_ID'
639
- }
640
- }
641
- }],
642
- merchantInfo: {
643
- merchantId: 'YOUR_MERCHANT_ID',
644
- merchantName: 'Your Store Name'
645
- },
646
- transactionInfo: {
647
- totalPriceStatus: 'FINAL',
648
- totalPriceLabel: 'Total',
649
- totalPrice: '10.00',
650
- currencyCode: 'EUR',
651
- countryCode: 'DE'
652
- }
653
- }}
654
- onLoadPaymentData={handleGooglePay}
655
- />
656
- );
657
- }`}</CodeBlock>
658
- </Box>
659
- <Box>
660
- <Typography
661
- variant="pi"
662
- fontWeight="bold"
663
- marginBottom={2}
664
- style={{ marginBottom: "12px" }}
665
- >
666
- Step 4: Manual Implementation
667
- </Typography>
668
- <CodeBlock>{`// Load Google Pay SDK
669
- <script src="https://pay.google.com/gp/p/js/pay.js"></script>
670
-
671
- // Initialize Google Pay
672
- const paymentsClient = new google.payments.api.PaymentsClient({
673
- environment: 'TEST' // or 'PRODUCTION'
674
- });
675
-
676
- // Create payment request
677
- const paymentRequest = {
678
- apiVersion: 2,
679
- apiVersionMinor: 0,
680
- allowedPaymentMethods: [{
681
- type: 'CARD',
682
- parameters: {
683
- allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
684
- allowedCardNetworks: ['MASTERCARD', 'VISA']
685
- },
686
- tokenizationSpecification: {
687
- type: 'PAYMENT_GATEWAY',
688
- parameters: {
689
- gateway: 'payonegmbh',
690
- gatewayMerchantId: 'YOUR_MERCHANT_ID'
691
- }
692
- }
693
- }],
694
- merchantInfo: {
695
- merchantId: 'YOUR_MERCHANT_ID',
696
- merchantName: 'Your Store Name'
697
- },
698
- transactionInfo: {
699
- totalPriceStatus: 'FINAL',
700
- totalPrice: '10.00',
701
- currencyCode: 'EUR',
702
- countryCode: 'DE'
703
- }
704
- };
705
-
706
- // Check if Google Pay is available
707
- paymentsClient.isReadyToPay(paymentRequest).then((response) => {
708
- if (response.result) {
709
- // Show Google Pay button
710
- paymentsClient.loadPaymentData(paymentRequest).then((paymentData) => {
711
- const token = paymentData.paymentMethodData.tokenizationData.token;
712
- // Send token to backend
713
- sendTokenToBackend(token);
714
- });
715
- }
716
- });`}</CodeBlock>
717
- </Box>
718
- <Box>
719
- <Typography
720
- variant="pi"
721
- fontWeight="bold"
722
- marginBottom={2}
723
- style={{ marginBottom: "12px" }}
724
- >
725
- Token Parameters (Backend Request):
726
- </Typography>
727
- <CodeBlock>{`{
728
- "amount": 1000,
729
- "currency": "EUR",
730
- "reference": "ORD-00123-ABCD",
731
- "clearingtype": "wlt",
732
- "wallettype": "GGP",
733
- "add_paydata[paymentmethod_token_data]": "TOKEN_FROM_GOOGLE_PAY",
734
- "add_paydata[paymentmethod]": "GGP",
735
- "add_paydata[paymentmethod_type]": "GOOGLEPAY",
736
- "add_paydata[gatewayid]": "payonegmbh",
737
- "add_paydata[gateway_merchantid]": "YOUR_MERCHANT_ID",
738
- // ... customer and shipping info
739
- }`}</CodeBlock>
740
- </Box>
741
- <Box>
742
- <Typography
743
- variant="pi"
744
- textColor="neutral600"
745
- marginTop={2}
746
- >
747
- 📚 <strong>Payone Google Pay Documentation:</strong>{" "}
748
- <a
749
- href="https://docs.payone.com/display/public/PLATFORM/Google+Pay"
750
- target="_blank"
751
- rel="noopener noreferrer"
752
- >
753
- https://docs.payone.com/display/public/PLATFORM/Google+Pay
754
- </a>
755
- </Typography>
756
- </Box>
757
- </Stack>
758
- </CardBody>
759
- </Card>
760
- </AccordionContent>
761
- </Accordion>
762
-
763
- <Accordion
764
- id="apple-pay"
765
- expanded={expandedAccordions.applePay}
766
- onToggle={() => toggleAccordion("applePay")}
767
- >
768
- <AccordionToggle title="Apple Pay Integration" />
769
- <AccordionContent>
770
- <Card className="payment-card">
771
- <CardBody padding={6}>
772
- <Stack spacing={4}>
773
- <Typography
774
- variant="delta"
775
- as="h3"
776
- fontWeight="bold"
777
- style={{ marginBottom: "12px" }}
778
- >
779
- Apple Pay Integration
780
- </Typography>
781
- <Box>
782
- <Typography
783
- variant="pi"
784
- fontWeight="bold"
785
- marginBottom={2}
786
- textColor="danger600"
787
- style={{ marginBottom: "12px", marginRight: "6px" }}
788
- >
789
- ⚠️ Important: Apple Pay does NOT work on localhost
790
- </Typography>
791
- <Typography variant="pi" textColor="neutral600">
792
- Apple Pay requires a registered domain with HTTPS. For
793
- testing, use a production domain with HTTPS or test on a
794
- device with Safari (iOS/macOS).
795
- </Typography>
796
- </Box>
797
- <Box>
798
- <Typography
799
- variant="pi"
800
- fontWeight="bold"
801
- marginBottom={2}
802
- style={{ marginBottom: "12px" }}
803
- >
804
- Step 1: Configure Strapi Middleware
805
- </Typography>
806
- <Typography variant="pi" marginBottom={2}>
807
- Add Apple Pay SDK to your{" "}
808
- <code>config/middlewares.js</code>:
809
- </Typography>
810
- <CodeBlock>{`module.exports = [
811
- 'strapi::logger',
812
- 'strapi::errors',
813
- {
814
- name: 'strapi::security',
815
- config: {
816
- contentSecurityPolicy: {
817
- useDefaults: true,
818
- directives: {
819
- 'script-src': [
820
- "'self'",
821
- "'unsafe-inline'",
822
- "'unsafe-eval'",
823
- 'https://applepay.cdn-apple.com',
824
- 'https://www.apple.com',
825
- ],
826
- 'connect-src': [
827
- "'self'",
828
- 'https:',
829
- 'https://applepay.cdn-apple.com',
830
- 'https://www.apple.com',
831
- ],
832
- 'frame-src': [
833
- "'self'",
834
- 'https://applepay.cdn-apple.com',
835
- ],
836
- },
837
- },
838
- },
839
- },
840
- // ... other middlewares
841
- ];`}</CodeBlock>
842
- </Box>
843
- <Box>
844
- <Typography
845
- variant="pi"
846
- fontWeight="bold"
847
- marginBottom={2}
848
- style={{ marginBottom: "12px" }}
849
- >
850
- Step 2: Setup .well-known File
851
- </Typography>
852
- <Typography variant="pi" marginBottom={2}>
853
- Download the Apple Pay domain verification file from
854
- Payone documentation:{" "}
855
- <a
856
- href="https://docs.payone.com/payment-methods/apple-pay/apple-pay-without-dev"
857
- target="_blank"
858
- rel="noopener noreferrer"
859
- style={{
860
- color: "#0066ff",
861
- textDecoration: "underline",
862
- }}
863
- >
864
- https://docs.payone.com/payment-methods/apple-pay/apple-pay-without-dev
865
- </a>{" "}
866
- or from your Payone merchant portal and place it:
867
- </Typography>
868
- <Stack spacing={2} marginBottom={2}>
869
- <Typography variant="pi">
870
- <strong>In Strapi:</strong>{" "}
871
- <code>
872
- public/.well-known/apple-developer-merchantid-domain-association
873
- </code>
874
- </Typography>
875
- <Typography variant="pi">
876
- <strong>In Frontend:</strong>{" "}
877
- <code>
878
- public/.well-known/apple-developer-merchantid-domain-association
879
- </code>
880
- </Typography>
881
- </Stack>
882
- <Typography
883
- variant="pi"
884
- textColor="neutral600"
885
- marginTop={2}
886
- >
887
- The file must be accessible at:{" "}
888
- <code>
889
- https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association
890
- </code>
891
- </Typography>
892
- <Typography
893
- variant="pi"
894
- textColor="neutral600"
895
- marginTop={2}
896
- >
897
- <strong>Alternative Download:</strong> Log into your
898
- Payone Merchant Interface (PMI) → Configuration → Payment
899
- Portals → Apple Pay → Download domain verification file
900
- </Typography>
901
- </Box>
902
- <Box>
903
- <Typography
904
- variant="pi"
905
- fontWeight="bold"
906
- marginBottom={2}
907
- style={{ marginBottom: "12px" }}
908
- >
909
- Step 3: Implement Apple Pay Button
910
- </Typography>
911
- <CodeBlock>{`// Load Apple Pay SDK
912
- <script src="https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js"></script>
913
-
914
- // Check if Apple Pay is available
915
- if (window.ApplePaySession && ApplePaySession.canMakePayments()) {
916
- // Create payment request
917
- const paymentRequest = {
918
- countryCode: 'DE',
919
- currencyCode: 'EUR',
920
- supportedNetworks: ['visa', 'masterCard', 'amex'],
921
- merchantCapabilities: ['supports3DS'],
922
- total: {
923
- label: 'Your Store',
924
- amount: '10.00'
925
- }
926
- };
927
-
928
- // Create session
929
- const session = new ApplePaySession(3, paymentRequest);
930
-
931
- // Handle merchant validation
932
- session.onmerchantvalidation = async (event) => {
933
- const validationURL = event.validationURL;
934
-
935
- // Call your backend to validate merchant
936
- const response = await fetch('/api/strapi-plugin-payone-provider/validate-apple-pay-merchant', {
937
- method: 'POST',
938
- headers: {
939
- 'Content-Type': 'application/json',
940
- 'Authorization': 'Bearer YOUR_TOKEN'
941
- },
942
- body: JSON.stringify({
943
- validationURL: validationURL,
944
- displayName: 'Your Store Name',
945
- domainName: window.location.hostname
946
- })
947
- });
948
-
949
- const merchantSession = await response.json();
950
- session.completeMerchantValidation(merchantSession);
951
- };
952
-
953
- // Handle payment authorization
954
- session.onpaymentauthorized = async (event) => {
955
- const payment = event.payment;
956
- const token = payment.token;
957
-
958
- // Send token to backend
959
- const response = await fetch('/api/strapi-plugin-payone-provider/preauthorization', {
960
- method: 'POST',
961
- headers: {
962
- 'Content-Type': 'application/json',
963
- 'Authorization': 'Bearer YOUR_TOKEN'
964
- },
965
- body: JSON.stringify({
966
- amount: 1000,
967
- currency: 'EUR',
968
- reference: 'ORD-00123-ABCD',
969
- clearingtype: 'wlt',
970
- wallettype: 'APL',
971
- 'add_paydata[paymentmethod_token_data]': JSON.stringify(token),
972
- 'add_paydata[paymentmethod]': 'APL',
973
- 'add_paydata[paymentmethod_type]': 'APPLEPAY',
974
- 'add_paydata[gatewayid]': 'payonegmbh',
975
- firstname: payment.billingContact.givenName || 'John',
976
- lastname: payment.billingContact.familyName || 'Doe',
977
- email: payment.billingContact.emailAddress || 'john.doe@example.com',
978
- street: payment.billingContact.addressLines?.[0] || 'Main Street 123',
979
- zip: payment.billingContact.postalCode || '12345',
980
- city: payment.billingContact.locality || 'Berlin',
981
- country: payment.billingContact.countryCode || 'DE',
982
- shipping_firstname: payment.shippingContact?.givenName || payment.billingContact.givenName || 'John',
983
- shipping_lastname: payment.shippingContact?.familyName || payment.billingContact.familyName || 'Doe',
984
- shipping_street: payment.shippingContact?.addressLines?.[0] || payment.billingContact.addressLines?.[0] || 'Main Street 123',
985
- shipping_zip: payment.shippingContact?.postalCode || payment.billingContact.postalCode || '12345',
986
- shipping_city: payment.shippingContact?.locality || payment.billingContact.locality || 'Berlin',
987
- shipping_country: payment.shippingContact?.countryCode || payment.billingContact.countryCode || 'DE'
988
- })
989
- });
990
-
991
- const result = await response.json();
992
-
993
- if (result.status === 'APPROVED') {
994
- session.completePayment(ApplePaySession.STATUS_SUCCESS);
995
- } else {
996
- session.completePayment(ApplePaySession.STATUS_FAILURE);
997
- }
998
- };
999
-
1000
- // Show payment sheet
1001
- session.begin();
1002
- }`}</CodeBlock>
1003
- </Box>
1004
- <Box>
1005
- <Typography
1006
- variant="pi"
1007
- fontWeight="bold"
1008
- marginBottom={2}
1009
- style={{ marginBottom: "12px" }}
1010
- >
1011
- Token Parameters (Backend Request):
1012
- </Typography>
1013
- <CodeBlock>{`{
1014
- "amount": 1000,
1015
- "currency": "EUR",
1016
- "reference": "ORD-00123-ABCD",
1017
- "clearingtype": "wlt",
1018
- "wallettype": "APL",
1019
- "add_paydata[paymentmethod_token_data]": "JSON_STRINGIFIED_TOKEN",
1020
- "add_paydata[paymentmethod]": "APL",
1021
- "add_paydata[paymentmethod_type]": "APPLEPAY",
1022
- "add_paydata[gatewayid]": "payonegmbh",
1023
- "add_paydata[gateway_merchantid]": "YOUR_MERCHANT_ID",
1024
- // ... customer and shipping info
1025
- }`}</CodeBlock>
1026
- </Box>
1027
- <Box>
1028
- <Typography
1029
- variant="pi"
1030
- textColor="neutral600"
1031
- marginTop={2}
1032
- >
1033
- 📚 <strong>Payone Apple Pay Documentation:</strong>{" "}
1034
- <a
1035
- href="https://docs.payone.com/display/public/PLATFORM/Apple+Pay"
1036
- target="_blank"
1037
- rel="noopener noreferrer"
1038
- >
1039
- https://docs.payone.com/display/public/PLATFORM/Apple+Pay
1040
- </a>
1041
- </Typography>
1042
- </Box>
1043
- </Stack>
1044
- </CardBody>
1045
- </Card>
1046
- </AccordionContent>
1047
- </Accordion>
1048
-
1049
- <Accordion
1050
- id="3d-secure"
1051
- expanded={expandedAccordions.threeDSecure}
1052
- onToggle={() => toggleAccordion("threeDSecure")}
1053
- >
1054
- <AccordionToggle title="3D Secure Authentication" />
1055
- <AccordionContent>
1056
- <Card className="payment-card">
1057
- <CardBody padding={6}>
1058
- <Stack spacing={4}>
1059
- <Typography
1060
- variant="delta"
1061
- as="h3"
1062
- fontWeight="bold"
1063
- style={{ marginBottom: "12px" }}
1064
- >
1065
- 3D Secure Authentication
1066
- </Typography>
1067
- <Box>
1068
- <Typography
1069
- variant="pi"
1070
- fontWeight="bold"
1071
- marginBottom={2}
1072
- style={{ marginBottom: "12px" }}
1073
- >
1074
- How 3D Secure Works:
1075
- </Typography>
1076
- <Stack spacing={2}>
1077
- <Typography variant="pi">
1078
- 1. Enable 3D Secure in Strapi admin panel (Configuration
1079
- tab)
1080
- </Typography>
1081
- <Typography variant="pi">
1082
- 2. Make a credit card payment request
1083
- </Typography>
1084
- <Typography variant="pi">
1085
- 3. If 3DS is required, you'll receive a{" "}
1086
- <code>redirecturl</code> in the response
1087
- </Typography>
1088
- <Typography variant="pi">
1089
- 4. Redirect the user to the <code>redirecturl</code> for
1090
- authentication
1091
- </Typography>
1092
- <Typography variant="pi">
1093
- 5. User enters password/confirms with bank
1094
- </Typography>
1095
- <Typography variant="pi">
1096
- 6. User is redirected back to your{" "}
1097
- <code>successurl</code>, <code>errorurl</code>, or{" "}
1098
- <code>backurl</code>
1099
- </Typography>
1100
- <Typography variant="pi">
1101
- 7. Handle the callback and check transaction status
1102
- </Typography>
1103
- </Stack>
1104
- </Box>
1105
- <Box>
1106
- <Typography
1107
- variant="pi"
1108
- fontWeight="bold"
1109
- marginBottom={2}
1110
- style={{ marginBottom: "12px" }}
1111
- >
1112
- Special 3D Secure Test Cards (from Payone Documentation):
1113
- </Typography>
1114
- <Stack spacing={2}>
1115
- <Typography variant="pi">
1116
- • <strong>Visa 3DS Test Card:</strong> 4000000000000002
1117
- </Typography>
1118
- <Typography variant="pi">
1119
- • <strong>Mastercard 3DS Test Card:</strong>{" "}
1120
- 5453010000059543
1121
- </Typography>
1122
- <Typography variant="pi">
1123
- • <strong>Expiry:</strong> Any future date (e.g., 12/25
1124
- = "2512")
1125
- </Typography>
1126
- <Typography variant="pi">
1127
- • <strong>CVC:</strong> Any 3 digits (e.g., 123)
1128
- </Typography>
1129
- <Typography variant="pi">
1130
- • <strong>3DS Password:</strong> Usually "123456" or as
1131
- provided by Payone (check your Payone test
1132
- documentation)
1133
- </Typography>
1134
- </Stack>
1135
- <Typography
1136
- variant="pi"
1137
- textColor="neutral600"
1138
- marginTop={2}
1139
- >
1140
- 📚 <strong>Payone 3D Secure Documentation:</strong>{" "}
1141
- <a
1142
- href="https://docs.payone.com/display/public/PLATFORM/3D+Secure"
1143
- target="_blank"
1144
- rel="noopener noreferrer"
1145
- >
1146
- https://docs.payone.com/display/public/PLATFORM/3D+Secure
1147
- </a>
1148
- </Typography>
1149
- </Box>
1150
- <Box>
1151
- <Typography
1152
- variant="pi"
1153
- fontWeight="bold"
1154
- marginBottom={2}
1155
- style={{ marginBottom: "12px" }}
1156
- >
1157
- Standard Credit Card Test Cards (without 3DS):
1158
- </Typography>
1159
- <Stack spacing={2}>
1160
- <Typography variant="pi">
1161
- • <strong>Visa:</strong> 4111111111111111
1162
- </Typography>
1163
- <Typography variant="pi">
1164
- • <strong>Mastercard:</strong> 5555555555554444
1165
- </Typography>
1166
- <Typography variant="pi">
1167
- • <strong>Amex:</strong> 378282246310005
1168
- </Typography>
1169
- <Typography variant="pi">
1170
- • <strong>Expiry:</strong> Any future date (e.g., 12/25
1171
- = "2512")
1172
- </Typography>
1173
- <Typography variant="pi">
1174
- • <strong>CVC:</strong> Any 3 digits (4 digits for Amex)
1175
- </Typography>
1176
- </Stack>
1177
- <Typography
1178
- variant="pi"
1179
- textColor="neutral600"
1180
- marginTop={2}
1181
- >
1182
- 📚 <strong>Payone Test Cards Documentation:</strong>{" "}
1183
- <a
1184
- href="https://docs.payone.com/display/public/PLATFORM/Credit+Card+Test+Cards"
1185
- target="_blank"
1186
- rel="noopener noreferrer"
1187
- >
1188
- https://docs.payone.com/display/public/PLATFORM/Credit+Card+Test+Cards
1189
- </a>
1190
- </Typography>
1191
- </Box>
1192
- <Box>
1193
- <Typography
1194
- variant="pi"
1195
- fontWeight="bold"
1196
- marginBottom={2}
1197
- style={{ marginBottom: "12px" }}
1198
- >
1199
- Example Flow:
1200
- </Typography>
1201
- <CodeBlock>{`// 1. Make payment request
1202
- const response = await fetch('/api/strapi-plugin-payone-provider/preauthorization', {
1203
- method: 'POST',
1204
- body: JSON.stringify({
1205
- amount: 1000,
1206
- currency: 'EUR',
1207
- clearingtype: 'cc',
1208
- cardtype: 'V',
1209
- cardpan: '4111111111111111',
1210
- cardexpiredate: '2512',
1211
- cardcvc2: '123',
1212
- successurl: 'https://yoursite.com/payment/success',
1213
- errorurl: 'https://yoursite.com/payment/error',
1214
- backurl: 'https://yoursite.com/payment/back',
1215
- // ... other params
1216
- })
1217
- });
1218
-
1219
- const result = await response.json();
1220
-
1221
- // 2. Check if 3DS redirect is required
1222
- if (result.status === 'REDIRECT' && result.redirecturl) {
1223
- // 3. Redirect user to 3DS authentication page
1224
- window.location.href = result.redirecturl;
1225
- }
1226
-
1227
- // 4. Handle callback (in your success/error/back URL handler)
1228
- // The callback will include transaction status and txid`}</CodeBlock>
1229
- </Box>
1230
- <Box>
1231
- <Typography
1232
- variant="pi"
1233
- textColor="neutral600"
1234
- marginTop={2}
1235
- >
1236
- 📚 <strong>Payone 3D Secure Documentation:</strong>{" "}
1237
- <a
1238
- href="https://docs.payone.com/display/public/PLATFORM/3D+Secure"
1239
- target="_blank"
1240
- rel="noopener noreferrer"
1241
- >
1242
- https://docs.payone.com/display/public/PLATFORM/3D+Secure
1243
- </a>
1244
- </Typography>
1245
- </Box>
1246
- </Stack>
1247
- </CardBody>
1248
- </Card>
1249
- </AccordionContent>
1250
- </Accordion>
1251
-
1252
- <Accordion
1253
- id="capture-refund"
1254
- expanded={expandedAccordions.captureRefund}
1255
- onToggle={() => toggleAccordion("captureRefund")}
1256
- >
1257
- <AccordionToggle title="Capture & Refund Operations" />
1258
- <AccordionContent>
1259
- <Card className="payment-card">
1260
- <CardBody padding={6}>
1261
- <Stack spacing={4}>
1262
- <Typography
1263
- variant="delta"
1264
- as="h3"
1265
- fontWeight="bold"
1266
- style={{ marginBottom: "12px" }}
1267
- >
1268
- Capture & Refund Operations
1269
- </Typography>
1270
- <Box>
1271
- <Typography
1272
- variant="pi"
1273
- fontWeight="bold"
1274
- marginBottom={2}
1275
- style={{ marginBottom: "12px" }}
1276
- >
1277
- Capture (Complete Preauthorized Transaction):
1278
- </Typography>
1279
- <CodeBlock>{`POST /api/strapi-plugin-payone-provider/capture
1280
-
1281
- {
1282
- "txid": "12345678",
1283
- "amount": 1000,
1284
- "currency": "EUR",
1285
- "reference": "CAPTURE-00123-ABCD",
1286
- "sequencenumber": 1,
1287
- "capturemode": "full" // For wallet payments: "full" or "partial"
1288
- }`}</CodeBlock>
1289
- <Typography
1290
- variant="pi"
1291
- textColor="neutral600"
1292
- marginTop={2}
1293
- >
1294
- <strong>Note:</strong> <code>capturemode</code> is only
1295
- required for wallet payments (PayPal, Google Pay, Apple
1296
- Pay).
1297
- </Typography>
1298
- </Box>
1299
- <Box>
1300
- <Typography
1301
- variant="pi"
1302
- fontWeight="bold"
1303
- marginBottom={2}
1304
- style={{ marginBottom: "12px" }}
1305
- >
1306
- Refund (Return Funds):
1307
- </Typography>
1308
- <CodeBlock>{`POST /api/strapi-plugin-payone-provider/refund
1309
-
1310
- {
1311
- "txid": "12345678",
1312
- "amount": -1000, // Negative amount for refund
1313
- "currency": "EUR",
1314
- "reference": "REFUND-00123-ABCD",
1315
- "sequencenumber": 2
1316
- }`}</CodeBlock>
1317
- <Typography
1318
- variant="pi"
1319
- textColor="neutral600"
1320
- marginTop={2}
1321
- >
1322
- <strong>Note:</strong> Refund amount must be negative.{" "}
1323
- <code>sequencenumber</code> should be incremented for each
1324
- operation on the same transaction.
1325
- </Typography>
1326
- </Box>
1327
- <Box>
1328
- <Typography
1329
- variant="pi"
1330
- fontWeight="bold"
1331
- marginBottom={2}
1332
- style={{ marginBottom: "12px" }}
1333
- >
1334
- Sequence Numbers:
1335
- </Typography>
1336
- <Stack spacing={2}>
1337
- <Typography variant="pi">
1338
- • <strong>Preauthorization:</strong> sequencenumber = 0
1339
- (default)
1340
- </Typography>
1341
- <Typography variant="pi">
1342
- • <strong>Capture:</strong> sequencenumber = 1 (first
1343
- capture)
1344
- </Typography>
1345
- <Typography variant="pi">
1346
- • <strong>Refund:</strong> sequencenumber = 2 (first
1347
- refund), 3 (second refund), etc.
1348
- </Typography>
1349
- </Stack>
1350
- </Box>
1351
- <Box>
1352
- <Typography
1353
- variant="pi"
1354
- textColor="neutral600"
1355
- marginTop={2}
1356
- >
1357
- 📚 <strong>Payone Capture Documentation:</strong>{" "}
1358
- <a
1359
- href="https://docs.payone.com/display/public/PLATFORM/Capture"
1360
- target="_blank"
1361
- rel="noopener noreferrer"
1362
- >
1363
- https://docs.payone.com/display/public/PLATFORM/Capture
1364
- </a>
1365
- </Typography>
1366
- </Box>
1367
- <Box>
1368
- <Typography
1369
- variant="pi"
1370
- textColor="neutral600"
1371
- marginTop={2}
1372
- >
1373
- 📚 <strong>Payone Refund Documentation:</strong>{" "}
1374
- <a
1375
- href="https://docs.payone.com/display/public/PLATFORM/Refund"
1376
- target="_blank"
1377
- rel="noopener noreferrer"
1378
- >
1379
- https://docs.payone.com/display/public/PLATFORM/Refund
1380
- </a>
1381
- </Typography>
1382
- </Box>
1383
- </Stack>
1384
- </CardBody>
1385
- </Card>
1386
- </AccordionContent>
1387
- </Accordion>
1388
-
1389
- <Accordion
1390
- id="test-credentials"
1391
- expanded={expandedAccordions.testCredentials}
1392
- onToggle={() => toggleAccordion("testCredentials")}
1393
- >
1394
- <AccordionToggle title="Test Credentials" />
1395
- <AccordionContent>
1396
- <Card className="payment-card">
1397
- <CardBody padding={6}>
1398
- <Stack spacing={4}>
1399
- <Typography
1400
- variant="delta"
1401
- as="h3"
1402
- fontWeight="bold"
1403
- style={{ marginBottom: "12px" }}
1404
- >
1405
- Test Credentials
1406
- </Typography>
1407
- <Box>
1408
- <Typography
1409
- variant="pi"
1410
- fontWeight="bold"
1411
- marginBottom={2}
1412
- style={{ marginBottom: "12px" }}
1413
- >
1414
- Credit Card Test Cards (Standard):
1415
- </Typography>
1416
- <Stack spacing={2}>
1417
- <Typography variant="pi">
1418
- • <strong>Visa:</strong> 4111111111111111
1419
- </Typography>
1420
- <Typography variant="pi">
1421
- • <strong>Mastercard:</strong> 5555555555554444
1422
- </Typography>
1423
- <Typography variant="pi">
1424
- • <strong>Amex:</strong> 378282246310005
1425
- </Typography>
1426
- <Typography variant="pi">
1427
- • <strong>Expiry:</strong> Any future date (e.g., 12/25
1428
- = "2512")
1429
- </Typography>
1430
- <Typography variant="pi">
1431
- • <strong>CVC:</strong> Any 3 digits (4 digits for Amex)
1432
- </Typography>
1433
- </Stack>
1434
- <Typography
1435
- variant="pi"
1436
- textColor="neutral600"
1437
- marginTop={2}
1438
- >
1439
- 📚 <strong>Payone Documentation:</strong>{" "}
1440
- <a
1441
- href="https://docs.payone.com/display/public/PLATFORM/Test+and+Live+Data"
1442
- target="_blank"
1443
- rel="noopener noreferrer"
1444
- >
1445
- https://docs.payone.com/display/public/PLATFORM/Test+and+Live+Data
1446
- </a>
1447
- </Typography>
1448
- </Box>
1449
- <Box>
1450
- <Typography
1451
- variant="pi"
1452
- fontWeight="bold"
1453
- marginBottom={2}
1454
- style={{ marginBottom: "12px" }}
1455
- >
1456
- 3D Secure Test Cards (Special Test Data):
1457
- </Typography>
1458
- <Stack spacing={2}>
1459
- <Typography variant="pi">
1460
- • <strong>Visa 3DS Test Card:</strong> 4000000000000002
1461
- </Typography>
1462
- <Typography variant="pi">
1463
- • <strong>Mastercard 3DS Test Card:</strong>{" "}
1464
- 5453010000059543
1465
- </Typography>
1466
- <Typography variant="pi">
1467
- • <strong>3DS Password:</strong> Usually "123456" or as
1468
- provided by Payone
1469
- </Typography>
1470
- <Typography variant="pi">
1471
- • <strong>Expiry:</strong> Any future date (e.g., 12/25
1472
- = "2512")
1473
- </Typography>
1474
- <Typography variant="pi">
1475
- • <strong>CVC:</strong> Any 3 digits
1476
- </Typography>
1477
- </Stack>
1478
- <Typography
1479
- variant="pi"
1480
- textColor="neutral600"
1481
- marginTop={2}
1482
- >
1483
- 📚 <strong>Payone 3D Secure Documentation:</strong>{" "}
1484
- <a
1485
- href="https://docs.payone.com/display/public/PLATFORM/3D+Secure"
1486
- target="_blank"
1487
- rel="noopener noreferrer"
1488
- >
1489
- https://docs.payone.com/display/public/PLATFORM/3D+Secure
1490
- </a>
1491
- </Typography>
1492
- </Box>
1493
- <Box>
1494
- <Typography
1495
- variant="pi"
1496
- fontWeight="bold"
1497
- marginBottom={2}
1498
- style={{ marginBottom: "12px" }}
1499
- >
1500
- PayPal Test Data:
1501
- </Typography>
1502
- <Stack spacing={2}>
1503
- <Typography variant="pi">
1504
- • Use PayPal Sandbox test accounts
1505
- </Typography>
1506
- <Typography variant="pi">
1507
- • Create test accounts in PayPal Developer Dashboard
1508
- </Typography>
1509
- <Typography variant="pi">
1510
- • Test with both buyer and merchant sandbox accounts
1511
- </Typography>
1512
- </Stack>
1513
- <Typography
1514
- variant="pi"
1515
- textColor="neutral600"
1516
- marginTop={2}
1517
- >
1518
- 📚 <strong>Payone PayPal Documentation:</strong>{" "}
1519
- <a
1520
- href="https://docs.payone.com/display/public/PLATFORM/PayPal"
1521
- target="_blank"
1522
- rel="noopener noreferrer"
1523
- >
1524
- https://docs.payone.com/display/public/PLATFORM/PayPal
1525
- </a>
1526
- </Typography>
1527
- </Box>
1528
- <Box>
1529
- <Typography
1530
- variant="pi"
1531
- fontWeight="bold"
1532
- marginBottom={2}
1533
- style={{ marginBottom: "12px" }}
1534
- >
1535
- Google Pay Test Data:
1536
- </Typography>
1537
- <Stack spacing={2}>
1538
- <Typography variant="pi">
1539
- • Use Google Pay test environment
1540
- </Typography>
1541
- <Typography variant="pi">
1542
- • Test cards are automatically provided by Google Pay
1543
- SDK
1544
- </Typography>
1545
- <Typography variant="pi">
1546
- • Set <code>environment: 'TEST'</code> in Google Pay
1547
- configuration
1548
- </Typography>
1549
- </Stack>
1550
- <Typography
1551
- variant="pi"
1552
- textColor="neutral600"
1553
- marginTop={2}
1554
- >
1555
- 📚 <strong>Payone Google Pay Documentation:</strong>{" "}
1556
- <a
1557
- href="https://docs.payone.com/display/public/PLATFORM/Google+Pay"
1558
- target="_blank"
1559
- rel="noopener noreferrer"
1560
- >
1561
- https://docs.payone.com/display/public/PLATFORM/Google+Pay
1562
- </a>
1563
- </Typography>
1564
- </Box>
1565
- <Box>
1566
- <Typography
1567
- variant="pi"
1568
- fontWeight="bold"
1569
- marginBottom={2}
1570
- style={{ marginBottom: "12px" }}
1571
- >
1572
- Apple Pay Test Data:
1573
- </Typography>
1574
- <Stack spacing={2}>
1575
- <Typography variant="pi">
1576
- • Use Apple Pay test environment
1577
- </Typography>
1578
- <Typography variant="pi">
1579
- • Test cards are available in Wallet app on test devices
1580
- </Typography>
1581
- <Typography variant="pi">
1582
- • Requires registered domain with HTTPS (not localhost)
1583
- </Typography>
1584
- </Stack>
1585
- <Typography
1586
- variant="pi"
1587
- textColor="neutral600"
1588
- marginTop={2}
1589
- >
1590
- 📚 <strong>Payone Apple Pay Documentation:</strong>{" "}
1591
- <a
1592
- href="https://docs.payone.com/display/public/PLATFORM/Apple+Pay"
1593
- target="_blank"
1594
- rel="noopener noreferrer"
1595
- >
1596
- https://docs.payone.com/display/public/PLATFORM/Apple+Pay
1597
- </a>
1598
- </Typography>
1599
- </Box>
1600
- <Box>
1601
- <Typography
1602
- variant="pi"
1603
- fontWeight="bold"
1604
- marginBottom={2}
1605
- style={{ marginBottom: "12px" }}
1606
- >
1607
- Sofort Banking Test Data:
1608
- </Typography>
1609
- <Stack spacing={2}>
1610
- <Typography variant="pi">
1611
- • Use Sofort test environment
1612
- </Typography>
1613
- <Typography variant="pi">
1614
- • Test credentials provided by Payone
1615
- </Typography>
1616
- </Stack>
1617
- <Typography
1618
- variant="pi"
1619
- textColor="neutral600"
1620
- marginTop={2}
1621
- >
1622
- 📚 <strong>Payone Sofort Documentation:</strong>{" "}
1623
- <a
1624
- href="https://docs.payone.com/display/public/PLATFORM/Sofort"
1625
- target="_blank"
1626
- rel="noopener noreferrer"
1627
- >
1628
- https://docs.payone.com/display/public/PLATFORM/Sofort
1629
- </a>
1630
- </Typography>
1631
- </Box>
1632
- <Box>
1633
- <Typography
1634
- variant="pi"
1635
- fontWeight="bold"
1636
- marginBottom={2}
1637
- style={{ marginBottom: "12px" }}
1638
- >
1639
- SEPA Direct Debit Test Data:
1640
- </Typography>
1641
- <Stack spacing={2}>
1642
- <Typography variant="pi">
1643
- • <strong>Test IBAN:</strong> DE89370400440532013000
1644
- </Typography>
1645
- <Typography variant="pi">
1646
- • <strong>Test BIC:</strong> COBADEFFXXX
1647
- </Typography>
1648
- <Typography variant="pi">
1649
- • <strong>Account Holder:</strong> Any test name
1650
- </Typography>
1651
- </Stack>
1652
- <Typography
1653
- variant="pi"
1654
- textColor="neutral600"
1655
- marginTop={2}
1656
- >
1657
- 📚 <strong>Payone SEPA Documentation:</strong>{" "}
1658
- <a
1659
- href="https://docs.payone.com/display/public/PLATFORM/SEPA+Direct+Debit"
1660
- target="_blank"
1661
- rel="noopener noreferrer"
1662
- >
1663
- https://docs.payone.com/display/public/PLATFORM/SEPA+Direct+Debit
1664
- </a>
1665
- </Typography>
1666
- </Box>
1667
- <Box>
1668
- <Typography
1669
- variant="pi"
1670
- fontWeight="bold"
1671
- marginBottom={2}
1672
- style={{ marginBottom: "12px" }}
1673
- >
1674
- General Test Data Resources:
1675
- </Typography>
1676
- <Stack spacing={2}>
1677
- <Typography variant="pi">
1678
- 📚 <strong>Payone Test Data Overview:</strong>{" "}
1679
- <a
1680
- href="https://docs.payone.com/display/public/PLATFORM/Test+and+Live+Data"
1681
- target="_blank"
1682
- rel="noopener noreferrer"
1683
- >
1684
- https://docs.payone.com/display/public/PLATFORM/Test+and+Live+Data
1685
- </a>
1686
- </Typography>
1687
- <Typography variant="pi">
1688
- 📚 <strong>Payone Test Cards:</strong>{" "}
1689
- <a
1690
- href="https://docs.payone.com/display/public/PLATFORM/Credit+Card+Test+Cards"
1691
- target="_blank"
1692
- rel="noopener noreferrer"
1693
- >
1694
- https://docs.payone.com/display/public/PLATFORM/Credit+Card+Test+Cards
1695
- </a>
1696
- </Typography>
1697
- <Typography variant="pi">
1698
- 📚 <strong>Payone Test Environment:</strong>{" "}
1699
- <a
1700
- href="https://docs.payone.com/display/public/PLATFORM/Test+Environment"
1701
- target="_blank"
1702
- rel="noopener noreferrer"
1703
- >
1704
- https://docs.payone.com/display/public/PLATFORM/Test+Environment
1705
- </a>
1706
- </Typography>
1707
- </Stack>
1708
- </Box>
1709
- </Stack>
1710
- </CardBody>
1711
- </Card>
1712
- </AccordionContent>
1713
- </Accordion>
1714
-
1715
- <Box paddingTop={4}>
1716
- <Typography variant="sigma" textColor="neutral600">
1717
- For more information, visit the Payone documentation or contact your
1718
- Payone account manager.
1719
- </Typography>
1720
- </Box>
1721
- </Flex>
1722
- </Box>
1723
- );
1724
- };
1725
-
1726
- export default DocsPanel;
1
+ import React, { useEffect, useState } from "react";
2
+ import {
3
+ Box,
4
+ Card,
5
+ CardBody,
6
+ Flex,
7
+ Typography,
8
+ Stack,
9
+ Accordion,
10
+ AccordionToggle,
11
+ AccordionContent,
12
+ } from "@strapi/design-system";
13
+
14
+ const CodeBlock = ({ children }) => {
15
+ const [isDark, setIsDark] = useState(false);
16
+
17
+ useEffect(() => {
18
+ const checkTheme = () => {
19
+ if (typeof window !== "undefined") {
20
+ const bodyBg = window.getComputedStyle(document.body).backgroundColor;
21
+ const rgb = bodyBg.match(/\d+/g);
22
+ if (rgb && rgb.length >= 3) {
23
+ const brightness =
24
+ (parseInt(rgb[0]) * 299 +
25
+ parseInt(rgb[1]) * 587 +
26
+ parseInt(rgb[2]) * 114) /
27
+ 1000;
28
+ setIsDark(brightness < 128);
29
+ } else {
30
+ const prefersDark =
31
+ window.matchMedia &&
32
+ window.matchMedia("(prefers-color-scheme: dark)").matches;
33
+ setIsDark(prefersDark);
34
+ }
35
+ }
36
+ };
37
+
38
+ checkTheme();
39
+ const mediaQuery =
40
+ window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)");
41
+ if (mediaQuery) {
42
+ mediaQuery.addEventListener("change", checkTheme);
43
+ return () => mediaQuery.removeEventListener("change", checkTheme);
44
+ }
45
+ }, []);
46
+
47
+ return (
48
+ <Box
49
+ padding={3}
50
+ borderRadius="4px"
51
+ style={{
52
+ backgroundColor: isDark ? "#1e1e1e" : "#f6f6f9",
53
+ color: isDark ? "#d4d4d4" : "#32324d",
54
+ fontFamily: "monospace",
55
+ fontSize: "14px",
56
+ overflow: "auto",
57
+ }}
58
+ >
59
+ <pre
60
+ style={{ margin: 0, whiteSpace: "pre-wrap", wordBreak: "break-word" }}
61
+ >
62
+ {children}
63
+ </pre>
64
+ </Box>
65
+ );
66
+ };
67
+
68
+ const DocsPanel = () => {
69
+ const [expandedAccordions, setExpandedAccordions] = useState({
70
+ toc: false,
71
+ creditCard: false,
72
+ paypal: false,
73
+ googlePay: false,
74
+ applePay: false,
75
+ threeDSecure: false,
76
+ captureRefund: false,
77
+ testCredentials: false,
78
+ });
79
+
80
+ const toggleAccordion = (key) => {
81
+ setExpandedAccordions((prev) => ({
82
+ ...prev,
83
+ [key]: !prev[key],
84
+ }));
85
+ };
86
+
87
+ return (
88
+ <Box
89
+ className="payment-container"
90
+ paddingTop={8}
91
+ paddingBottom={8}
92
+ paddingLeft={8}
93
+ paddingRight={8}
94
+ >
95
+ <Flex direction="column" alignItems="stretch" gap={6}>
96
+ <Box>
97
+ <Typography
98
+ variant="beta"
99
+ as="h2"
100
+ fontWeight="bold"
101
+ className="payment-title"
102
+ style={{ fontSize: "24px", marginBottom: "12px" }}
103
+ >
104
+ Payone Provider Plugin - Frontend Integration Guide
105
+ </Typography>
106
+ <Typography
107
+ variant="pi"
108
+ textColor="neutral600"
109
+ marginTop={2}
110
+ className="payment-subtitle"
111
+ style={{ fontSize: "16px" }}
112
+ >
113
+ Complete documentation for integrating Payone payment methods in
114
+ your frontend application
115
+ </Typography>
116
+ </Box>
117
+
118
+ <Accordion
119
+ expanded={expandedAccordions.toc}
120
+ onToggle={() => toggleAccordion("toc")}
121
+ >
122
+ <AccordionToggle title="Table of Contents" />
123
+ <AccordionContent>
124
+ <Stack spacing={2} padding={4}>
125
+ <Typography variant="pi">
126
+ 1. <a href="#base-url">Base URL & Authentication</a>
127
+ </Typography>
128
+ <Typography variant="pi">
129
+ 2. <a href="#payment-methods">Supported Payment Methods</a>
130
+ </Typography>
131
+ <Typography variant="pi">
132
+ 3. <a href="#credit-card">Credit Card Integration</a>
133
+ </Typography>
134
+ <Typography variant="pi">
135
+ 4. <a href="#paypal">PayPal Integration</a>
136
+ </Typography>
137
+ <Typography variant="pi">
138
+ 5. <a href="#google-pay">Google Pay Integration</a>
139
+ </Typography>
140
+ <Typography variant="pi">
141
+ 6. <a href="#apple-pay">Apple Pay Integration</a>
142
+ </Typography>
143
+ <Typography variant="pi">
144
+ 7. <a href="#3d-secure">3D Secure Authentication</a>
145
+ </Typography>
146
+ <Typography variant="pi">
147
+ 8. <a href="#capture-refund">Capture & Refund Operations</a>
148
+ </Typography>
149
+ <Typography variant="pi">
150
+ 9. <a href="#test-credentials">Test Credentials</a>
151
+ </Typography>
152
+ </Stack>
153
+ </AccordionContent>
154
+ </Accordion>
155
+
156
+ <Card className="payment-card" id="base-url">
157
+ <CardBody padding={6}>
158
+ <Stack spacing={4}>
159
+ <Typography
160
+ variant="delta"
161
+ as="h3"
162
+ fontWeight="bold"
163
+ style={{ marginBottom: "12px" }}
164
+ >
165
+ Base URL & Authentication
166
+ </Typography>
167
+ <Box>
168
+ <Typography variant="pi" fontWeight="bold" marginBottom={2}>
169
+ Content API (Frontend):
170
+ </Typography>
171
+ <CodeBlock>/api/strapi-plugin-payone-provider</CodeBlock>
172
+ </Box>
173
+ <Box>
174
+ <Typography variant="pi" fontWeight="bold" marginBottom={2}>
175
+ Required Headers:
176
+ </Typography>
177
+ <CodeBlock>{`{
178
+ "Content-Type": "application/json",
179
+ "Authorization": "Bearer YOUR_AUTH_TOKEN"
180
+ }`}</CodeBlock>
181
+ <Typography variant="pi" textColor="neutral600" marginTop={6}>
182
+ <strong>Note:</strong> <code>YOUR_AUTH_TOKEN</code> is your
183
+ Strapi authentication token (JWT), not a Payone token. You can
184
+ get this token by logging into Strapi admin panel or using
185
+ Strapi's authentication API.
186
+ </Typography>
187
+ </Box>
188
+ </Stack>
189
+ </CardBody>
190
+ </Card>
191
+
192
+ <Card className="payment-card" id="payment-methods">
193
+ <CardBody padding={6}>
194
+ <Stack spacing={4}>
195
+ <Typography
196
+ variant="delta"
197
+ as="h3"
198
+ fontWeight="bold"
199
+ style={{ marginBottom: "12px" }}
200
+ >
201
+ Supported Payment Methods
202
+ </Typography>
203
+ <Box>
204
+ <Typography variant="pi" fontWeight="bold" marginBottom={2}>
205
+ Available Payment Methods:
206
+ </Typography>
207
+ <Stack spacing={2}>
208
+ <Typography variant="pi">
209
+ • <strong>cc</strong> - Credit Card (Visa, Mastercard, Amex)
210
+ </Typography>
211
+ <Typography variant="pi">
212
+ • <strong>wlt</strong> - PayPal
213
+ </Typography>
214
+ <Typography variant="pi">
215
+ • <strong>gpp</strong> - Google Pay
216
+ </Typography>
217
+ <Typography variant="pi">
218
+ • <strong>apl</strong> - Apple Pay
219
+ </Typography>
220
+ <Typography variant="pi">
221
+ • <strong>sb</strong> - Sofort Banking
222
+ </Typography>
223
+ <Typography variant="pi">
224
+ • <strong>elv</strong> - SEPA Direct Debit
225
+ </Typography>
226
+ </Stack>
227
+ </Box>
228
+ <Box>
229
+ <Typography variant="pi" fontWeight="bold" marginBottom={2}>
230
+ Available Card Types (for Credit Card):
231
+ </Typography>
232
+ <Stack spacing={2}>
233
+ <Typography variant="pi">
234
+ • <strong>V</strong> - Visa
235
+ </Typography>
236
+ <Typography variant="pi">
237
+ • <strong>M</strong> - Mastercard
238
+ </Typography>
239
+ <Typography variant="pi">
240
+ • <strong>A</strong> - American Express (Amex)
241
+ </Typography>
242
+ </Stack>
243
+ </Box>
244
+ </Stack>
245
+ </CardBody>
246
+ </Card>
247
+
248
+ <Accordion
249
+ id="credit-card"
250
+ expanded={expandedAccordions.creditCard}
251
+ onToggle={() => toggleAccordion("creditCard")}
252
+ >
253
+ <AccordionToggle title="Credit Card Integration" />
254
+ <AccordionContent>
255
+ <Card className="payment-card">
256
+ <CardBody padding={6}>
257
+ <Stack spacing={4}>
258
+ <Typography
259
+ variant="delta"
260
+ as="h3"
261
+ fontWeight="bold"
262
+ style={{ marginBottom: "12px" }}
263
+ >
264
+ Credit Card Integration
265
+ </Typography>
266
+ <Box>
267
+ <Typography
268
+ variant="pi"
269
+ fontWeight="bold"
270
+ marginBottom={2}
271
+ style={{ marginBottom: "12px" }}
272
+ >
273
+ Preauthorization Request:
274
+ </Typography>
275
+ <CodeBlock>{`POST /api/strapi-plugin-payone-provider/preauthorization
276
+
277
+ {
278
+ "amount": 1000,
279
+ "currency": "EUR",
280
+ "reference": "ORD-00123-ABCD",
281
+ "clearingtype": "cc",
282
+ "cardtype": "V",
283
+ "cardpan": "4111111111111111",
284
+ "cardexpiredate": "2512",
285
+ "cardcvc2": "123",
286
+ "firstname": "John",
287
+ "lastname": "Doe",
288
+ "email": "john.doe@example.com",
289
+ "street": "Main Street 123",
290
+ "zip": "12345",
291
+ "city": "Berlin",
292
+ "country": "DE",
293
+ "successurl": "https://www.example.com/success",
294
+ "errorurl": "https://www.example.com/error",
295
+ "backurl": "https://www.example.com/back"
296
+ }`}</CodeBlock>
297
+ </Box>
298
+ <Box>
299
+ <Typography
300
+ variant="pi"
301
+ fontWeight="bold"
302
+ marginBottom={2}
303
+ style={{ marginBottom: "12px" }}
304
+ >
305
+ Response (Success):
306
+ </Typography>
307
+ <CodeBlock>{`{
308
+ "status": "APPROVED",
309
+ "txid": "12345678",
310
+ "reference": "ORD-00123-ABCD",
311
+ "amount": 1000,
312
+ "currency": "EUR"
313
+ }`}</CodeBlock>
314
+ </Box>
315
+ <Box>
316
+ <Typography
317
+ variant="pi"
318
+ fontWeight="bold"
319
+ marginBottom={2}
320
+ style={{ marginBottom: "12px" }}
321
+ >
322
+ Response (3D Secure Redirect):
323
+ </Typography>
324
+ <CodeBlock>{`{
325
+ "status": "REDIRECT",
326
+ "redirecturl": "https://secure.pay1.de/3ds/...",
327
+ "requires3DSRedirect": true
328
+ }`}</CodeBlock>
329
+ <Typography
330
+ variant="pi"
331
+ textColor="neutral600"
332
+ marginTop={2}
333
+ >
334
+ ⚠️ When 3D Secure is enabled, you must redirect the user
335
+ to the <code>redirecturl</code> for authentication.
336
+ </Typography>
337
+ </Box>
338
+ <Box>
339
+ <Typography
340
+ variant="pi"
341
+ textColor="neutral600"
342
+ marginTop={2}
343
+ >
344
+ 📚 <strong>Payone Credit Card Documentation:</strong>{" "}
345
+ <a
346
+ href="https://docs.payone.com/display/public/PLATFORM/Credit+Card"
347
+ target="_blank"
348
+ rel="noopener noreferrer"
349
+ >
350
+ https://docs.payone.com/display/public/PLATFORM/Credit+Card
351
+ </a>
352
+ </Typography>
353
+ </Box>
354
+ </Stack>
355
+ </CardBody>
356
+ </Card>
357
+ </AccordionContent>
358
+ </Accordion>
359
+
360
+ <Accordion
361
+ id="paypal"
362
+ expanded={expandedAccordions.paypal}
363
+ onToggle={() => toggleAccordion("paypal")}
364
+ >
365
+ <AccordionToggle title="PayPal Integration" />
366
+ <AccordionContent>
367
+ <Card className="payment-card">
368
+ <CardBody padding={6}>
369
+ <Stack spacing={4}>
370
+ <Typography
371
+ variant="delta"
372
+ as="h3"
373
+ fontWeight="bold"
374
+ style={{ marginBottom: "12px" }}
375
+ >
376
+ PayPal Integration
377
+ </Typography>
378
+ <Box>
379
+ <Typography
380
+ variant="pi"
381
+ fontWeight="bold"
382
+ marginBottom={2}
383
+ style={{ marginBottom: "12px" }}
384
+ >
385
+ Required Parameters:
386
+ </Typography>
387
+ <Stack spacing={2}>
388
+ <Typography variant="pi">
389
+ • <strong>clearingtype</strong>: "wlt"
390
+ </Typography>
391
+ <Typography variant="pi">
392
+ • <strong>wallettype</strong>: "PPE" (PayPal Express)
393
+ </Typography>
394
+ <Typography variant="pi">
395
+ • <strong>shipping_firstname</strong>,{" "}
396
+ <strong>shipping_lastname</strong>,{" "}
397
+ <strong>shipping_street</strong>,{" "}
398
+ <strong>shipping_zip</strong>,{" "}
399
+ <strong>shipping_city</strong>,{" "}
400
+ <strong>shipping_country</strong> - Shipping address
401
+ </Typography>
402
+ </Stack>
403
+ </Box>
404
+ <Box>
405
+ <Typography
406
+ variant="pi"
407
+ fontWeight="bold"
408
+ marginBottom={2}
409
+ style={{ marginBottom: "12px" }}
410
+ >
411
+ Preauthorization Request:
412
+ </Typography>
413
+ <CodeBlock>{`POST /api/strapi-plugin-payone-provider/preauthorization
414
+
415
+ {
416
+ "amount": 1000,
417
+ "currency": "EUR",
418
+ "reference": "ORD-00123-ABCD",
419
+ "clearingtype": "wlt",
420
+ "wallettype": "PPE",
421
+ "firstname": "John",
422
+ "lastname": "Doe",
423
+ "email": "john.doe@example.com",
424
+ "street": "Main Street 123",
425
+ "zip": "12345",
426
+ "city": "Berlin",
427
+ "country": "DE",
428
+ "shipping_firstname": "John",
429
+ "shipping_lastname": "Doe",
430
+ "shipping_street": "Main Street 123",
431
+ "shipping_zip": "12345",
432
+ "shipping_city": "Berlin",
433
+ "shipping_country": "DE",
434
+ "successurl": "https://www.example.com/success",
435
+ "errorurl": "https://www.example.com/error",
436
+ "backurl": "https://www.example.com/back"
437
+ }`}</CodeBlock>
438
+ </Box>
439
+ <Box>
440
+ <Typography
441
+ variant="pi"
442
+ fontWeight="bold"
443
+ marginBottom={2}
444
+ style={{ marginBottom: "12px" }}
445
+ >
446
+ Response (Redirect to PayPal):
447
+ </Typography>
448
+ <CodeBlock>{`{
449
+ "status": "REDIRECT",
450
+ "redirecturl": "https://www.paypal.com/checkoutnow?token=..."
451
+ }`}</CodeBlock>
452
+ <Typography
453
+ variant="pi"
454
+ textColor="neutral600"
455
+ marginTop={2}
456
+ >
457
+ ⚠️ PayPal always redirects. You must redirect the user to{" "}
458
+ <code>redirecturl</code> to complete the payment.
459
+ </Typography>
460
+ </Box>
461
+ <Box>
462
+ <Typography
463
+ variant="pi"
464
+ fontWeight="bold"
465
+ marginBottom={2}
466
+ style={{ marginBottom: "12px" }}
467
+ >
468
+ PayPal Callback Response (after redirect):
469
+ </Typography>
470
+ <CodeBlock>{`{
471
+ "status": "APPROVED",
472
+ "txid": "12345678",
473
+ "reference": "ORD-00123-ABCD"
474
+ }`}</CodeBlock>
475
+ </Box>
476
+ <Box>
477
+ <Typography
478
+ variant="pi"
479
+ textColor="neutral600"
480
+ marginTop={2}
481
+ >
482
+ 📚 <strong>Payone PayPal Documentation:</strong>{" "}
483
+ <a
484
+ href="https://docs.payone.com/display/public/PLATFORM/PayPal"
485
+ target="_blank"
486
+ rel="noopener noreferrer"
487
+ >
488
+ https://docs.payone.com/display/public/PLATFORM/PayPal
489
+ </a>
490
+ </Typography>
491
+ </Box>
492
+ </Stack>
493
+ </CardBody>
494
+ </Card>
495
+ </AccordionContent>
496
+ </Accordion>
497
+
498
+ <Accordion
499
+ id="google-pay"
500
+ expanded={expandedAccordions.googlePay}
501
+ onToggle={() => toggleAccordion("googlePay")}
502
+ >
503
+ <AccordionToggle title="Google Pay Integration" />
504
+ <AccordionContent>
505
+ <Card className="payment-card">
506
+ <CardBody padding={6}>
507
+ <Stack spacing={4}>
508
+ <Typography
509
+ variant="delta"
510
+ as="h3"
511
+ fontWeight="bold"
512
+ style={{ marginBottom: "12px" }}
513
+ >
514
+ Google Pay Integration
515
+ </Typography>
516
+ <Box>
517
+ <Typography
518
+ variant="pi"
519
+ fontWeight="bold"
520
+ marginBottom={2}
521
+ style={{ marginBottom: "12px" }}
522
+ >
523
+ Step 1: Configure Strapi Middleware
524
+ </Typography>
525
+ <Typography variant="pi" marginBottom={2}>
526
+ Add Google Pay SDK to your{" "}
527
+ <code>config/middlewares.js</code>:
528
+ </Typography>
529
+ <CodeBlock>{`module.exports = [
530
+ 'strapi::logger',
531
+ 'strapi::errors',
532
+ {
533
+ name: 'strapi::security',
534
+ config: {
535
+ contentSecurityPolicy: {
536
+ useDefaults: true,
537
+ directives: {
538
+ 'script-src': [
539
+ "'self'",
540
+ "'unsafe-inline'",
541
+ "'unsafe-eval'",
542
+ 'https://pay.google.com',
543
+ ],
544
+ 'connect-src': [
545
+ "'self'",
546
+ 'https:',
547
+ 'https://pay.google.com',
548
+ ],
549
+ 'frame-src': [
550
+ "'self'",
551
+ 'https://pay.google.com',
552
+ ],
553
+ },
554
+ },
555
+ },
556
+ },
557
+ // ... other middlewares
558
+ ];`}</CodeBlock>
559
+ </Box>
560
+ <Box>
561
+ <Typography
562
+ variant="pi"
563
+ fontWeight="bold"
564
+ marginBottom={2}
565
+ style={{ marginBottom: "12px" }}
566
+ >
567
+ Step 2: Install Google Pay Button Library (Optional)
568
+ </Typography>
569
+ <CodeBlock>npm install @google-pay/button-react</CodeBlock>
570
+ </Box>
571
+ <Box>
572
+ <Typography
573
+ variant="pi"
574
+ fontWeight="bold"
575
+ marginBottom={2}
576
+ style={{ marginBottom: "12px" }}
577
+ >
578
+ Step 3: Implement Google Pay Button (Using NPM Library)
579
+ </Typography>
580
+ <CodeBlock>{`import { GooglePayButton } from '@google-pay/button-react';
581
+
582
+ function PaymentForm() {
583
+ const handleGooglePay = async (paymentData) => {
584
+ const token = paymentData.paymentMethodData.tokenizationData.token;
585
+
586
+ // Send token to your backend
587
+ const response = await fetch('/api/strapi-plugin-payone-provider/preauthorization', {
588
+ method: 'POST',
589
+ headers: {
590
+ 'Content-Type': 'application/json',
591
+ 'Authorization': 'Bearer YOUR_TOKEN'
592
+ },
593
+ body: JSON.stringify({
594
+ amount: 1000,
595
+ currency: 'EUR',
596
+ reference: 'ORD-00123-ABCD',
597
+ clearingtype: 'wlt',
598
+ wallettype: 'GGP',
599
+ 'add_paydata[paymentmethod_token_data]': token,
600
+ 'add_paydata[paymentmethod]': 'GGP',
601
+ 'add_paydata[paymentmethod_type]': 'GOOGLEPAY',
602
+ 'add_paydata[gatewayid]': 'payonegmbh',
603
+ firstname: 'John',
604
+ lastname: 'Doe',
605
+ email: 'john.doe@example.com',
606
+ street: 'Main Street 123',
607
+ zip: '12345',
608
+ city: 'Berlin',
609
+ country: 'DE',
610
+ shipping_firstname: 'John',
611
+ shipping_lastname: 'Doe',
612
+ shipping_street: 'Main Street 123',
613
+ shipping_zip: '12345',
614
+ shipping_city: 'Berlin',
615
+ shipping_country: 'DE'
616
+ })
617
+ });
618
+
619
+ const result = await response.json();
620
+ };
621
+
622
+ return (
623
+ <GooglePayButton
624
+ environment="TEST"
625
+ paymentRequest={{
626
+ apiVersion: 2,
627
+ apiVersionMinor: 0,
628
+ allowedPaymentMethods: [{
629
+ type: 'CARD',
630
+ parameters: {
631
+ allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
632
+ allowedCardNetworks: ['MASTERCARD', 'VISA']
633
+ },
634
+ tokenizationSpecification: {
635
+ type: 'PAYMENT_GATEWAY',
636
+ parameters: {
637
+ gateway: 'payonegmbh',
638
+ gatewayMerchantId: 'YOUR_MERCHANT_ID'
639
+ }
640
+ }
641
+ }],
642
+ merchantInfo: {
643
+ merchantId: 'YOUR_MERCHANT_ID',
644
+ merchantName: 'Your Store Name'
645
+ },
646
+ transactionInfo: {
647
+ totalPriceStatus: 'FINAL',
648
+ totalPriceLabel: 'Total',
649
+ totalPrice: '10.00',
650
+ currencyCode: 'EUR',
651
+ countryCode: 'DE'
652
+ }
653
+ }}
654
+ onLoadPaymentData={handleGooglePay}
655
+ />
656
+ );
657
+ }`}</CodeBlock>
658
+ </Box>
659
+ <Box>
660
+ <Typography
661
+ variant="pi"
662
+ fontWeight="bold"
663
+ marginBottom={2}
664
+ style={{ marginBottom: "12px" }}
665
+ >
666
+ Step 4: Manual Implementation
667
+ </Typography>
668
+ <CodeBlock>{`// Load Google Pay SDK
669
+ <script src="https://pay.google.com/gp/p/js/pay.js"></script>
670
+
671
+ // Initialize Google Pay
672
+ const paymentsClient = new google.payments.api.PaymentsClient({
673
+ environment: 'TEST' // or 'PRODUCTION'
674
+ });
675
+
676
+ // Create payment request
677
+ const paymentRequest = {
678
+ apiVersion: 2,
679
+ apiVersionMinor: 0,
680
+ allowedPaymentMethods: [{
681
+ type: 'CARD',
682
+ parameters: {
683
+ allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
684
+ allowedCardNetworks: ['MASTERCARD', 'VISA']
685
+ },
686
+ tokenizationSpecification: {
687
+ type: 'PAYMENT_GATEWAY',
688
+ parameters: {
689
+ gateway: 'payonegmbh',
690
+ gatewayMerchantId: 'YOUR_MERCHANT_ID'
691
+ }
692
+ }
693
+ }],
694
+ merchantInfo: {
695
+ merchantId: 'YOUR_MERCHANT_ID',
696
+ merchantName: 'Your Store Name'
697
+ },
698
+ transactionInfo: {
699
+ totalPriceStatus: 'FINAL',
700
+ totalPrice: '10.00',
701
+ currencyCode: 'EUR',
702
+ countryCode: 'DE'
703
+ }
704
+ };
705
+
706
+ // Check if Google Pay is available
707
+ paymentsClient.isReadyToPay(paymentRequest).then((response) => {
708
+ if (response.result) {
709
+ // Show Google Pay button
710
+ paymentsClient.loadPaymentData(paymentRequest).then((paymentData) => {
711
+ const token = paymentData.paymentMethodData.tokenizationData.token;
712
+ // Send token to backend
713
+ sendTokenToBackend(token);
714
+ });
715
+ }
716
+ });`}</CodeBlock>
717
+ </Box>
718
+ <Box>
719
+ <Typography
720
+ variant="pi"
721
+ fontWeight="bold"
722
+ marginBottom={2}
723
+ style={{ marginBottom: "12px" }}
724
+ >
725
+ Token Parameters (Backend Request):
726
+ </Typography>
727
+ <CodeBlock>{`{
728
+ "amount": 1000,
729
+ "currency": "EUR",
730
+ "reference": "ORD-00123-ABCD",
731
+ "clearingtype": "wlt",
732
+ "wallettype": "GGP",
733
+ "add_paydata[paymentmethod_token_data]": "TOKEN_FROM_GOOGLE_PAY",
734
+ "add_paydata[paymentmethod]": "GGP",
735
+ "add_paydata[paymentmethod_type]": "GOOGLEPAY",
736
+ "add_paydata[gatewayid]": "payonegmbh",
737
+ "add_paydata[gateway_merchantid]": "YOUR_MERCHANT_ID",
738
+ // ... customer and shipping info
739
+ }`}</CodeBlock>
740
+ </Box>
741
+ <Box>
742
+ <Typography
743
+ variant="pi"
744
+ textColor="neutral600"
745
+ marginTop={2}
746
+ >
747
+ 📚 <strong>Payone Google Pay Documentation:</strong>{" "}
748
+ <a
749
+ href="https://docs.payone.com/display/public/PLATFORM/Google+Pay"
750
+ target="_blank"
751
+ rel="noopener noreferrer"
752
+ >
753
+ https://docs.payone.com/display/public/PLATFORM/Google+Pay
754
+ </a>
755
+ </Typography>
756
+ </Box>
757
+ </Stack>
758
+ </CardBody>
759
+ </Card>
760
+ </AccordionContent>
761
+ </Accordion>
762
+
763
+ <Accordion
764
+ id="apple-pay"
765
+ expanded={expandedAccordions.applePay}
766
+ onToggle={() => toggleAccordion("applePay")}
767
+ >
768
+ <AccordionToggle title="Apple Pay Integration" />
769
+ <AccordionContent>
770
+ <Card className="payment-card">
771
+ <CardBody padding={6}>
772
+ <Stack spacing={4}>
773
+ <Typography
774
+ variant="delta"
775
+ as="h3"
776
+ fontWeight="bold"
777
+ style={{ marginBottom: "12px" }}
778
+ >
779
+ Apple Pay Integration
780
+ </Typography>
781
+ <Box>
782
+ <Typography
783
+ variant="pi"
784
+ fontWeight="bold"
785
+ marginBottom={2}
786
+ textColor="danger600"
787
+ style={{ marginBottom: "12px", marginRight: "6px" }}
788
+ >
789
+ ⚠️ Important: Apple Pay does NOT work on localhost
790
+ </Typography>
791
+ <Typography variant="pi" textColor="neutral600">
792
+ Apple Pay requires a registered domain with HTTPS. For
793
+ testing, use a production domain with HTTPS or test on a
794
+ device with Safari (iOS/macOS).
795
+ </Typography>
796
+ </Box>
797
+ <Box>
798
+ <Typography
799
+ variant="pi"
800
+ fontWeight="bold"
801
+ marginBottom={2}
802
+ style={{ marginBottom: "12px" }}
803
+ >
804
+ Step 1: Configure Strapi Middleware
805
+ </Typography>
806
+ <Typography variant="pi" marginBottom={2}>
807
+ Add Apple Pay SDK to your{" "}
808
+ <code>config/middlewares.js</code>:
809
+ </Typography>
810
+ <CodeBlock>{`module.exports = [
811
+ 'strapi::logger',
812
+ 'strapi::errors',
813
+ {
814
+ name: 'strapi::security',
815
+ config: {
816
+ contentSecurityPolicy: {
817
+ useDefaults: true,
818
+ directives: {
819
+ 'script-src': [
820
+ "'self'",
821
+ "'unsafe-inline'",
822
+ "'unsafe-eval'",
823
+ 'https://applepay.cdn-apple.com',
824
+ 'https://www.apple.com',
825
+ ],
826
+ 'connect-src': [
827
+ "'self'",
828
+ 'https:',
829
+ 'https://applepay.cdn-apple.com',
830
+ 'https://www.apple.com',
831
+ ],
832
+ 'frame-src': [
833
+ "'self'",
834
+ 'https://applepay.cdn-apple.com',
835
+ ],
836
+ },
837
+ },
838
+ },
839
+ },
840
+ // ... other middlewares
841
+ ];`}</CodeBlock>
842
+ </Box>
843
+ <Box>
844
+ <Typography
845
+ variant="pi"
846
+ fontWeight="bold"
847
+ marginBottom={2}
848
+ style={{ marginBottom: "12px" }}
849
+ >
850
+ Step 2: Setup .well-known File
851
+ </Typography>
852
+ <Typography variant="pi" marginBottom={2}>
853
+ Download the Apple Pay domain verification file from
854
+ Payone documentation:{" "}
855
+ <a
856
+ href="https://docs.payone.com/payment-methods/apple-pay/apple-pay-without-dev"
857
+ target="_blank"
858
+ rel="noopener noreferrer"
859
+ style={{
860
+ color: "#0066ff",
861
+ textDecoration: "underline",
862
+ }}
863
+ >
864
+ https://docs.payone.com/payment-methods/apple-pay/apple-pay-without-dev
865
+ </a>{" "}
866
+ or from your Payone merchant portal and place it:
867
+ </Typography>
868
+ <Stack spacing={2} marginBottom={2}>
869
+ <Typography variant="pi">
870
+ <strong>In Strapi:</strong>{" "}
871
+ <code>
872
+ public/.well-known/apple-developer-merchantid-domain-association
873
+ </code>
874
+ </Typography>
875
+ <Typography variant="pi">
876
+ <strong>In Frontend:</strong>{" "}
877
+ <code>
878
+ public/.well-known/apple-developer-merchantid-domain-association
879
+ </code>
880
+ </Typography>
881
+ </Stack>
882
+ <Typography
883
+ variant="pi"
884
+ textColor="neutral600"
885
+ marginTop={2}
886
+ >
887
+ The file must be accessible at:{" "}
888
+ <code>
889
+ https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association
890
+ </code>
891
+ </Typography>
892
+ <Typography
893
+ variant="pi"
894
+ textColor="neutral600"
895
+ marginTop={2}
896
+ >
897
+ <strong>Alternative Download:</strong> Log into your
898
+ Payone Merchant Interface (PMI) → Configuration → Payment
899
+ Portals → Apple Pay → Download domain verification file
900
+ </Typography>
901
+ </Box>
902
+ <Box>
903
+ <Typography
904
+ variant="pi"
905
+ fontWeight="bold"
906
+ marginBottom={2}
907
+ style={{ marginBottom: "12px" }}
908
+ >
909
+ Step 3: Implement Apple Pay Button
910
+ </Typography>
911
+ <CodeBlock>{`// Load Apple Pay SDK
912
+ <script src="https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js"></script>
913
+
914
+ // Check if Apple Pay is available
915
+ if (window.ApplePaySession && ApplePaySession.canMakePayments()) {
916
+ // Create payment request
917
+ const paymentRequest = {
918
+ countryCode: 'DE',
919
+ currencyCode: 'EUR',
920
+ supportedNetworks: ['visa', 'masterCard', 'amex'],
921
+ merchantCapabilities: ['supports3DS'],
922
+ total: {
923
+ label: 'Your Store',
924
+ amount: '10.00'
925
+ }
926
+ };
927
+
928
+ // Create session
929
+ const session = new ApplePaySession(3, paymentRequest);
930
+
931
+ // Handle merchant validation
932
+ session.onmerchantvalidation = async (event) => {
933
+ const validationURL = event.validationURL;
934
+
935
+ // Call your backend to validate merchant
936
+ const response = await fetch('/api/strapi-plugin-payone-provider/validate-apple-pay-merchant', {
937
+ method: 'POST',
938
+ headers: {
939
+ 'Content-Type': 'application/json',
940
+ 'Authorization': 'Bearer YOUR_TOKEN'
941
+ },
942
+ body: JSON.stringify({
943
+ validationURL: validationURL,
944
+ displayName: 'Your Store Name',
945
+ domainName: window.location.hostname
946
+ })
947
+ });
948
+
949
+ const merchantSession = await response.json();
950
+ session.completeMerchantValidation(merchantSession);
951
+ };
952
+
953
+ // Handle payment authorization
954
+ session.onpaymentauthorized = async (event) => {
955
+ const payment = event.payment;
956
+ const token = payment.token;
957
+
958
+ // Send token to backend
959
+ const response = await fetch('/api/strapi-plugin-payone-provider/preauthorization', {
960
+ method: 'POST',
961
+ headers: {
962
+ 'Content-Type': 'application/json',
963
+ 'Authorization': 'Bearer YOUR_TOKEN'
964
+ },
965
+ body: JSON.stringify({
966
+ amount: 1000,
967
+ currency: 'EUR',
968
+ reference: 'ORD-00123-ABCD',
969
+ clearingtype: 'wlt',
970
+ wallettype: 'APL',
971
+ 'add_paydata[paymentmethod_token_data]': JSON.stringify(token),
972
+ 'add_paydata[paymentmethod]': 'APL',
973
+ 'add_paydata[paymentmethod_type]': 'APPLEPAY',
974
+ 'add_paydata[gatewayid]': 'payonegmbh',
975
+ firstname: payment.billingContact.givenName || 'John',
976
+ lastname: payment.billingContact.familyName || 'Doe',
977
+ email: payment.billingContact.emailAddress || 'john.doe@example.com',
978
+ street: payment.billingContact.addressLines?.[0] || 'Main Street 123',
979
+ zip: payment.billingContact.postalCode || '12345',
980
+ city: payment.billingContact.locality || 'Berlin',
981
+ country: payment.billingContact.countryCode || 'DE',
982
+ shipping_firstname: payment.shippingContact?.givenName || payment.billingContact.givenName || 'John',
983
+ shipping_lastname: payment.shippingContact?.familyName || payment.billingContact.familyName || 'Doe',
984
+ shipping_street: payment.shippingContact?.addressLines?.[0] || payment.billingContact.addressLines?.[0] || 'Main Street 123',
985
+ shipping_zip: payment.shippingContact?.postalCode || payment.billingContact.postalCode || '12345',
986
+ shipping_city: payment.shippingContact?.locality || payment.billingContact.locality || 'Berlin',
987
+ shipping_country: payment.shippingContact?.countryCode || payment.billingContact.countryCode || 'DE'
988
+ })
989
+ });
990
+
991
+ const result = await response.json();
992
+
993
+ if (result.status === 'APPROVED') {
994
+ session.completePayment(ApplePaySession.STATUS_SUCCESS);
995
+ } else {
996
+ session.completePayment(ApplePaySession.STATUS_FAILURE);
997
+ }
998
+ };
999
+
1000
+ // Show payment sheet
1001
+ session.begin();
1002
+ }`}</CodeBlock>
1003
+ </Box>
1004
+ <Box>
1005
+ <Typography
1006
+ variant="pi"
1007
+ fontWeight="bold"
1008
+ marginBottom={2}
1009
+ style={{ marginBottom: "12px" }}
1010
+ >
1011
+ Token Parameters (Backend Request):
1012
+ </Typography>
1013
+ <CodeBlock>{`{
1014
+ "amount": 1000,
1015
+ "currency": "EUR",
1016
+ "reference": "ORD-00123-ABCD",
1017
+ "clearingtype": "wlt",
1018
+ "wallettype": "APL",
1019
+ "add_paydata[paymentmethod_token_data]": "JSON_STRINGIFIED_TOKEN",
1020
+ "add_paydata[paymentmethod]": "APL",
1021
+ "add_paydata[paymentmethod_type]": "APPLEPAY",
1022
+ "add_paydata[gatewayid]": "payonegmbh",
1023
+ "add_paydata[gateway_merchantid]": "YOUR_MERCHANT_ID",
1024
+ // ... customer and shipping info
1025
+ }`}</CodeBlock>
1026
+ </Box>
1027
+ <Box>
1028
+ <Typography
1029
+ variant="pi"
1030
+ textColor="neutral600"
1031
+ marginTop={2}
1032
+ >
1033
+ 📚 <strong>Payone Apple Pay Documentation:</strong>{" "}
1034
+ <a
1035
+ href="https://docs.payone.com/display/public/PLATFORM/Apple+Pay"
1036
+ target="_blank"
1037
+ rel="noopener noreferrer"
1038
+ >
1039
+ https://docs.payone.com/display/public/PLATFORM/Apple+Pay
1040
+ </a>
1041
+ </Typography>
1042
+ </Box>
1043
+ </Stack>
1044
+ </CardBody>
1045
+ </Card>
1046
+ </AccordionContent>
1047
+ </Accordion>
1048
+
1049
+ <Accordion
1050
+ id="3d-secure"
1051
+ expanded={expandedAccordions.threeDSecure}
1052
+ onToggle={() => toggleAccordion("threeDSecure")}
1053
+ >
1054
+ <AccordionToggle title="3D Secure Authentication" />
1055
+ <AccordionContent>
1056
+ <Card className="payment-card">
1057
+ <CardBody padding={6}>
1058
+ <Stack spacing={4}>
1059
+ <Typography
1060
+ variant="delta"
1061
+ as="h3"
1062
+ fontWeight="bold"
1063
+ style={{ marginBottom: "12px" }}
1064
+ >
1065
+ 3D Secure Authentication
1066
+ </Typography>
1067
+ <Box>
1068
+ <Typography
1069
+ variant="pi"
1070
+ fontWeight="bold"
1071
+ marginBottom={2}
1072
+ style={{ marginBottom: "12px" }}
1073
+ >
1074
+ How 3D Secure Works:
1075
+ </Typography>
1076
+ <Stack spacing={2}>
1077
+ <Typography variant="pi">
1078
+ 1. Enable 3D Secure in Strapi admin panel (Configuration
1079
+ tab)
1080
+ </Typography>
1081
+ <Typography variant="pi">
1082
+ 2. Make a credit card payment request
1083
+ </Typography>
1084
+ <Typography variant="pi">
1085
+ 3. If 3DS is required, you'll receive a{" "}
1086
+ <code>redirecturl</code> in the response
1087
+ </Typography>
1088
+ <Typography variant="pi">
1089
+ 4. Redirect the user to the <code>redirecturl</code> for
1090
+ authentication
1091
+ </Typography>
1092
+ <Typography variant="pi">
1093
+ 5. User enters password/confirms with bank
1094
+ </Typography>
1095
+ <Typography variant="pi">
1096
+ 6. User is redirected back to your{" "}
1097
+ <code>successurl</code>, <code>errorurl</code>, or{" "}
1098
+ <code>backurl</code>
1099
+ </Typography>
1100
+ <Typography variant="pi">
1101
+ 7. Handle the callback and check transaction status
1102
+ </Typography>
1103
+ </Stack>
1104
+ </Box>
1105
+ <Box>
1106
+ <Typography
1107
+ variant="pi"
1108
+ fontWeight="bold"
1109
+ marginBottom={2}
1110
+ style={{ marginBottom: "12px" }}
1111
+ >
1112
+ Special 3D Secure Test Cards (from Payone Documentation):
1113
+ </Typography>
1114
+ <Stack spacing={2}>
1115
+ <Typography variant="pi">
1116
+ • <strong>Visa 3DS Test Card:</strong> 4000000000000002
1117
+ </Typography>
1118
+ <Typography variant="pi">
1119
+ • <strong>Mastercard 3DS Test Card:</strong>{" "}
1120
+ 5453010000059543
1121
+ </Typography>
1122
+ <Typography variant="pi">
1123
+ • <strong>Expiry:</strong> Any future date (e.g., 12/25
1124
+ = "2512")
1125
+ </Typography>
1126
+ <Typography variant="pi">
1127
+ • <strong>CVC:</strong> Any 3 digits (e.g., 123)
1128
+ </Typography>
1129
+ <Typography variant="pi">
1130
+ • <strong>3DS Password:</strong> Usually "123456" or as
1131
+ provided by Payone (check your Payone test
1132
+ documentation)
1133
+ </Typography>
1134
+ </Stack>
1135
+ <Typography
1136
+ variant="pi"
1137
+ textColor="neutral600"
1138
+ marginTop={2}
1139
+ >
1140
+ 📚 <strong>Payone 3D Secure Documentation:</strong>{" "}
1141
+ <a
1142
+ href="https://docs.payone.com/display/public/PLATFORM/3D+Secure"
1143
+ target="_blank"
1144
+ rel="noopener noreferrer"
1145
+ >
1146
+ https://docs.payone.com/display/public/PLATFORM/3D+Secure
1147
+ </a>
1148
+ </Typography>
1149
+ </Box>
1150
+ <Box>
1151
+ <Typography
1152
+ variant="pi"
1153
+ fontWeight="bold"
1154
+ marginBottom={2}
1155
+ style={{ marginBottom: "12px" }}
1156
+ >
1157
+ Standard Credit Card Test Cards (without 3DS):
1158
+ </Typography>
1159
+ <Stack spacing={2}>
1160
+ <Typography variant="pi">
1161
+ • <strong>Visa:</strong> 4111111111111111
1162
+ </Typography>
1163
+ <Typography variant="pi">
1164
+ • <strong>Mastercard:</strong> 5555555555554444
1165
+ </Typography>
1166
+ <Typography variant="pi">
1167
+ • <strong>Amex:</strong> 378282246310005
1168
+ </Typography>
1169
+ <Typography variant="pi">
1170
+ • <strong>Expiry:</strong> Any future date (e.g., 12/25
1171
+ = "2512")
1172
+ </Typography>
1173
+ <Typography variant="pi">
1174
+ • <strong>CVC:</strong> Any 3 digits (4 digits for Amex)
1175
+ </Typography>
1176
+ </Stack>
1177
+ <Typography
1178
+ variant="pi"
1179
+ textColor="neutral600"
1180
+ marginTop={2}
1181
+ >
1182
+ 📚 <strong>Payone Test Cards Documentation:</strong>{" "}
1183
+ <a
1184
+ href="https://docs.payone.com/display/public/PLATFORM/Credit+Card+Test+Cards"
1185
+ target="_blank"
1186
+ rel="noopener noreferrer"
1187
+ >
1188
+ https://docs.payone.com/display/public/PLATFORM/Credit+Card+Test+Cards
1189
+ </a>
1190
+ </Typography>
1191
+ </Box>
1192
+ <Box>
1193
+ <Typography
1194
+ variant="pi"
1195
+ fontWeight="bold"
1196
+ marginBottom={2}
1197
+ style={{ marginBottom: "12px" }}
1198
+ >
1199
+ Example Flow:
1200
+ </Typography>
1201
+ <CodeBlock>{`// 1. Make payment request
1202
+ const response = await fetch('/api/strapi-plugin-payone-provider/preauthorization', {
1203
+ method: 'POST',
1204
+ body: JSON.stringify({
1205
+ amount: 1000,
1206
+ currency: 'EUR',
1207
+ clearingtype: 'cc',
1208
+ cardtype: 'V',
1209
+ cardpan: '4111111111111111',
1210
+ cardexpiredate: '2512',
1211
+ cardcvc2: '123',
1212
+ successurl: 'https://yoursite.com/payment/success',
1213
+ errorurl: 'https://yoursite.com/payment/error',
1214
+ backurl: 'https://yoursite.com/payment/back',
1215
+ // ... other params
1216
+ })
1217
+ });
1218
+
1219
+ const result = await response.json();
1220
+
1221
+ // 2. Check if 3DS redirect is required
1222
+ if (result.status === 'REDIRECT' && result.redirecturl) {
1223
+ // 3. Redirect user to 3DS authentication page
1224
+ window.location.href = result.redirecturl;
1225
+ }
1226
+
1227
+ // 4. Handle callback (in your success/error/back URL handler)
1228
+ // The callback will include transaction status and txid`}</CodeBlock>
1229
+ </Box>
1230
+ <Box>
1231
+ <Typography
1232
+ variant="pi"
1233
+ textColor="neutral600"
1234
+ marginTop={2}
1235
+ >
1236
+ 📚 <strong>Payone 3D Secure Documentation:</strong>{" "}
1237
+ <a
1238
+ href="https://docs.payone.com/display/public/PLATFORM/3D+Secure"
1239
+ target="_blank"
1240
+ rel="noopener noreferrer"
1241
+ >
1242
+ https://docs.payone.com/display/public/PLATFORM/3D+Secure
1243
+ </a>
1244
+ </Typography>
1245
+ </Box>
1246
+ </Stack>
1247
+ </CardBody>
1248
+ </Card>
1249
+ </AccordionContent>
1250
+ </Accordion>
1251
+
1252
+ <Accordion
1253
+ id="capture-refund"
1254
+ expanded={expandedAccordions.captureRefund}
1255
+ onToggle={() => toggleAccordion("captureRefund")}
1256
+ >
1257
+ <AccordionToggle title="Capture & Refund Operations" />
1258
+ <AccordionContent>
1259
+ <Card className="payment-card">
1260
+ <CardBody padding={6}>
1261
+ <Stack spacing={4}>
1262
+ <Typography
1263
+ variant="delta"
1264
+ as="h3"
1265
+ fontWeight="bold"
1266
+ style={{ marginBottom: "12px" }}
1267
+ >
1268
+ Capture & Refund Operations
1269
+ </Typography>
1270
+ <Box>
1271
+ <Typography
1272
+ variant="pi"
1273
+ fontWeight="bold"
1274
+ marginBottom={2}
1275
+ style={{ marginBottom: "12px" }}
1276
+ >
1277
+ Capture (Complete Preauthorized Transaction):
1278
+ </Typography>
1279
+ <CodeBlock>{`POST /api/strapi-plugin-payone-provider/capture
1280
+
1281
+ {
1282
+ "txid": "12345678",
1283
+ "amount": 1000,
1284
+ "currency": "EUR",
1285
+ "reference": "CAPTURE-00123-ABCD",
1286
+ "sequencenumber": 1,
1287
+ "capturemode": "full" // For wallet payments: "full" or "partial"
1288
+ }`}</CodeBlock>
1289
+ <Typography
1290
+ variant="pi"
1291
+ textColor="neutral600"
1292
+ marginTop={2}
1293
+ >
1294
+ <strong>Note:</strong> <code>capturemode</code> is only
1295
+ required for wallet payments (PayPal, Google Pay, Apple
1296
+ Pay).
1297
+ </Typography>
1298
+ </Box>
1299
+ <Box>
1300
+ <Typography
1301
+ variant="pi"
1302
+ fontWeight="bold"
1303
+ marginBottom={2}
1304
+ style={{ marginBottom: "12px" }}
1305
+ >
1306
+ Refund (Return Funds):
1307
+ </Typography>
1308
+ <CodeBlock>{`POST /api/strapi-plugin-payone-provider/refund
1309
+
1310
+ {
1311
+ "txid": "12345678",
1312
+ "amount": -1000, // Negative amount for refund
1313
+ "currency": "EUR",
1314
+ "reference": "REFUND-00123-ABCD",
1315
+ "sequencenumber": 2
1316
+ }`}</CodeBlock>
1317
+ <Typography
1318
+ variant="pi"
1319
+ textColor="neutral600"
1320
+ marginTop={2}
1321
+ >
1322
+ <strong>Note:</strong> Refund amount must be negative.{" "}
1323
+ <code>sequencenumber</code> should be incremented for each
1324
+ operation on the same transaction.
1325
+ </Typography>
1326
+ </Box>
1327
+ <Box>
1328
+ <Typography
1329
+ variant="pi"
1330
+ fontWeight="bold"
1331
+ marginBottom={2}
1332
+ style={{ marginBottom: "12px" }}
1333
+ >
1334
+ Sequence Numbers:
1335
+ </Typography>
1336
+ <Stack spacing={2}>
1337
+ <Typography variant="pi">
1338
+ • <strong>Preauthorization:</strong> sequencenumber = 0
1339
+ (default)
1340
+ </Typography>
1341
+ <Typography variant="pi">
1342
+ • <strong>Capture:</strong> sequencenumber = 1 (first
1343
+ capture)
1344
+ </Typography>
1345
+ <Typography variant="pi">
1346
+ • <strong>Refund:</strong> sequencenumber = 2 (first
1347
+ refund), 3 (second refund), etc.
1348
+ </Typography>
1349
+ </Stack>
1350
+ </Box>
1351
+ <Box>
1352
+ <Typography
1353
+ variant="pi"
1354
+ textColor="neutral600"
1355
+ marginTop={2}
1356
+ >
1357
+ 📚 <strong>Payone Capture Documentation:</strong>{" "}
1358
+ <a
1359
+ href="https://docs.payone.com/display/public/PLATFORM/Capture"
1360
+ target="_blank"
1361
+ rel="noopener noreferrer"
1362
+ >
1363
+ https://docs.payone.com/display/public/PLATFORM/Capture
1364
+ </a>
1365
+ </Typography>
1366
+ </Box>
1367
+ <Box>
1368
+ <Typography
1369
+ variant="pi"
1370
+ textColor="neutral600"
1371
+ marginTop={2}
1372
+ >
1373
+ 📚 <strong>Payone Refund Documentation:</strong>{" "}
1374
+ <a
1375
+ href="https://docs.payone.com/display/public/PLATFORM/Refund"
1376
+ target="_blank"
1377
+ rel="noopener noreferrer"
1378
+ >
1379
+ https://docs.payone.com/display/public/PLATFORM/Refund
1380
+ </a>
1381
+ </Typography>
1382
+ </Box>
1383
+ </Stack>
1384
+ </CardBody>
1385
+ </Card>
1386
+ </AccordionContent>
1387
+ </Accordion>
1388
+
1389
+ <Accordion
1390
+ id="test-credentials"
1391
+ expanded={expandedAccordions.testCredentials}
1392
+ onToggle={() => toggleAccordion("testCredentials")}
1393
+ >
1394
+ <AccordionToggle title="Test Credentials" />
1395
+ <AccordionContent>
1396
+ <Card className="payment-card">
1397
+ <CardBody padding={6}>
1398
+ <Stack spacing={4}>
1399
+ <Typography
1400
+ variant="delta"
1401
+ as="h3"
1402
+ fontWeight="bold"
1403
+ style={{ marginBottom: "12px" }}
1404
+ >
1405
+ Test Credentials
1406
+ </Typography>
1407
+ <Box>
1408
+ <Typography
1409
+ variant="pi"
1410
+ fontWeight="bold"
1411
+ marginBottom={2}
1412
+ style={{ marginBottom: "12px" }}
1413
+ >
1414
+ Credit Card Test Cards (Standard):
1415
+ </Typography>
1416
+ <Stack spacing={2}>
1417
+ <Typography variant="pi">
1418
+ • <strong>Visa:</strong> 4111111111111111
1419
+ </Typography>
1420
+ <Typography variant="pi">
1421
+ • <strong>Mastercard:</strong> 5555555555554444
1422
+ </Typography>
1423
+ <Typography variant="pi">
1424
+ • <strong>Amex:</strong> 378282246310005
1425
+ </Typography>
1426
+ <Typography variant="pi">
1427
+ • <strong>Expiry:</strong> Any future date (e.g., 12/25
1428
+ = "2512")
1429
+ </Typography>
1430
+ <Typography variant="pi">
1431
+ • <strong>CVC:</strong> Any 3 digits (4 digits for Amex)
1432
+ </Typography>
1433
+ </Stack>
1434
+ <Typography
1435
+ variant="pi"
1436
+ textColor="neutral600"
1437
+ marginTop={2}
1438
+ >
1439
+ 📚 <strong>Payone Documentation:</strong>{" "}
1440
+ <a
1441
+ href="https://docs.payone.com/display/public/PLATFORM/Test+and+Live+Data"
1442
+ target="_blank"
1443
+ rel="noopener noreferrer"
1444
+ >
1445
+ https://docs.payone.com/display/public/PLATFORM/Test+and+Live+Data
1446
+ </a>
1447
+ </Typography>
1448
+ </Box>
1449
+ <Box>
1450
+ <Typography
1451
+ variant="pi"
1452
+ fontWeight="bold"
1453
+ marginBottom={2}
1454
+ style={{ marginBottom: "12px" }}
1455
+ >
1456
+ 3D Secure Test Cards (Special Test Data):
1457
+ </Typography>
1458
+ <Stack spacing={2}>
1459
+ <Typography variant="pi">
1460
+ • <strong>Visa 3DS Test Card:</strong> 4000000000000002
1461
+ </Typography>
1462
+ <Typography variant="pi">
1463
+ • <strong>Mastercard 3DS Test Card:</strong>{" "}
1464
+ 5453010000059543
1465
+ </Typography>
1466
+ <Typography variant="pi">
1467
+ • <strong>3DS Password:</strong> Usually "123456" or as
1468
+ provided by Payone
1469
+ </Typography>
1470
+ <Typography variant="pi">
1471
+ • <strong>Expiry:</strong> Any future date (e.g., 12/25
1472
+ = "2512")
1473
+ </Typography>
1474
+ <Typography variant="pi">
1475
+ • <strong>CVC:</strong> Any 3 digits
1476
+ </Typography>
1477
+ </Stack>
1478
+ <Typography
1479
+ variant="pi"
1480
+ textColor="neutral600"
1481
+ marginTop={2}
1482
+ >
1483
+ 📚 <strong>Payone 3D Secure Documentation:</strong>{" "}
1484
+ <a
1485
+ href="https://docs.payone.com/display/public/PLATFORM/3D+Secure"
1486
+ target="_blank"
1487
+ rel="noopener noreferrer"
1488
+ >
1489
+ https://docs.payone.com/display/public/PLATFORM/3D+Secure
1490
+ </a>
1491
+ </Typography>
1492
+ </Box>
1493
+ <Box>
1494
+ <Typography
1495
+ variant="pi"
1496
+ fontWeight="bold"
1497
+ marginBottom={2}
1498
+ style={{ marginBottom: "12px" }}
1499
+ >
1500
+ PayPal Test Data:
1501
+ </Typography>
1502
+ <Stack spacing={2}>
1503
+ <Typography variant="pi">
1504
+ • Use PayPal Sandbox test accounts
1505
+ </Typography>
1506
+ <Typography variant="pi">
1507
+ • Create test accounts in PayPal Developer Dashboard
1508
+ </Typography>
1509
+ <Typography variant="pi">
1510
+ • Test with both buyer and merchant sandbox accounts
1511
+ </Typography>
1512
+ </Stack>
1513
+ <Typography
1514
+ variant="pi"
1515
+ textColor="neutral600"
1516
+ marginTop={2}
1517
+ >
1518
+ 📚 <strong>Payone PayPal Documentation:</strong>{" "}
1519
+ <a
1520
+ href="https://docs.payone.com/display/public/PLATFORM/PayPal"
1521
+ target="_blank"
1522
+ rel="noopener noreferrer"
1523
+ >
1524
+ https://docs.payone.com/display/public/PLATFORM/PayPal
1525
+ </a>
1526
+ </Typography>
1527
+ </Box>
1528
+ <Box>
1529
+ <Typography
1530
+ variant="pi"
1531
+ fontWeight="bold"
1532
+ marginBottom={2}
1533
+ style={{ marginBottom: "12px" }}
1534
+ >
1535
+ Google Pay Test Data:
1536
+ </Typography>
1537
+ <Stack spacing={2}>
1538
+ <Typography variant="pi">
1539
+ • Use Google Pay test environment
1540
+ </Typography>
1541
+ <Typography variant="pi">
1542
+ • Test cards are automatically provided by Google Pay
1543
+ SDK
1544
+ </Typography>
1545
+ <Typography variant="pi">
1546
+ • Set <code>environment: 'TEST'</code> in Google Pay
1547
+ configuration
1548
+ </Typography>
1549
+ </Stack>
1550
+ <Typography
1551
+ variant="pi"
1552
+ textColor="neutral600"
1553
+ marginTop={2}
1554
+ >
1555
+ 📚 <strong>Payone Google Pay Documentation:</strong>{" "}
1556
+ <a
1557
+ href="https://docs.payone.com/display/public/PLATFORM/Google+Pay"
1558
+ target="_blank"
1559
+ rel="noopener noreferrer"
1560
+ >
1561
+ https://docs.payone.com/display/public/PLATFORM/Google+Pay
1562
+ </a>
1563
+ </Typography>
1564
+ </Box>
1565
+ <Box>
1566
+ <Typography
1567
+ variant="pi"
1568
+ fontWeight="bold"
1569
+ marginBottom={2}
1570
+ style={{ marginBottom: "12px" }}
1571
+ >
1572
+ Apple Pay Test Data:
1573
+ </Typography>
1574
+ <Stack spacing={2}>
1575
+ <Typography variant="pi">
1576
+ • Use Apple Pay test environment
1577
+ </Typography>
1578
+ <Typography variant="pi">
1579
+ • Test cards are available in Wallet app on test devices
1580
+ </Typography>
1581
+ <Typography variant="pi">
1582
+ • Requires registered domain with HTTPS (not localhost)
1583
+ </Typography>
1584
+ </Stack>
1585
+ <Typography
1586
+ variant="pi"
1587
+ textColor="neutral600"
1588
+ marginTop={2}
1589
+ >
1590
+ 📚 <strong>Payone Apple Pay Documentation:</strong>{" "}
1591
+ <a
1592
+ href="https://docs.payone.com/display/public/PLATFORM/Apple+Pay"
1593
+ target="_blank"
1594
+ rel="noopener noreferrer"
1595
+ >
1596
+ https://docs.payone.com/display/public/PLATFORM/Apple+Pay
1597
+ </a>
1598
+ </Typography>
1599
+ </Box>
1600
+ <Box>
1601
+ <Typography
1602
+ variant="pi"
1603
+ fontWeight="bold"
1604
+ marginBottom={2}
1605
+ style={{ marginBottom: "12px" }}
1606
+ >
1607
+ Sofort Banking Test Data:
1608
+ </Typography>
1609
+ <Stack spacing={2}>
1610
+ <Typography variant="pi">
1611
+ • Use Sofort test environment
1612
+ </Typography>
1613
+ <Typography variant="pi">
1614
+ • Test credentials provided by Payone
1615
+ </Typography>
1616
+ </Stack>
1617
+ <Typography
1618
+ variant="pi"
1619
+ textColor="neutral600"
1620
+ marginTop={2}
1621
+ >
1622
+ 📚 <strong>Payone Sofort Documentation:</strong>{" "}
1623
+ <a
1624
+ href="https://docs.payone.com/display/public/PLATFORM/Sofort"
1625
+ target="_blank"
1626
+ rel="noopener noreferrer"
1627
+ >
1628
+ https://docs.payone.com/display/public/PLATFORM/Sofort
1629
+ </a>
1630
+ </Typography>
1631
+ </Box>
1632
+ <Box>
1633
+ <Typography
1634
+ variant="pi"
1635
+ fontWeight="bold"
1636
+ marginBottom={2}
1637
+ style={{ marginBottom: "12px" }}
1638
+ >
1639
+ SEPA Direct Debit Test Data:
1640
+ </Typography>
1641
+ <Stack spacing={2}>
1642
+ <Typography variant="pi">
1643
+ • <strong>Test IBAN:</strong> DE89370400440532013000
1644
+ </Typography>
1645
+ <Typography variant="pi">
1646
+ • <strong>Test BIC:</strong> COBADEFFXXX
1647
+ </Typography>
1648
+ <Typography variant="pi">
1649
+ • <strong>Account Holder:</strong> Any test name
1650
+ </Typography>
1651
+ </Stack>
1652
+ <Typography
1653
+ variant="pi"
1654
+ textColor="neutral600"
1655
+ marginTop={2}
1656
+ >
1657
+ 📚 <strong>Payone SEPA Documentation:</strong>{" "}
1658
+ <a
1659
+ href="https://docs.payone.com/display/public/PLATFORM/SEPA+Direct+Debit"
1660
+ target="_blank"
1661
+ rel="noopener noreferrer"
1662
+ >
1663
+ https://docs.payone.com/display/public/PLATFORM/SEPA+Direct+Debit
1664
+ </a>
1665
+ </Typography>
1666
+ </Box>
1667
+ <Box>
1668
+ <Typography
1669
+ variant="pi"
1670
+ fontWeight="bold"
1671
+ marginBottom={2}
1672
+ style={{ marginBottom: "12px" }}
1673
+ >
1674
+ General Test Data Resources:
1675
+ </Typography>
1676
+ <Stack spacing={2}>
1677
+ <Typography variant="pi">
1678
+ 📚 <strong>Payone Test Data Overview:</strong>{" "}
1679
+ <a
1680
+ href="https://docs.payone.com/display/public/PLATFORM/Test+and+Live+Data"
1681
+ target="_blank"
1682
+ rel="noopener noreferrer"
1683
+ >
1684
+ https://docs.payone.com/display/public/PLATFORM/Test+and+Live+Data
1685
+ </a>
1686
+ </Typography>
1687
+ <Typography variant="pi">
1688
+ 📚 <strong>Payone Test Cards:</strong>{" "}
1689
+ <a
1690
+ href="https://docs.payone.com/display/public/PLATFORM/Credit+Card+Test+Cards"
1691
+ target="_blank"
1692
+ rel="noopener noreferrer"
1693
+ >
1694
+ https://docs.payone.com/display/public/PLATFORM/Credit+Card+Test+Cards
1695
+ </a>
1696
+ </Typography>
1697
+ <Typography variant="pi">
1698
+ 📚 <strong>Payone Test Environment:</strong>{" "}
1699
+ <a
1700
+ href="https://docs.payone.com/display/public/PLATFORM/Test+Environment"
1701
+ target="_blank"
1702
+ rel="noopener noreferrer"
1703
+ >
1704
+ https://docs.payone.com/display/public/PLATFORM/Test+Environment
1705
+ </a>
1706
+ </Typography>
1707
+ </Stack>
1708
+ </Box>
1709
+ </Stack>
1710
+ </CardBody>
1711
+ </Card>
1712
+ </AccordionContent>
1713
+ </Accordion>
1714
+
1715
+ <Box paddingTop={4}>
1716
+ <Typography variant="sigma" textColor="neutral600">
1717
+ For more information, visit the Payone documentation or contact your
1718
+ Payone account manager.
1719
+ </Typography>
1720
+ </Box>
1721
+ </Flex>
1722
+ </Box>
1723
+ );
1724
+ };
1725
+
1726
+ export default DocsPanel;