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
@@ -1,312 +0,0 @@
1
- import React from "react";
2
- import {
3
- Box,
4
- Button,
5
- Card,
6
- CardBody,
7
- Flex,
8
- Stack,
9
- Typography,
10
- TextInput,
11
- Select,
12
- Option,
13
- Divider,
14
- } from "@strapi/design-system";
15
- import { Search } from "@strapi/icons";
16
- import TransactionHistoryItem from "./TransactionHistoryItem";
17
-
18
- const HistoryPanel = ({
19
- filters,
20
- onFilterChange,
21
- onFilterApply,
22
- isLoadingHistory,
23
- transactionHistory,
24
- paginatedTransactions,
25
- currentPage,
26
- totalPages,
27
- pageSize,
28
- onRefresh,
29
- onPageChange,
30
- }) => {
31
- return (
32
- <Box
33
- className="payment-container"
34
- paddingTop={8}
35
- paddingBottom={8}
36
- paddingLeft={8}
37
- paddingRight={8}
38
- >
39
- <Flex direction="column" alignItems="stretch" gap={8}>
40
- <Box>
41
- <Typography
42
- variant="beta"
43
- as="h2"
44
- className="payment-title"
45
- style={{ fontSize: "20px", marginBottom: "4px" }}
46
- >
47
- Transaction Management
48
- </Typography>
49
- <Typography
50
- variant="pi"
51
- textColor="neutral600"
52
- className="payment-subtitle"
53
- style={{ fontSize: "14px", marginTop: "4px" }}
54
- >
55
- View and filter all payment transactions processed through Payone
56
- </Typography>
57
- </Box>
58
- {/* Filters */}
59
- <Box>
60
- <Box marginBottom={4}>
61
- <Typography variant="delta" as="h3" fontWeight="bold">
62
- Transaction Filters
63
- </Typography>
64
- <Typography variant="pi" textColor="neutral600" marginTop={2}>
65
- Filter transactions by status, type, date range, and more
66
- </Typography>
67
- </Box>
68
- <Card className="payment-card">
69
- <CardBody padding={6}>
70
- <Stack spacing={4}>
71
- <Flex gap={4} wrap="wrap" alignItems="center">
72
- <TextInput
73
- label="Search"
74
- name="search"
75
- value={filters.search || ""}
76
- onChange={(e) => onFilterChange("search", e.target.value)}
77
- placeholder="Search by Status, Transaction ID, or Reference"
78
- className="payment-input"
79
- style={{ flex: 1, minWidth: "250px" }}
80
- />
81
- <Select
82
- label="Request Type"
83
- name="request_type"
84
- value={filters.request_type || ""}
85
- onChange={(value) => onFilterChange("request_type", value)}
86
- placeholder="Select request type"
87
- className="payment-input"
88
- style={{ flex: 1, minWidth: "200px" }}
89
- >
90
- <Option value="">All Types</Option>
91
- <Option value="preauthorization">Preauthorization</Option>
92
- <Option value="authorization">Authorization</Option>
93
- <Option value="capture">Capture</Option>
94
- <Option value="refund">Refund</Option>
95
- </Select>
96
- <Select
97
- label="Payment Method"
98
- name="payment_method"
99
- value={filters.payment_method || ""}
100
- onChange={(value) =>
101
- onFilterChange("payment_method", value)
102
- }
103
- placeholder="Select payment method"
104
- className="payment-input"
105
- style={{ flex: 1, minWidth: "200px" }}
106
- >
107
- <Option value="">All Methods</Option>
108
- <Option value="credit_card">Credit Card</Option>
109
- <Option value="paypal">PayPal</Option>
110
- <Option value="google_pay">Google Pay</Option>
111
- <Option value="apple_pay">Apple Pay</Option>
112
- <Option value="sofort">Sofort Banking</Option>
113
- <Option value="sepa">SEPA Direct Debit</Option>
114
- </Select>
115
- <TextInput
116
- label="Date From"
117
- name="date_from"
118
- value={filters.date_from || ""}
119
- onChange={(e) =>
120
- onFilterChange("date_from", e.target.value)
121
- }
122
- placeholder="YYYY-MM-DD"
123
- type="date"
124
- className="payment-input"
125
- style={{ flex: 1, minWidth: "150px" }}
126
- />
127
- <TextInput
128
- label="Date To"
129
- name="date_to"
130
- value={filters.date_to || ""}
131
- onChange={(e) => onFilterChange("date_to", e.target.value)}
132
- placeholder="YYYY-MM-DD"
133
- type="date"
134
- className="payment-input"
135
- style={{ flex: 1, minWidth: "150px" }}
136
- />
137
- <Button
138
- variant="default"
139
- onClick={onFilterApply}
140
- loading={isLoadingHistory}
141
- startIcon={<Search />}
142
- className="payment-button payment-button-primary"
143
- >
144
- Apply Filters
145
- </Button>
146
- </Flex>
147
- </Stack>
148
- </CardBody>
149
- </Card>
150
- </Box>
151
-
152
- <Divider />
153
-
154
- {/* Transaction History */}
155
- <Box>
156
- <Box marginBottom={6}>
157
- <Flex
158
- justifyContent="space-between"
159
- alignItems="center"
160
- marginBottom={4}
161
- >
162
- <Box>
163
- <Typography variant="delta" as="h3" fontWeight="bold">
164
- Transaction History
165
- </Typography>
166
- <Typography variant="pi" textColor="neutral600" marginTop={2}>
167
- {transactionHistory.length} total transactions •{" "}
168
- {paginatedTransactions.length} on page {currentPage} of{" "}
169
- {totalPages}
170
- </Typography>
171
- </Box>
172
- <Button
173
- variant="default"
174
- onClick={onRefresh}
175
- loading={isLoadingHistory}
176
- startIcon={<Search />}
177
- size="S"
178
- className="payment-button payment-button-success"
179
- >
180
- Refresh
181
- </Button>
182
- </Flex>
183
- </Box>
184
-
185
- {isLoadingHistory ? (
186
- <Box padding={4} textAlign="center">
187
- <Typography>Loading transactions...</Typography>
188
- </Box>
189
- ) : transactionHistory.length === 0 ? (
190
- <Box padding={4} textAlign="center">
191
- <Typography textColor="neutral600">
192
- No transactions found
193
- </Typography>
194
- </Box>
195
- ) : (
196
- <Box>
197
- {paginatedTransactions.map((transaction) => (
198
- <TransactionHistoryItem
199
- key={transaction.id}
200
- transaction={transaction}
201
- />
202
- ))}
203
-
204
- {/* Pagination */}
205
- <Box paddingTop={6} paddingBottom={4}>
206
- <Card className="payment-card">
207
- <CardBody padding={4}>
208
- <Flex justifyContent="space-between" alignItems="center">
209
- {transactionHistory.length > pageSize &&
210
- totalPages > 1 ? (
211
- <Flex gap={3} alignItems="center">
212
- <Button
213
- variant="default"
214
- size="S"
215
- onClick={() =>
216
- onPageChange(Math.max(1, currentPage - 1))
217
- }
218
- disabled={currentPage === 1}
219
- className={`payment-button ${
220
- currentPage === 1 ? "" : "payment-button-success"
221
- }`}
222
- style={{
223
- background:
224
- currentPage === 1 ? "#f6f6f9" : undefined,
225
- color: currentPage === 1 ? "#666687" : undefined,
226
- }}
227
- >
228
- ← Previous
229
- </Button>
230
-
231
- <Box
232
- padding={2}
233
- background="#f6f6f9"
234
- borderRadius="6px"
235
- >
236
- <Typography
237
- variant="pi"
238
- textColor="neutral600"
239
- fontWeight="bold"
240
- >
241
- Page {currentPage} of {totalPages}
242
- </Typography>
243
- </Box>
244
-
245
- <Button
246
- variant="default"
247
- size="S"
248
- onClick={() =>
249
- onPageChange(
250
- Math.min(totalPages, currentPage + 1)
251
- )
252
- }
253
- disabled={currentPage === totalPages}
254
- className={`payment-button ${
255
- currentPage === totalPages
256
- ? ""
257
- : "payment-button-success"
258
- }`}
259
- style={{
260
- background:
261
- currentPage === totalPages
262
- ? "#f6f6f9"
263
- : undefined,
264
- color:
265
- currentPage === totalPages
266
- ? "#666687"
267
- : undefined,
268
- }}
269
- >
270
- Next →
271
- </Button>
272
- </Flex>
273
- ) : (
274
- <Typography
275
- variant="pi"
276
- textColor="neutral600"
277
- fontWeight="medium"
278
- >
279
- {transactionHistory.length <= pageSize
280
- ? "All transactions shown"
281
- : "No pagination needed"}
282
- </Typography>
283
- )}
284
- </Flex>
285
- </CardBody>
286
- </Card>
287
- <Typography
288
- variant="pi"
289
- textColor="neutral600"
290
- fontWeight="medium"
291
- >
292
- Showing {paginatedTransactions.length} of{" "}
293
- {transactionHistory.length} transactions
294
- </Typography>
295
- </Box>
296
- </Box>
297
- )}
298
- </Box>
299
-
300
- <Box paddingTop={4}>
301
- <Typography variant="sigma" textColor="neutral600">
302
- Note: This shows all Payone transactions processed through this
303
- plugin. Transactions are automatically logged with detailed
304
- request/response data.
305
- </Typography>
306
- </Box>
307
- </Flex>
308
- </Box>
309
- );
310
- };
311
-
312
- export default HistoryPanel;
@@ -1,280 +0,0 @@
1
- import React from "react";
2
- import { Box, Flex, Typography } from "@strapi/design-system";
3
- import PaymentMethodSelector from "./paymentActions/PaymentMethodSelector";
4
- import PreauthorizationForm from "./paymentActions/PreauthorizationForm";
5
- import AuthorizationForm from "./paymentActions/AuthorizationForm";
6
- import CaptureForm from "./paymentActions/CaptureForm";
7
- import RefundForm from "./paymentActions/RefundForm";
8
- import PaymentResult from "./paymentActions/PaymentResult";
9
- import ApplePayPanel from "./paymentActions/ApplePayPanel";
10
-
11
- const PaymentActionsPanel = ({
12
- paymentAmount,
13
- setPaymentAmount,
14
- preauthReference,
15
- setPreauthReference,
16
- authReference,
17
- setAuthReference,
18
- captureTxid,
19
- setCaptureTxid,
20
- refundTxid,
21
- setRefundTxid,
22
- refundSequenceNumber,
23
- setRefundSequenceNumber,
24
- refundReference,
25
- setRefundReference,
26
- paymentMethod,
27
- setPaymentMethod,
28
- captureMode,
29
- setCaptureMode,
30
- isProcessingPayment,
31
- paymentError,
32
- paymentResult,
33
- onPreauthorization,
34
- onAuthorization,
35
- onCapture,
36
- onRefund,
37
- settings,
38
- setGooglePayToken,
39
- applePayToken,
40
- setApplePayToken,
41
- cardtype,
42
- setCardtype,
43
- cardpan,
44
- setCardpan,
45
- cardexpiredate,
46
- setCardexpiredate,
47
- cardcvc2,
48
- setCardcvc2,
49
- onNavigateToConfig,
50
- }) => {
51
- const mode = (settings?.mode || "test").toLowerCase();
52
- const isLiveMode = mode === "live";
53
-
54
- React.useEffect(() => {
55
- if (isLiveMode && paymentMethod !== "apl") {
56
- setPaymentMethod("apl");
57
- }
58
- }, [isLiveMode, paymentMethod]);
59
-
60
- if (isLiveMode && paymentMethod !== "apl") {
61
- return (
62
- <Box
63
- style={{
64
- display: "flex",
65
- flexDirection: "column",
66
- alignItems: "center",
67
- justifyContent: "center",
68
- gap: "8px",
69
- marginTop: "44px",
70
- }}
71
- >
72
- <Typography variant="pi" textColor="neutral600">
73
- Test Payments are only works in test mode.
74
- </Typography>
75
- <Typography variant="pi" textColor="neutral600">
76
- Please switch to test mode in plugin settings to use test payments.
77
- </Typography>
78
- </Box>
79
- );
80
- }
81
-
82
- if (paymentMethod === "apl") {
83
- return (
84
- <ApplePayPanel
85
- paymentAmount={paymentAmount}
86
- setPaymentAmount={setPaymentAmount}
87
- authReference={authReference}
88
- setAuthReference={setAuthReference}
89
- isProcessingPayment={isProcessingPayment}
90
- onAuthorization={onAuthorization}
91
- paymentMethod={paymentMethod}
92
- setPaymentMethod={setPaymentMethod}
93
- captureMode={captureMode}
94
- setCaptureMode={setCaptureMode}
95
- settings={settings}
96
- setGooglePayToken={setGooglePayToken}
97
- applePayToken={applePayToken}
98
- setApplePayToken={setApplePayToken}
99
- cardtype={cardtype}
100
- setCardtype={setCardtype}
101
- cardpan={cardpan}
102
- setCardpan={setCardpan}
103
- cardexpiredate={cardexpiredate}
104
- setCardexpiredate={setCardexpiredate}
105
- cardcvc2={cardcvc2}
106
- setCardcvc2={setCardcvc2}
107
- onNavigateToConfig={onNavigateToConfig}
108
- isLiveMode={isLiveMode}
109
- />
110
- );
111
- }
112
-
113
- return (
114
- <Box
115
- className="payment-container"
116
- paddingTop={8}
117
- paddingBottom={8}
118
- paddingLeft={8}
119
- paddingRight={8}
120
- >
121
- <Flex direction="column" alignItems="stretch" gap={6}>
122
- <Box
123
- style={{
124
- display: "flex",
125
- flexDirection: "column",
126
- alignItems: "flex-start",
127
- gap: "8px",
128
- }}
129
- >
130
- <Typography
131
- variant="beta"
132
- as="h2"
133
- className="payment-title"
134
- style={{ fontSize: "20px", marginBottom: "4px" }}
135
- >
136
- Payment Actions
137
- </Typography>
138
- <Typography
139
- variant="pi"
140
- textColor="neutral600"
141
- className="payment-subtitle"
142
- style={{ fontSize: "14px" }}
143
- >
144
- Process payments, captures, and refunds with multiple payment
145
- methods
146
- </Typography>
147
- </Box>
148
-
149
- <PaymentMethodSelector
150
- paymentMethod={paymentMethod}
151
- setPaymentMethod={setPaymentMethod}
152
- captureMode={captureMode}
153
- setCaptureMode={setCaptureMode}
154
- onNavigateToConfig={onNavigateToConfig}
155
- settings={settings}
156
- isLiveMode={isLiveMode}
157
- />
158
-
159
- <hr className="payment-divider" />
160
-
161
- <Box
162
- className="payment-form-section"
163
- style={{
164
- opacity: isLiveMode ? 0.5 : 1,
165
- pointerEvents: isLiveMode ? "none" : "auto",
166
- }}
167
- >
168
- <PreauthorizationForm
169
- paymentAmount={paymentAmount}
170
- setPaymentAmount={setPaymentAmount}
171
- preauthReference={preauthReference}
172
- setPreauthReference={setPreauthReference}
173
- isProcessingPayment={isProcessingPayment}
174
- onPreauthorization={onPreauthorization}
175
- paymentMethod={paymentMethod}
176
- settings={settings}
177
- setGooglePayToken={setGooglePayToken}
178
- applePayToken={applePayToken}
179
- setApplePayToken={setApplePayToken}
180
- cardtype={cardtype}
181
- setCardtype={setCardtype}
182
- cardpan={cardpan}
183
- setCardpan={setCardpan}
184
- cardexpiredate={cardexpiredate}
185
- setCardexpiredate={setCardexpiredate}
186
- cardcvc2={cardcvc2}
187
- setCardcvc2={setCardcvc2}
188
- isLiveMode={isLiveMode}
189
- />
190
- </Box>
191
-
192
- <hr className="payment-divider" />
193
-
194
- <Box className="payment-form-section">
195
- <AuthorizationForm
196
- paymentAmount={paymentAmount}
197
- setPaymentAmount={setPaymentAmount}
198
- authReference={authReference}
199
- setAuthReference={setAuthReference}
200
- isProcessingPayment={isProcessingPayment}
201
- onAuthorization={onAuthorization}
202
- paymentMethod={paymentMethod}
203
- settings={settings}
204
- setGooglePayToken={setGooglePayToken}
205
- applePayToken={applePayToken}
206
- setApplePayToken={setApplePayToken}
207
- cardtype={cardtype}
208
- setCardtype={setCardtype}
209
- cardpan={cardpan}
210
- setCardpan={setCardpan}
211
- cardexpiredate={cardexpiredate}
212
- setCardexpiredate={setCardexpiredate}
213
- cardcvc2={cardcvc2}
214
- setCardcvc2={setCardcvc2}
215
- isLiveMode={isLiveMode}
216
- />
217
- </Box>
218
-
219
- <hr className="payment-divider" />
220
-
221
- <Box
222
- className="payment-form-section"
223
- style={{
224
- opacity: isLiveMode ? 0.5 : 1,
225
- pointerEvents: isLiveMode ? "none" : "auto",
226
- }}
227
- >
228
- <CaptureForm
229
- paymentAmount={paymentAmount}
230
- setPaymentAmount={setPaymentAmount}
231
- captureTxid={captureTxid}
232
- setCaptureTxid={setCaptureTxid}
233
- isProcessingPayment={isProcessingPayment}
234
- onCapture={onCapture}
235
- />
236
- </Box>
237
-
238
- <hr className="payment-divider" />
239
-
240
- <Box
241
- className="payment-form-section"
242
- style={{
243
- opacity: isLiveMode ? 0.5 : 1,
244
- pointerEvents: isLiveMode ? "none" : "auto",
245
- }}
246
- >
247
- <RefundForm
248
- paymentAmount={paymentAmount}
249
- setPaymentAmount={setPaymentAmount}
250
- refundTxid={refundTxid}
251
- setRefundTxid={setRefundTxid}
252
- refundSequenceNumber={refundSequenceNumber}
253
- setRefundSequenceNumber={setRefundSequenceNumber}
254
- refundReference={refundReference}
255
- setRefundReference={setRefundReference}
256
- isProcessingPayment={isProcessingPayment}
257
- onRefund={onRefund}
258
- />
259
- </Box>
260
-
261
- <hr className="payment-divider" />
262
-
263
- <PaymentResult
264
- paymentError={paymentError}
265
- paymentResult={paymentResult}
266
- />
267
-
268
- <Box paddingTop={4}>
269
- <Typography variant="sigma" textColor="neutral600">
270
- Note: These payment actions allow you to test the complete payment
271
- flow: Preauthorization → Capture → Refund. Make sure to use valid
272
- Transaction IDs for capture and refund operations.
273
- </Typography>
274
- </Box>
275
- </Flex>
276
- </Box>
277
- );
278
- };
279
-
280
- export default PaymentActionsPanel;
@@ -1,95 +0,0 @@
1
- import React from "react";
2
- import { Box, Typography } from "@strapi/design-system";
3
- import PaymentMethodSelector from "./PaymentMethodSelector";
4
- import AuthorizationForm from "./AuthorizationForm";
5
-
6
- const ApplePayOnlyPanel = ({
7
- paymentAmount,
8
- setPaymentAmount,
9
- authReference,
10
- setAuthReference,
11
- isProcessingPayment,
12
- onAuthorization,
13
- paymentMethod,
14
- settings,
15
- setGooglePayToken,
16
- setPaymentMethod,
17
- captureMode,
18
- setCaptureMode,
19
- onNavigateToConfig,
20
- isLiveMode,
21
- setCardcvc2,
22
- cardtype,
23
- setCardtype,
24
- cardpan,
25
- setCardpan,
26
- cardexpiredate,
27
- setCardexpiredate,
28
- cardcvc2,
29
- applePayToken,
30
- setApplePayToken,
31
- }) => {
32
- return (
33
- <Box
34
- style={{
35
- display: "flex",
36
- flexDirection: "column",
37
- alignItems: "flex-start",
38
- gap: "16px",
39
- marginTop: "24px",
40
- width: "100%",
41
- }}
42
- >
43
- <Typography
44
- variant="pi"
45
- textColor="warning600"
46
- style={{
47
- fontSize: "14px",
48
- marginTop: "12px",
49
- marginBottom: "12px",
50
- fontWeight: "bold",
51
- }}
52
- >
53
- ⚠️ Apple Pay can only be tested on a production domain with HTTPS and
54
- Live mode. Testing in Strapi admin panel is not supported. Please test
55
- Apple Pay on your production website.
56
- </Typography>
57
-
58
- <PaymentMethodSelector
59
- paymentMethod={paymentMethod}
60
- setPaymentMethod={setPaymentMethod}
61
- captureMode={captureMode}
62
- setCaptureMode={setCaptureMode}
63
- onNavigateToConfig={onNavigateToConfig}
64
- isLiveMode={isLiveMode}
65
- />
66
-
67
- <hr className="payment-divider" />
68
-
69
- <AuthorizationForm
70
- paymentAmount={paymentAmount}
71
- setPaymentAmount={setPaymentAmount}
72
- authReference={authReference}
73
- setAuthReference={setAuthReference}
74
- isProcessingPayment={isProcessingPayment}
75
- onAuthorization={onAuthorization}
76
- paymentMethod={paymentMethod}
77
- settings={settings}
78
- setGooglePayToken={setGooglePayToken}
79
- applePayToken={applePayToken}
80
- setApplePayToken={setApplePayToken}
81
- cardtype={cardtype}
82
- setCardtype={setCardtype}
83
- cardpan={cardpan}
84
- setCardpan={setCardpan}
85
- cardexpiredate={cardexpiredate}
86
- setCardexpiredate={setCardexpiredate}
87
- cardcvc2={cardcvc2}
88
- setCardcvc2={setCardcvc2}
89
- isLiveMode={isLiveMode}
90
- />
91
- </Box>
92
- );
93
- };
94
-
95
- export default ApplePayOnlyPanel;