strapi-plugin-payone-provider 1.6.7 → 5.6.9

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 (94) hide show
  1. package/README.md +24 -11
  2. package/admin/src/components/Initializer/index.jsx +3 -3
  3. package/admin/src/components/PluginIcon/index.jsx +3 -3
  4. package/admin/src/index.js +33 -11
  5. package/admin/src/pages/App/components/AppHeader.jsx +17 -32
  6. package/admin/src/pages/App/components/AppTabs.jsx +36 -156
  7. package/admin/src/pages/App/components/ApplePayBtn.jsx +9 -11
  8. package/admin/src/pages/App/components/ApplePayConfig.jsx +221 -161
  9. package/admin/src/pages/App/components/ApplePayConfigPanel.jsx +33 -45
  10. package/admin/src/pages/App/components/DocsPanel.jsx +66 -1726
  11. package/admin/src/pages/App/components/GooglePayConfig.jsx +136 -169
  12. package/admin/src/pages/App/components/GooglePayConfigPanel.jsx +37 -55
  13. package/admin/src/pages/App/components/GooglePaybutton.jsx +101 -43
  14. package/admin/src/pages/App/components/RenderInput.jsx +94 -0
  15. package/admin/src/pages/App/components/StatusBadge.jsx +27 -16
  16. package/admin/src/pages/App/components/configuration/ConfigurationFields.jsx +255 -0
  17. package/admin/src/pages/App/components/configuration/ConfigurationPanel.jsx +54 -0
  18. package/admin/src/pages/App/components/configuration/TestConnection.jsx +130 -0
  19. package/admin/src/pages/App/components/docs/ApplePaySection.jsx +260 -0
  20. package/admin/src/pages/App/components/docs/BaseUrlSection.jsx +53 -0
  21. package/admin/src/pages/App/components/docs/CaptureRefundSection.jsx +113 -0
  22. package/admin/src/pages/App/components/docs/CodeBlock.jsx +59 -0
  23. package/admin/src/pages/App/components/docs/CreditCardSection.jsx +93 -0
  24. package/admin/src/pages/App/components/docs/GooglePaySection.jsx +248 -0
  25. package/admin/src/pages/App/components/docs/PayPalSection.jsx +116 -0
  26. package/admin/src/pages/App/components/docs/PaymentMethodsSection.jsx +55 -0
  27. package/admin/src/pages/App/components/docs/TableOfContents.jsx +47 -0
  28. package/admin/src/pages/App/components/docs/TestCredentialsSection.jsx +304 -0
  29. package/admin/src/pages/App/components/docs/ThreeDSecureSection.jsx +188 -0
  30. package/admin/src/pages/App/components/icons/BankIcon.jsx +1 -1
  31. package/admin/src/pages/App/components/icons/ChevronDownIcon.jsx +1 -1
  32. package/admin/src/pages/App/components/icons/ChevronUpIcon.jsx +1 -1
  33. package/admin/src/pages/App/components/icons/CreditCardIcon.jsx +1 -1
  34. package/admin/src/pages/App/components/icons/ErrorIcon.jsx +1 -1
  35. package/admin/src/pages/App/components/icons/InfoIcon.jsx +1 -1
  36. package/admin/src/pages/App/components/icons/MarkCircle.jsx +19 -0
  37. package/admin/src/pages/App/components/icons/PaymentIcon.jsx +1 -1
  38. package/admin/src/pages/App/components/icons/PendingIcon.jsx +1 -1
  39. package/admin/src/pages/App/components/icons/PersonIcon.jsx +1 -1
  40. package/admin/src/pages/App/components/icons/SuccessIcon.jsx +1 -1
  41. package/admin/src/pages/App/components/icons/WalletIcon.jsx +1 -1
  42. package/admin/src/pages/App/components/payment-actions/ApplePayPanel.jsx +51 -0
  43. package/admin/src/pages/App/components/payment-actions/AuthorizationForm.jsx +341 -0
  44. package/admin/src/pages/App/components/payment-actions/CaptureForm.jsx +128 -0
  45. package/admin/src/pages/App/components/{paymentActions → payment-actions}/CardDetailsInput.jsx +77 -72
  46. package/admin/src/pages/App/components/payment-actions/PaymentActionsPanel.jsx +194 -0
  47. package/admin/src/pages/App/components/payment-actions/PaymentMethodSelector.jsx +313 -0
  48. package/admin/src/pages/App/components/payment-actions/PaymentResult.jsx +133 -0
  49. package/admin/src/pages/App/components/payment-actions/PreauthorizationForm.jsx +280 -0
  50. package/admin/src/pages/App/components/payment-actions/RefundForm.jsx +121 -0
  51. package/admin/src/pages/App/components/transaction-history/FiltersPanel.jsx +145 -0
  52. package/admin/src/pages/App/components/transaction-history/HistoryPanel.jsx +50 -0
  53. package/admin/src/pages/App/components/transaction-history/TransactionTable.jsx +163 -0
  54. package/admin/src/pages/App/components/transaction-history/details/TransactionDetails.jsx +156 -0
  55. package/admin/src/pages/App/components/{TransactionHistoryItem.jsx → transaction-history/details/TransactionHistoryItem.jsx} +16 -28
  56. package/admin/src/pages/App/index.jsx +27 -67
  57. package/admin/src/pages/App/styles.css +46 -169
  58. package/admin/src/pages/constants/paymentConstants.js +52 -16
  59. package/admin/src/pages/hooks/use-system-theme.js +27 -0
  60. package/admin/src/pages/hooks/usePaymentActions.js +273 -210
  61. package/admin/src/pages/hooks/useSettings.js +87 -48
  62. package/admin/src/pages/hooks/useTransactionHistory.js +109 -47
  63. package/admin/src/pages/utils/api.js +57 -72
  64. package/admin/src/pages/utils/applePayConstants.js +2 -28
  65. package/admin/src/pages/utils/countryLanguageUtils.js +280 -0
  66. package/admin/src/pages/utils/getInputComponent.jsx +225 -0
  67. package/admin/src/pages/utils/googlePayConstants.js +2 -9
  68. package/admin/src/pages/utils/paymentUtils.js +13 -25
  69. package/admin/src/pages/utils/tooltipHelpers.js +18 -0
  70. package/admin/src/pages/utils/transactionTableUtils.js +60 -0
  71. package/package.json +7 -12
  72. package/server/config/index.js +18 -2
  73. package/server/controllers/payone.js +80 -31
  74. package/server/policies/is-auth.js +9 -3
  75. package/server/policies/isSuperAdmin.js +7 -5
  76. package/server/services/paymentService.js +6 -22
  77. package/server/services/payone.js +3 -3
  78. package/server/services/settingsService.js +13 -3
  79. package/server/services/testConnectionService.js +11 -73
  80. package/server/services/transactionService.js +61 -32
  81. package/server/utils/normalize.js +0 -12
  82. package/server/utils/paymentMethodParams.js +0 -1
  83. package/server/utils/responseParser.js +9 -14
  84. package/strapi-admin.js +3 -1
  85. package/admin/src/pages/App/components/ConfigurationPanel.jsx +0 -517
  86. package/admin/src/pages/App/components/HistoryPanel.jsx +0 -312
  87. package/admin/src/pages/App/components/PaymentActionsPanel.jsx +0 -280
  88. package/admin/src/pages/App/components/paymentActions/ApplePayPanel.jsx +0 -95
  89. package/admin/src/pages/App/components/paymentActions/AuthorizationForm.jsx +0 -197
  90. package/admin/src/pages/App/components/paymentActions/CaptureForm.jsx +0 -65
  91. package/admin/src/pages/App/components/paymentActions/PaymentMethodSelector.jsx +0 -306
  92. package/admin/src/pages/App/components/paymentActions/PaymentResult.jsx +0 -192
  93. package/admin/src/pages/App/components/paymentActions/PreauthorizationForm.jsx +0 -142
  94. package/admin/src/pages/App/components/paymentActions/RefundForm.jsx +0 -90
@@ -0,0 +1,93 @@
1
+ import * as React from "react";
2
+ import { Accordion, Box, Flex, Link, Typography } from "@strapi/design-system";
3
+ import CodeBlock from "./CodeBlock";
4
+
5
+ const CreditCardSection = () => {
6
+ return (
7
+ <Accordion.Item value="credit-card" id="credit-card">
8
+ <Accordion.Header>
9
+ <Accordion.Trigger>Credit Card Integration</Accordion.Trigger>
10
+ </Accordion.Header>
11
+ <Accordion.Content>
12
+ <Flex direction="column" gap={4} alignItems="stretch" padding={4}>
13
+ <Typography variant="delta" as="h3" fontWeight="bold">
14
+ Credit Card Integration
15
+ </Typography>
16
+ <Box>
17
+ <Typography variant="pi" fontWeight="bold">
18
+ Preauthorization Request:
19
+ </Typography>
20
+ <div style={{ marginTop: "12px" }}>
21
+ <CodeBlock>{`POST /api/strapi-plugin-payone-provider/preauthorization
22
+
23
+ {
24
+ "amount": 1000,
25
+ "currency": "EUR",
26
+ "reference": "ORD-00123-ABCD",
27
+ "clearingtype": "cc",
28
+ "cardtype": "V",
29
+ "cardpan": "4111111111111111",
30
+ "cardexpiredate": "2512",
31
+ "cardcvc2": "123",
32
+ "firstname": "John",
33
+ "lastname": "Doe",
34
+ "email": "john.doe@example.com",
35
+ "street": "Main Street 123",
36
+ "zip": "12345",
37
+ "city": "Berlin",
38
+ "country": "DE",
39
+ "successurl": "https://www.example.com/success",
40
+ "errorurl": "https://www.example.com/error",
41
+ "backurl": "https://www.example.com/back"
42
+ }`}</CodeBlock>
43
+ </div>
44
+ </Box>
45
+ <Box>
46
+ <Typography variant="pi" fontWeight="bold">
47
+ Response (Success):
48
+ </Typography>
49
+ <div style={{ marginTop: "12px" }}>
50
+ <CodeBlock>{`{
51
+ "status": "APPROVED",
52
+ "txid": "12345678",
53
+ "reference": "ORD-00123-ABCD",
54
+ "amount": 1000,
55
+ "currency": "EUR"
56
+ }`}</CodeBlock>
57
+ </div>
58
+ </Box>
59
+ <Box>
60
+ <Typography variant="pi" fontWeight="bold">
61
+ Response (3D Secure Redirect):
62
+ </Typography>
63
+ <div style={{ marginTop: "12px", marginBottom: "12px" }}>
64
+ <CodeBlock>{`{
65
+ "status": "REDIRECT",
66
+ "redirecturl": "https://secure.pay1.de/3ds/...",
67
+ "requires3DSRedirect": true
68
+ }`}</CodeBlock>
69
+ </div>
70
+ <Typography variant="pi" textColor="neutral600">
71
+ ⚠️ When 3D Secure is enabled, you must redirect the user to the{" "}
72
+ <code>redirecturl</code> for authentication.
73
+ </Typography>
74
+ </Box>
75
+ <Box marginTop={2}>
76
+ <Typography variant="pi" textColor="neutral600">
77
+ 📚 <strong>Payone Credit Card Documentation:</strong>
78
+ <Link
79
+ href="https://docs.payone.com/display/public/PLATFORM/Credit+Card"
80
+ target="_blank"
81
+ rel="noopener noreferrer"
82
+ >
83
+ https://docs.payone.com/display/public/PLATFORM/Credit+Card
84
+ </Link>
85
+ </Typography>
86
+ </Box>
87
+ </Flex>
88
+ </Accordion.Content>
89
+ </Accordion.Item>
90
+ );
91
+ };
92
+
93
+ export default CreditCardSection;
@@ -0,0 +1,248 @@
1
+ import * as React from "react";
2
+ import { Accordion, Box, Flex, Typography } from "@strapi/design-system";
3
+ import { Link } from "@strapi/design-system";
4
+ import CodeBlock from "./CodeBlock";
5
+
6
+ const GooglePaySection = () => {
7
+ return (
8
+ <Accordion.Item value="google-pay" id="google-pay">
9
+ <Accordion.Header>
10
+ <Accordion.Trigger>Google Pay Integration</Accordion.Trigger>
11
+ </Accordion.Header>
12
+ <Accordion.Content>
13
+ <Flex direction="column" alignItems={"stretch"} gap={4} padding={4}>
14
+ <Typography variant="delta" as="h3" fontWeight="bold">
15
+ Google Pay Integration
16
+ </Typography>
17
+ <Box>
18
+ <Flex direction="column" alignItems={"stretch"} gap={2}>
19
+ <Typography variant="pi" fontWeight="bold">
20
+ Step 1: Configure Strapi Middleware
21
+ </Typography>
22
+ <Typography variant="pi">
23
+ Add Google Pay SDK to your{" "}
24
+ <code>config/middlewares.js</code>:
25
+ </Typography>
26
+ </Flex>
27
+ <div style={{ marginTop: "12px" }}>
28
+ <CodeBlock>{`module.exports = [
29
+ 'strapi::logger',
30
+ 'strapi::errors',
31
+ {
32
+ name: 'strapi::security',
33
+ config: {
34
+ contentSecurityPolicy: {
35
+ useDefaults: true,
36
+ directives: {
37
+ 'script-src': [
38
+ "'self'",
39
+ "'unsafe-inline'",
40
+ "'unsafe-eval'",
41
+ 'https://pay.google.com',
42
+ ],
43
+ 'connect-src': [
44
+ "'self'",
45
+ 'https:',
46
+ 'https://pay.google.com',
47
+ ],
48
+ 'frame-src': [
49
+ "'self'",
50
+ 'https://pay.google.com',
51
+ ],
52
+ },
53
+ },
54
+ },
55
+ },
56
+ // ... other middlewares
57
+ ];`}</CodeBlock>
58
+ </div>
59
+ </Box>
60
+ <Box>
61
+ <Typography variant="pi" fontWeight="bold">
62
+ Step 2: Install Google Pay Button Library (Optional)
63
+ </Typography>
64
+ <div style={{ marginTop: "12px" }}>
65
+ <CodeBlock>npm install @google-pay/button-react</CodeBlock>
66
+ </div>
67
+ </Box>
68
+ <Box>
69
+ <Typography variant="pi" fontWeight="bold">
70
+ Step 3: Implement Google Pay Button (Using NPM Library)
71
+ </Typography>
72
+ <div style={{ marginTop: "12px" }}>
73
+ <CodeBlock>{`import { GooglePayButton } from '@google-pay/button-react';
74
+
75
+ function PaymentForm() {
76
+ const handleGooglePay = async (paymentData) => {
77
+ const token = paymentData.paymentMethodData.tokenizationData.token;
78
+
79
+ // Send token to your backend
80
+ const response = await fetch('/api/strapi-plugin-payone-provider/preauthorization', {
81
+ method: 'POST',
82
+ headers: {
83
+ 'Content-Type': 'application/json',
84
+ 'Authorization': 'Bearer YOUR_TOKEN'
85
+ },
86
+ body: JSON.stringify({
87
+ amount: 1000,
88
+ currency: 'EUR',
89
+ reference: 'ORD-00123-ABCD',
90
+ clearingtype: 'wlt',
91
+ wallettype: 'GGP',
92
+ 'add_paydata[paymentmethod_token_data]': token,
93
+ 'add_paydata[paymentmethod]': 'GGP',
94
+ 'add_paydata[paymentmethod_type]': 'GOOGLEPAY',
95
+ 'add_paydata[gatewayid]': 'payonegmbh',
96
+ firstname: 'John',
97
+ lastname: 'Doe',
98
+ email: 'john.doe@example.com',
99
+ street: 'Main Street 123',
100
+ zip: '12345',
101
+ city: 'Berlin',
102
+ country: 'DE',
103
+ shipping_firstname: 'John',
104
+ shipping_lastname: 'Doe',
105
+ shipping_street: 'Main Street 123',
106
+ shipping_zip: '12345',
107
+ shipping_city: 'Berlin',
108
+ shipping_country: 'DE'
109
+ })
110
+ });
111
+
112
+ const result = await response.json();
113
+ };
114
+
115
+ return (
116
+ <GooglePayButton
117
+ environment="TEST"
118
+ paymentRequest={{
119
+ apiVersion: 2,
120
+ apiVersionMinor: 0,
121
+ allowedPaymentMethods: [{
122
+ type: 'CARD',
123
+ parameters: {
124
+ allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
125
+ allowedCardNetworks: ['MASTERCARD', 'VISA']
126
+ },
127
+ tokenizationSpecification: {
128
+ type: 'PAYMENT_GATEWAY',
129
+ parameters: {
130
+ gateway: 'payonegmbh',
131
+ gatewayMerchantId: 'YOUR_MERCHANT_ID'
132
+ }
133
+ }
134
+ }],
135
+ merchantInfo: {
136
+ merchantId: 'YOUR_MERCHANT_ID',
137
+ merchantName: 'Your Store Name'
138
+ },
139
+ transactionInfo: {
140
+ totalPriceStatus: 'FINAL',
141
+ totalPriceLabel: 'Total',
142
+ totalPrice: '10.00',
143
+ currencyCode: 'EUR',
144
+ countryCode: 'DE'
145
+ }
146
+ }}
147
+ onLoadPaymentData={handleGooglePay}
148
+ />
149
+ );
150
+ }`}</CodeBlock>
151
+ </div>
152
+ </Box>
153
+ <Box>
154
+ <Typography variant="pi" fontWeight="bold">
155
+ Step 4: Manual Implementation
156
+ </Typography>
157
+ <div style={{ marginTop: "12px" }}>
158
+ <CodeBlock>{`// Load Google Pay SDK
159
+ <script src="https://pay.google.com/gp/p/js/pay.js"></script>
160
+
161
+ // Initialize Google Pay
162
+ const paymentsClient = new google.payments.api.PaymentsClient({
163
+ environment: 'TEST' // or 'PRODUCTION'
164
+ });
165
+
166
+ // Create payment request
167
+ const paymentRequest = {
168
+ apiVersion: 2,
169
+ apiVersionMinor: 0,
170
+ allowedPaymentMethods: [{
171
+ type: 'CARD',
172
+ parameters: {
173
+ allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
174
+ allowedCardNetworks: ['MASTERCARD', 'VISA']
175
+ },
176
+ tokenizationSpecification: {
177
+ type: 'PAYMENT_GATEWAY',
178
+ parameters: {
179
+ gateway: 'payonegmbh',
180
+ gatewayMerchantId: 'YOUR_MERCHANT_ID'
181
+ }
182
+ }
183
+ }],
184
+ merchantInfo: {
185
+ merchantId: 'YOUR_MERCHANT_ID',
186
+ merchantName: 'Your Store Name'
187
+ },
188
+ transactionInfo: {
189
+ totalPriceStatus: 'FINAL',
190
+ totalPrice: '10.00',
191
+ currencyCode: 'EUR',
192
+ countryCode: 'DE'
193
+ }
194
+ };
195
+
196
+ // Check if Google Pay is available
197
+ paymentsClient.isReadyToPay(paymentRequest).then((response) => {
198
+ if (response.result) {
199
+ // Show Google Pay button
200
+ paymentsClient.loadPaymentData(paymentRequest).then((paymentData) => {
201
+ const token = paymentData.paymentMethodData.tokenizationData.token;
202
+ // Send token to backend
203
+ sendTokenToBackend(token);
204
+ });
205
+ }
206
+ });`}</CodeBlock>
207
+ </div>
208
+ </Box>
209
+ <Box>
210
+ <Typography variant="pi" fontWeight="bold">
211
+ Token Parameters (Backend Request):
212
+ </Typography>
213
+ <div style={{ marginTop: "12px" }}>
214
+ <CodeBlock>{`{
215
+ "amount": 1000,
216
+ "currency": "EUR",
217
+ "reference": "ORD-00123-ABCD",
218
+ "clearingtype": "wlt",
219
+ "wallettype": "GGP",
220
+ "add_paydata[paymentmethod_token_data]": "TOKEN_FROM_GOOGLE_PAY",
221
+ "add_paydata[paymentmethod]": "GGP",
222
+ "add_paydata[paymentmethod_type]": "GOOGLEPAY",
223
+ "add_paydata[gatewayid]": "payonegmbh",
224
+ "add_paydata[gateway_merchantid]": "YOUR_MERCHANT_ID",
225
+ // ... customer and shipping info
226
+ }`}</CodeBlock>
227
+ </div>
228
+ </Box>
229
+ <Box marginTop={2}>
230
+ <Typography variant="pi" textColor="neutral600">
231
+ 📚 <strong>Payone Google Pay Documentation:</strong>{" "}
232
+ <Link
233
+ href="https://docs.payone.com/display/public/PLATFORM/Google+Pay"
234
+ target="_blank"
235
+ rel="noopener noreferrer"
236
+ >
237
+ https://docs.payone.com/display/public/PLATFORM/Google+Pay
238
+ </Link>
239
+ </Typography>
240
+ </Box>
241
+ </Flex>
242
+ </Accordion.Content>
243
+ </Accordion.Item>
244
+ );
245
+ };
246
+
247
+ export default GooglePaySection;
248
+
@@ -0,0 +1,116 @@
1
+ import * as React from "react";
2
+ import { Accordion, Box, Flex, Typography } from "@strapi/design-system";
3
+ import { Link } from "@strapi/design-system";
4
+ import CodeBlock from "./CodeBlock";
5
+
6
+ const PayPalSection = () => {
7
+ return (
8
+ <Accordion.Item value="paypal" id="paypal">
9
+ <Accordion.Header>
10
+ <Accordion.Trigger>PayPal Integration</Accordion.Trigger>
11
+ </Accordion.Header>
12
+ <Accordion.Content>
13
+ <Flex direction="column" alignItems={"stretch"} gap={4} padding={4}>
14
+ <Typography variant="delta" as="h3" fontWeight="bold">
15
+ PayPal Integration
16
+ </Typography>
17
+ <Flex direction="column" alignItems={"stretch"} gap={2}>
18
+ <Typography variant="pi" fontWeight="bold">
19
+ Required Parameters:
20
+ </Typography>
21
+ <Flex direction="column" alignItems={"stretch"} gap={2}>
22
+ <Typography variant="pi">
23
+ • <strong>clearingtype</strong>: "wlt"
24
+ </Typography>
25
+ <Typography variant="pi">
26
+ • <strong>wallettype</strong>: "PPE" (PayPal Express)
27
+ </Typography>
28
+ <Typography variant="pi">
29
+ • <strong>shipping_firstname</strong>,{" "}
30
+ <strong>shipping_lastname</strong>,{" "}
31
+ <strong>shipping_street</strong>,{" "}
32
+ <strong>shipping_zip</strong>,{" "}
33
+ <strong>shipping_city</strong>,{" "}
34
+ <strong>shipping_country</strong> - Shipping address
35
+ </Typography>
36
+ </Flex>
37
+ </Flex>
38
+ <Box>
39
+ <Typography variant="pi" fontWeight="bold">
40
+ Preauthorization Request:
41
+ </Typography>
42
+ <div style={{ marginTop: "12px" }}>
43
+ <CodeBlock>{`POST /api/strapi-plugin-payone-provider/preauthorization
44
+
45
+ {
46
+ "amount": 1000,
47
+ "currency": "EUR",
48
+ "reference": "ORD-00123-ABCD",
49
+ "clearingtype": "wlt",
50
+ "wallettype": "PPE",
51
+ "firstname": "John",
52
+ "lastname": "Doe",
53
+ "email": "john.doe@example.com",
54
+ "street": "Main Street 123",
55
+ "zip": "12345",
56
+ "city": "Berlin",
57
+ "country": "DE",
58
+ "shipping_firstname": "John",
59
+ "shipping_lastname": "Doe",
60
+ "shipping_street": "Main Street 123",
61
+ "shipping_zip": "12345",
62
+ "shipping_city": "Berlin",
63
+ "shipping_country": "DE",
64
+ "successurl": "https://www.example.com/success",
65
+ "errorurl": "https://www.example.com/error",
66
+ "backurl": "https://www.example.com/back"
67
+ }`}</CodeBlock>
68
+ </div>
69
+ </Box>
70
+ <Box>
71
+ <Typography variant="pi" fontWeight="bold">
72
+ Response (Redirect to PayPal):
73
+ </Typography>
74
+ <div style={{ marginTop: "12px", marginBottom: "12px" }}>
75
+ <CodeBlock>{`{
76
+ "status": "REDIRECT",
77
+ "redirecturl": "https://www.paypal.com/checkoutnow?token=..."
78
+ }`}</CodeBlock>
79
+ </div>
80
+ <Typography variant="pi" textColor="neutral600">
81
+ ⚠️ PayPal always redirects. You must redirect the user to{" "}
82
+ <code>redirecturl</code> to complete the payment.
83
+ </Typography>
84
+ </Box>
85
+ <Box marginTop={2}>
86
+ <Typography variant="pi" fontWeight="bold">
87
+ PayPal Callback Response (after redirect):
88
+ </Typography>
89
+ <div style={{ marginTop: "12px" }}>
90
+ <CodeBlock>{`{
91
+ "status": "APPROVED",
92
+ "txid": "12345678",
93
+ "reference": "ORD-00123-ABCD"
94
+ }`}</CodeBlock>
95
+ </div>
96
+ </Box>
97
+ <Box marginTop={2}>
98
+ <Typography variant="pi" textColor="neutral600">
99
+ 📚 <strong>Payone PayPal Documentation:</strong>{" "}
100
+ <Link
101
+ href="https://docs.payone.com/display/public/PLATFORM/PayPal"
102
+ target="_blank"
103
+ rel="noopener noreferrer"
104
+ >
105
+ https://docs.payone.com/display/public/PLATFORM/PayPal
106
+ </Link>
107
+ </Typography>
108
+ </Box>
109
+ </Flex>
110
+ </Accordion.Content>
111
+ </Accordion.Item>
112
+ );
113
+ };
114
+
115
+ export default PayPalSection;
116
+
@@ -0,0 +1,55 @@
1
+ import * as React from "react";
2
+ import { Box, Card, CardBody, Flex, Typography } from "@strapi/design-system";
3
+
4
+ const PaymentMethodsSection = () => {
5
+ return (
6
+ <Card className="payment-card" id="payment-methods">
7
+ <CardBody padding={6}>
8
+ <Flex direction="column" alignItems="stretch" gap={4} width={"100%"}>
9
+ <Typography variant="delta" as="h3" fontWeight="bold">
10
+ Supported Payment Methods
11
+ </Typography>
12
+
13
+ <Flex direction="column" gap={2} alignItems="stretch" marginTop={4}>
14
+ <Typography variant="pi">
15
+ • <strong>cc</strong> - Credit Card (Visa, Mastercard, Amex)
16
+ </Typography>
17
+ <Typography variant="pi">
18
+ • <strong>wlt</strong> - PayPal
19
+ </Typography>
20
+ <Typography variant="pi">
21
+ • <strong>gpp</strong> - Google Pay
22
+ </Typography>
23
+ <Typography variant="pi">
24
+ • <strong>apl</strong> - Apple Pay
25
+ </Typography>
26
+ <Typography variant="pi">
27
+ • <strong>sb</strong> - Sofort Banking
28
+ </Typography>
29
+ <Typography variant="pi">
30
+ • <strong>elv</strong> - SEPA Direct Debit
31
+ </Typography>
32
+ </Flex>
33
+
34
+ <Typography variant="delta" as="h3" fontWeight="bold">
35
+ Available Card Types (for Credit Card):
36
+ </Typography>
37
+
38
+ <Flex direction="column" gap={2} alignItems="stretch" marginTop={4}>
39
+ <Typography variant="pi">
40
+ • <strong>V</strong> - Visa
41
+ </Typography>
42
+ <Typography variant="pi">
43
+ • <strong>M</strong> - Mastercard
44
+ </Typography>
45
+ <Typography variant="pi">
46
+ • <strong>A</strong> - American Express (Amex)
47
+ </Typography>
48
+ </Flex>
49
+ </Flex>
50
+ </CardBody>
51
+ </Card>
52
+ );
53
+ };
54
+
55
+ export default PaymentMethodsSection;
@@ -0,0 +1,47 @@
1
+ import * as React from "react";
2
+ import { Accordion, Flex, Typography, Link } from "@strapi/design-system";
3
+
4
+ const TableOfContents = () => {
5
+ return (
6
+ <Accordion.Root>
7
+ <Accordion.Item value="toc">
8
+ <Accordion.Header>
9
+ <Accordion.Trigger>Table of Contents</Accordion.Trigger>
10
+ </Accordion.Header>
11
+ <Accordion.Content>
12
+ <Flex direction="column" alignItems={"stretch"} gap={2} padding={4}>
13
+ <Typography variant="pi">
14
+ 1. <Link href="#base-url">Base URL & Authentication</Link>
15
+ </Typography>
16
+ <Typography variant="pi">
17
+ 2. <Link href="#payment-methods">Supported Payment Methods</Link>
18
+ </Typography>
19
+ <Typography variant="pi">
20
+ 3. <Link href="#credit-card">Credit Card Integration</Link>
21
+ </Typography>
22
+ <Typography variant="pi">
23
+ 4. <Link href="#paypal">PayPal Integration</Link>
24
+ </Typography>
25
+ <Typography variant="pi">
26
+ 5. <Link href="#google-pay">Google Pay Integration</Link>
27
+ </Typography>
28
+ <Typography variant="pi">
29
+ 6. <Link href="#apple-pay">Apple Pay Integration</Link>
30
+ </Typography>
31
+ <Typography variant="pi">
32
+ 7. <Link href="#3d-secure">3D Secure Authentication</Link>
33
+ </Typography>
34
+ <Typography variant="pi">
35
+ 8. <Link href="#capture-refund">Capture & Refund Operations</Link>
36
+ </Typography>
37
+ <Typography variant="pi">
38
+ 9. <Link href="#test-credentials">Test Credentials</Link>
39
+ </Typography>
40
+ </Flex>
41
+ </Accordion.Content>
42
+ </Accordion.Item>
43
+ </Accordion.Root>
44
+ );
45
+ };
46
+
47
+ export default TableOfContents;