strapi-plugin-payone-provider 1.6.2 → 1.6.4

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.
@@ -5,18 +5,15 @@ import {
5
5
  CardBody,
6
6
  Flex,
7
7
  Typography,
8
- Button
8
+ Button,
9
9
  } from "@strapi/design-system";
10
10
  import { Check } from "@strapi/icons";
11
11
  import ApplePayConfig from "./ApplePayConfig";
12
12
 
13
- const ApplePayConfigPanel = ({
14
- settings,
15
- onInputChange,
16
- isSaving,
17
- onSave
18
- }) => {
19
- const [applePayConfig, setApplePayConfig] = useState(settings?.applePayConfig || {});
13
+ const ApplePayConfigPanel = ({ settings, onInputChange, isSaving, onSave }) => {
14
+ const [applePayConfig, setApplePayConfig] = useState(
15
+ settings?.applePayConfig || {}
16
+ );
20
17
 
21
18
  useEffect(() => {
22
19
  setApplePayConfig(settings?.applePayConfig || {});
@@ -31,15 +28,6 @@ const ApplePayConfigPanel = ({
31
28
  paddingRight={8}
32
29
  >
33
30
  <Flex direction="column" alignItems="stretch" gap={8}>
34
- <Box>
35
- <Typography variant="beta" as="h2" fontWeight="bold" className="payment-title" style={{ fontSize: '20px', marginBottom: '4px' }}>
36
- Apple Pay Configuration
37
- </Typography>
38
- <Typography variant="pi" textColor="neutral600" marginTop={2} className="payment-subtitle" style={{ fontSize: '14px' }}>
39
- Configure Apple Pay settings for your payment gateway
40
- </Typography>
41
- </Box>
42
-
43
31
  <Box>
44
32
  <Card className="payment-card">
45
33
  <CardBody padding={6}>
@@ -68,7 +56,9 @@ const ApplePayConfigPanel = ({
68
56
  Save Apple Pay Configuration
69
57
  </Button>
70
58
  <Typography variant="sigma" textColor="neutral600">
71
- Note: Apple Pay configuration is used for Apple Pay payment requests. Make sure to configure the correct merchant identifier, supported networks, and capabilities for your region.
59
+ Note: Apple Pay configuration is used for Apple Pay payment
60
+ requests. Make sure to configure the correct merchant identifier,
61
+ supported networks, and capabilities for your region.
72
62
  </Typography>
73
63
  </Flex>
74
64
  </Box>
@@ -78,4 +68,3 @@ const ApplePayConfigPanel = ({
78
68
  };
79
69
 
80
70
  export default ApplePayConfigPanel;
81
-
@@ -10,9 +10,11 @@ import {
10
10
  TextInput,
11
11
  Select,
12
12
  Option,
13
- Alert
13
+ Alert,
14
14
  } from "@strapi/design-system";
15
- import { Play } from "@strapi/icons";
15
+ import { Play, Cog } from "@strapi/icons";
16
+ import { useHistory } from "react-router-dom";
17
+ import pluginId from "../../../pluginId";
16
18
 
17
19
  const ConfigurationPanel = ({
18
20
  settings,
@@ -21,17 +23,22 @@ const ConfigurationPanel = ({
21
23
  testResult,
22
24
  onSave,
23
25
  onTestConnection,
24
- onInputChange
26
+ onInputChange,
25
27
  }) => {
28
+ const history = useHistory();
26
29
  const mode = (settings?.mode || "test").toLowerCase();
27
30
 
28
31
  useEffect(() => {
29
- if (settings?.mode) {
30
- const currentMode = (settings.mode || "test").toLowerCase();
31
- console.log("[ConfigurationPanel] Mode updated:", currentMode);
32
- }
32
+ // Mode updated
33
33
  }, [settings?.mode]);
34
34
 
35
+ const handleNavigateToApplePayConfig = () => {
36
+ history.push(`/plugins/${pluginId}/apple-pay-config`);
37
+ };
38
+
39
+ const handleNavigateToGooglePayConfig = () => {
40
+ history.push(`/plugins/${pluginId}/google-pay-config`);
41
+ };
35
42
 
36
43
  return (
37
44
  <Box
@@ -43,10 +50,22 @@ const ConfigurationPanel = ({
43
50
  >
44
51
  <Flex direction="column" alignItems="stretch" gap={8}>
45
52
  <Box>
46
- <Typography variant="beta" as="h2" fontWeight="bold" className="payment-title" style={{ fontSize: '20px', marginBottom: '4px' }}>
53
+ <Typography
54
+ variant="beta"
55
+ as="h2"
56
+ fontWeight="bold"
57
+ className="payment-title"
58
+ style={{ fontSize: "20px", marginBottom: "4px" }}
59
+ >
47
60
  Payone API Configuration
48
61
  </Typography>
49
- <Typography variant="pi" textColor="neutral600" marginTop={2} className="payment-subtitle" style={{ fontSize: '14px' }}>
62
+ <Typography
63
+ variant="pi"
64
+ textColor="neutral600"
65
+ marginTop={2}
66
+ className="payment-subtitle"
67
+ style={{ fontSize: "14px" }}
68
+ >
50
69
  Configure your Payone payment gateway settings
51
70
  </Typography>
52
71
  </Box>
@@ -131,7 +150,12 @@ const ConfigurationPanel = ({
131
150
  />
132
151
  </Flex>
133
152
 
134
- <Flex direction="column" wrap="wrap" gap={1} alignItems="flex-start">
153
+ <Flex
154
+ direction="column"
155
+ wrap="wrap"
156
+ gap={1}
157
+ alignItems="flex-start"
158
+ >
135
159
  <Select
136
160
  label="Enable 3D Secure"
137
161
  name="enable3DSecure"
@@ -146,9 +170,35 @@ const ConfigurationPanel = ({
146
170
  <Option value="no">Disabled</Option>
147
171
  </Select>
148
172
  <Typography variant="pi" textColor="neutral600" marginTop={1}>
149
- When enabled, credit card payments will require 3D Secure authentication (SCA compliance)
173
+ When enabled, credit card payments will require 3D Secure
174
+ authentication (SCA compliance)
150
175
  </Typography>
151
176
  </Flex>
177
+
178
+ <Flex
179
+ direction="row"
180
+ gap={2}
181
+ wrap="wrap"
182
+ alignItems="flex-start"
183
+ marginTop={2}
184
+ >
185
+ <Button
186
+ variant="secondary"
187
+ startIcon={<Cog />}
188
+ onClick={handleNavigateToApplePayConfig}
189
+ className="payment-button"
190
+ >
191
+ Apple Pay Config
192
+ </Button>
193
+ <Button
194
+ variant="secondary"
195
+ startIcon={<Cog />}
196
+ onClick={handleNavigateToGooglePayConfig}
197
+ className="payment-button"
198
+ >
199
+ Google Pay Config
200
+ </Button>
201
+ </Flex>
152
202
  </Stack>
153
203
  </CardBody>
154
204
  </Card>
@@ -179,13 +229,18 @@ const ConfigurationPanel = ({
179
229
  loading={isTesting}
180
230
  startIcon={<Play />}
181
231
  className="payment-button payment-button-success"
182
- disabled={mode === 'live'}
232
+ disabled={mode === "live"}
183
233
  >
184
234
  {isTesting ? "Testing Connection..." : "Test Connection"}
185
235
  </Button>
186
- {mode === 'live' && (
187
- <Typography variant="pi" textColor="neutral600" style={{ marginTop: "8px" }}>
188
- Test Connection is disabled in live mode for security reasons.
236
+ {mode === "live" && (
237
+ <Typography
238
+ variant="pi"
239
+ textColor="neutral600"
240
+ style={{ marginTop: "8px" }}
241
+ >
242
+ Test Connection is disabled in live mode for security
243
+ reasons.
189
244
  </Typography>
190
245
  )}
191
246
 
@@ -222,7 +277,10 @@ const ConfigurationPanel = ({
222
277
  </CardBody>
223
278
  </Card>
224
279
  ) : (
225
- <Card className="payment-card" style={{ background: "#fff5f5" }}>
280
+ <Card
281
+ className="payment-card"
282
+ style={{ background: "#fff5f5" }}
283
+ >
226
284
  <CardBody padding={4}>
227
285
  <Stack spacing={2}>
228
286
  {testResult.errorcode && (
@@ -425,7 +425,6 @@ function PaymentForm() {
425
425
  });
426
426
 
427
427
  const result = await response.json();
428
- console.log('Payment result:', result);
429
428
  };
430
429
 
431
430
  return (
@@ -1,10 +1,23 @@
1
1
  import React from "react";
2
+ <<<<<<< HEAD
2
3
  import { Box, Flex, Typography, Select, Option, Checkbox, Stack } from "@strapi/design-system";
4
+ =======
5
+ import {
6
+ Box,
7
+ Flex,
8
+ Typography,
9
+ Select,
10
+ Option,
11
+ Checkbox,
12
+ Stack,
13
+ } from "@strapi/design-system";
14
+ >>>>>>> release/1.6.4
3
15
  import {
4
16
  GOOGLE_PAY_SUPPORTED_COUNTRIES,
5
17
  GOOGLE_PAY_SUPPORTED_CURRENCIES,
6
18
  GOOGLE_PAY_SUPPORTED_NETWORKS,
7
19
  GOOGLE_PAY_AUTH_METHODS,
20
+ <<<<<<< HEAD
8
21
  DEFAULT_GOOGLE_PAY_CONFIG
9
22
  } from "../../utils/googlePayConstants";
10
23
 
@@ -13,64 +26,69 @@ const GooglePayConfig = ({
13
26
  onConfigChange,
14
27
  settings
15
28
  }) => {
29
+ =======
30
+ DEFAULT_GOOGLE_PAY_CONFIG,
31
+ } from "../../utils/googlePayConstants";
32
+
33
+ const GooglePayConfig = ({ config, onConfigChange, settings }) => {
34
+ >>>>>>> release/1.6.4
16
35
  const {
17
36
  countryCode = DEFAULT_GOOGLE_PAY_CONFIG.countryCode,
18
37
  currencyCode = DEFAULT_GOOGLE_PAY_CONFIG.currencyCode,
19
38
  allowedCardNetworks = DEFAULT_GOOGLE_PAY_CONFIG.allowedCardNetworks,
20
39
  allowedAuthMethods = DEFAULT_GOOGLE_PAY_CONFIG.allowedAuthMethods,
40
+ <<<<<<< HEAD
21
41
  merchantName = DEFAULT_GOOGLE_PAY_CONFIG.merchantName
42
+ =======
43
+ merchantName = DEFAULT_GOOGLE_PAY_CONFIG.merchantName,
44
+ >>>>>>> release/1.6.4
22
45
  } = config || {};
23
46
 
24
47
  const handleCountryChange = (value) => {
25
48
  onConfigChange({
26
49
  ...config,
50
+ <<<<<<< HEAD
27
51
  countryCode: value
52
+ =======
53
+ countryCode: value,
54
+ >>>>>>> release/1.6.4
28
55
  });
29
56
  };
30
57
 
31
58
  const handleCurrencyChange = (value) => {
32
59
  onConfigChange({
33
60
  ...config,
34
- currencyCode: value
61
+ currencyCode: value,
35
62
  });
36
63
  };
37
64
 
38
65
  const handleNetworkToggle = (networkCode) => {
39
66
  const currentNetworks = allowedCardNetworks || [];
40
67
  const newNetworks = currentNetworks.includes(networkCode)
41
- ? currentNetworks.filter(n => n !== networkCode)
68
+ ? currentNetworks.filter((n) => n !== networkCode)
42
69
  : [...currentNetworks, networkCode];
43
70
 
44
71
  onConfigChange({
45
72
  ...config,
46
- allowedCardNetworks: newNetworks
73
+ allowedCardNetworks: newNetworks,
47
74
  });
48
75
  };
49
76
 
50
77
  const handleAuthMethodToggle = (authMethodCode) => {
51
78
  const currentMethods = allowedAuthMethods || [];
52
79
  const newMethods = currentMethods.includes(authMethodCode)
53
- ? currentMethods.filter(m => m !== authMethodCode)
80
+ ? currentMethods.filter((m) => m !== authMethodCode)
54
81
  : [...currentMethods, authMethodCode];
55
82
 
56
83
  onConfigChange({
57
84
  ...config,
58
- allowedAuthMethods: newMethods
85
+ allowedAuthMethods: newMethods,
59
86
  });
60
87
  };
61
88
 
62
89
  return (
63
90
  <Box>
64
91
  <Stack spacing={6}>
65
- <Box>
66
- <Typography variant="delta" as="h3" fontWeight="bold" style={{ marginBottom: "6px" }}>
67
- Google Pay Configuration
68
- </Typography>
69
- <Typography variant="pi" textColor="neutral600">
70
- Configure Google Pay settings for your payment gateway
71
- </Typography>
72
- </Box>
73
-
74
92
  {/* Country and Currency */}
75
93
  <Flex gap={4} wrap="wrap">
76
94
  <Box style={{ flex: 1, minWidth: "300px" }}>
@@ -82,7 +100,7 @@ const GooglePayConfig = ({
82
100
  hint="Select the country where your business operates"
83
101
  required
84
102
  >
85
- {GOOGLE_PAY_SUPPORTED_COUNTRIES.map(country => (
103
+ {GOOGLE_PAY_SUPPORTED_COUNTRIES.map((country) => (
86
104
  <Option key={country.code} value={country.code}>
87
105
  {country.name} ({country.code})
88
106
  </Option>
@@ -99,7 +117,7 @@ const GooglePayConfig = ({
99
117
  hint="Select the currency for transactions"
100
118
  required
101
119
  >
102
- {GOOGLE_PAY_SUPPORTED_CURRENCIES.map(currency => (
120
+ {GOOGLE_PAY_SUPPORTED_CURRENCIES.map((currency) => (
103
121
  <Option key={currency.code} value={currency.code}>
104
122
  {currency.name} ({currency.code}) {currency.symbol}
105
123
  </Option>
@@ -110,23 +128,33 @@ const GooglePayConfig = ({
110
128
 
111
129
  {/* Merchant Name */}
112
130
  <Box>
113
- <Typography variant="pi" fontWeight="semiBold" style={{ marginLeft: "2px" }}>
131
+ <Typography
132
+ variant="pi"
133
+ fontWeight="semiBold"
134
+ style={{ marginLeft: "2px" }}
135
+ >
114
136
  Merchant Name
115
137
  </Typography>
116
- <Typography variant="pi" textColor="neutral600" style={{ marginLeft: "2px" }}>
138
+ <Typography
139
+ variant="pi"
140
+ textColor="neutral600"
141
+ style={{ marginLeft: "2px" }}
142
+ >
117
143
  The name of your business as it will appear in Google Pay
118
144
  </Typography>
119
145
  <input
120
146
  type="text"
121
147
  value={merchantName}
122
- onChange={(e) => onConfigChange({ ...config, merchantName: e.target.value })}
148
+ onChange={(e) =>
149
+ onConfigChange({ ...config, merchantName: e.target.value })
150
+ }
123
151
  style={{
124
152
  width: "100%",
125
153
  padding: "8px 12px",
126
154
  marginTop: "8px",
127
155
  border: "1px solid #dcdce4",
128
156
  borderRadius: "4px",
129
- fontSize: "14px"
157
+ fontSize: "14px",
130
158
  }}
131
159
  placeholder="Your Store Name"
132
160
  />
@@ -134,18 +162,29 @@ const GooglePayConfig = ({
134
162
 
135
163
  {/* Allowed Card Networks */}
136
164
  <Box>
137
- <Typography variant="pi" fontWeight="semiBold" style={{ marginLeft: "2px" }}>
165
+ <Typography
166
+ variant="pi"
167
+ fontWeight="semiBold"
168
+ style={{ marginLeft: "2px" }}
169
+ >
138
170
  Allowed Card Networks
139
171
  </Typography>
140
- <Typography variant="pi" textColor="neutral600" style={{ marginLeft: "2px" }}>
172
+ <Typography
173
+ variant="pi"
174
+ textColor="neutral600"
175
+ style={{ marginLeft: "2px" }}
176
+ >
141
177
  Select payment card networks to accept
142
178
  </Typography>
143
179
  <Flex wrap="wrap" gap={4} style={{ marginTop: "12px" }}>
144
- {GOOGLE_PAY_SUPPORTED_NETWORKS.map(network => {
180
+ {GOOGLE_PAY_SUPPORTED_NETWORKS.map((network) => {
145
181
  const isSelected = allowedCardNetworks?.includes(network.code);
146
182
 
147
183
  return (
148
- <Box key={network.code} style={{ flex: "0 0 calc(50% - 8px)", minWidth: "250px" }}>
184
+ <Box
185
+ key={network.code}
186
+ style={{ flex: "0 0 calc(50% - 8px)", minWidth: "250px" }}
187
+ >
149
188
  <Checkbox
150
189
  name={`network-${network.code}`}
151
190
  checked={isSelected}
@@ -158,7 +197,11 @@ const GooglePayConfig = ({
158
197
  })}
159
198
  </Flex>
160
199
  {allowedCardNetworks?.length === 0 && (
161
- <Typography variant="pi" textColor="danger600" style={{ marginTop: "8px" }}>
200
+ <Typography
201
+ variant="pi"
202
+ textColor="danger600"
203
+ style={{ marginTop: "8px" }}
204
+ >
162
205
  At least one card network must be selected
163
206
  </Typography>
164
207
  )}
@@ -166,18 +209,29 @@ const GooglePayConfig = ({
166
209
 
167
210
  {/* Allowed Authentication Methods */}
168
211
  <Box>
169
- <Typography variant="pi" fontWeight="semiBold" style={{ marginLeft: "2px" }}>
212
+ <Typography
213
+ variant="pi"
214
+ fontWeight="semiBold"
215
+ style={{ marginLeft: "2px" }}
216
+ >
170
217
  Allowed Authentication Methods
171
218
  </Typography>
172
- <Typography variant="pi" textColor="neutral600" style={{ marginLeft: "2px" }}>
219
+ <Typography
220
+ variant="pi"
221
+ textColor="neutral600"
222
+ style={{ marginLeft: "2px" }}
223
+ >
173
224
  Select authentication methods for card payments
174
225
  </Typography>
175
226
  <Flex wrap="wrap" gap={4} style={{ marginTop: "12px" }}>
176
- {GOOGLE_PAY_AUTH_METHODS.map(method => {
227
+ {GOOGLE_PAY_AUTH_METHODS.map((method) => {
177
228
  const isSelected = allowedAuthMethods?.includes(method.code);
178
229
 
179
230
  return (
180
- <Box key={method.code} style={{ flex: "0 0 calc(50% - 8px)", minWidth: "250px" }}>
231
+ <Box
232
+ key={method.code}
233
+ style={{ flex: "0 0 calc(50% - 8px)", minWidth: "250px" }}
234
+ >
181
235
  <Checkbox
182
236
  name={`auth-method-${method.code}`}
183
237
  checked={isSelected}
@@ -190,7 +244,11 @@ const GooglePayConfig = ({
190
244
  })}
191
245
  </Flex>
192
246
  {allowedAuthMethods?.length === 0 && (
193
- <Typography variant="pi" textColor="danger600" style={{ marginTop: "8px" }}>
247
+ <Typography
248
+ variant="pi"
249
+ textColor="danger600"
250
+ style={{ marginTop: "8px" }}
251
+ >
194
252
  At least one authentication method must be selected
195
253
  </Typography>
196
254
  )}
@@ -198,14 +256,17 @@ const GooglePayConfig = ({
198
256
 
199
257
  {/* Gateway Merchant ID Info */}
200
258
  <Box>
201
- <Typography variant="pi" fontWeight="semiBold" style={{ marginLeft: "2px" }}>
259
+ <Typography
260
+ variant="pi"
261
+ fontWeight="semiBold"
262
+ style={{ marginLeft: "2px" }}
263
+ >
202
264
  Gateway Merchant ID
203
265
  </Typography>
204
266
  <Typography variant="pi" textColor="neutral600">
205
267
  {settings?.mid || settings?.portalid
206
268
  ? `Using: ${settings.mid || settings.portalid}`
207
- : "Gateway merchant ID will be obtained from your Payone Merchant ID (MID) or Portal ID. Make sure these are configured in the main Configuration tab."
208
- }
269
+ : "Gateway merchant ID will be obtained from your Payone Merchant ID (MID) or Portal ID. Make sure these are configured in the main Configuration tab."}
209
270
  </Typography>
210
271
  </Box>
211
272
  </Stack>
@@ -214,4 +275,3 @@ const GooglePayConfig = ({
214
275
  };
215
276
 
216
277
  export default GooglePayConfig;
217
-
@@ -6,6 +6,7 @@ import AuthorizationForm from "./paymentActions/AuthorizationForm";
6
6
  import CaptureForm from "./paymentActions/CaptureForm";
7
7
  import RefundForm from "./paymentActions/RefundForm";
8
8
  import PaymentResult from "./paymentActions/PaymentResult";
9
+ import ApplePayPanel from "./paymentActions/ApplePayPanel";
9
10
 
10
11
  const PaymentActionsPanel = ({
11
12
  paymentAmount,
@@ -57,66 +58,52 @@ const PaymentActionsPanel = ({
57
58
  style={{
58
59
  display: "flex",
59
60
  flexDirection: "column",
60
- alignItems: "flex-start",
61
- gap: "16px",
62
- marginTop: "24px",
63
- width: "100%",
61
+ alignItems: "center",
62
+ justifyContent: "center",
63
+ gap: "8px",
64
+ marginTop: "44px",
64
65
  }}
65
66
  >
66
- <Typography
67
- variant="pi"
68
- textColor="danger600"
69
- style={{
70
- fontSize: "14px",
71
- marginTop: "12px",
72
- marginBottom: "12px",
73
- fontWeight: "bold",
74
- }}
75
- >
76
- ⚠️ Payment Actions are disabled in live mode for security reasons. but
77
- you can test apple pay in live mode. For testing other payment
78
- methods, please use test mode.
67
+ <Typography variant="pi" textColor="neutral600">
68
+ Test Payments are only works in test mode.
69
+ </Typography>
70
+ <Typography variant="pi" textColor="neutral600">
71
+ Please switch to test mode in plugin settings to use test payments.
79
72
  </Typography>
80
-
81
- <PaymentMethodSelector
82
- paymentMethod={paymentMethod}
83
- setPaymentMethod={setPaymentMethod}
84
- captureMode={captureMode}
85
- setCaptureMode={setCaptureMode}
86
- onNavigateToConfig={onNavigateToConfig}
87
- settings={settings}
88
- isLiveMode={isLiveMode}
89
- />
90
-
91
- <hr className="payment-divider" />
92
- <Box className="payment-form-section">
93
- <AuthorizationForm
94
- paymentAmount={paymentAmount}
95
- setPaymentAmount={setPaymentAmount}
96
- authReference={authReference}
97
- setAuthReference={setAuthReference}
98
- isProcessingPayment={isProcessingPayment}
99
- onAuthorization={onAuthorization}
100
- paymentMethod={paymentMethod}
101
- settings={settings}
102
- googlePayToken={googlePayToken}
103
- setGooglePayToken={setGooglePayToken}
104
- applePayToken={applePayToken}
105
- setApplePayToken={setApplePayToken}
106
- cardtype={cardtype}
107
- setCardtype={setCardtype}
108
- cardpan={cardpan}
109
- setCardpan={setCardpan}
110
- cardexpiredate={cardexpiredate}
111
- setCardexpiredate={setCardexpiredate}
112
- cardcvc2={cardcvc2}
113
- setCardcvc2={setCardcvc2}
114
- />
115
- </Box>
116
73
  </Box>
117
74
  );
118
75
  }
119
76
 
77
+ if (paymentMethod === "apl") {
78
+ return (
79
+ <ApplePayPanel
80
+ paymentAmount={paymentAmount}
81
+ setPaymentAmount={setPaymentAmount}
82
+ authReference={authReference}
83
+ setAuthReference={setAuthReference}
84
+ isProcessingPayment={isProcessingPayment}
85
+ onAuthorization={onAuthorization}
86
+ paymentMethod={paymentMethod}
87
+ setPaymentMethod={setPaymentMethod}
88
+ captureMode={captureMode}
89
+ setCaptureMode={setCaptureMode}
90
+ settings={settings}
91
+ setGooglePayToken={setGooglePayToken}
92
+ applePayToken={applePayToken}
93
+ setApplePayToken={setApplePayToken}
94
+ cardtype={cardtype}
95
+ setCardtype={setCardtype}
96
+ cardpan={cardpan}
97
+ setCardpan={setCardpan}
98
+ cardexpiredate={cardexpiredate}
99
+ setCardexpiredate={setCardexpiredate}
100
+ cardcvc2={cardcvc2}
101
+ setCardcvc2={setCardcvc2}
102
+ onNavigateToConfig={onNavigateToConfig}
103
+ />
104
+ );
105
+ }
106
+
120
107
  return (
121
108
  <Box
122
109
  className="payment-container"
@@ -181,7 +168,6 @@ const PaymentActionsPanel = ({
181
168
  onPreauthorization={onPreauthorization}
182
169
  paymentMethod={paymentMethod}
183
170
  settings={settings}
184
- googlePayToken={googlePayToken}
185
171
  setGooglePayToken={setGooglePayToken}
186
172
  applePayToken={applePayToken}
187
173
  setApplePayToken={setApplePayToken}
@@ -209,7 +195,6 @@ const PaymentActionsPanel = ({
209
195
  onAuthorization={onAuthorization}
210
196
  paymentMethod={paymentMethod}
211
197
  settings={settings}
212
- googlePayToken={googlePayToken}
213
198
  setGooglePayToken={setGooglePayToken}
214
199
  applePayToken={applePayToken}
215
200
  setApplePayToken={setApplePayToken}
@@ -0,0 +1,51 @@
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
+ paymentMethod,
8
+ setPaymentMethod,
9
+ captureMode,
10
+ setCaptureMode,
11
+ onNavigateToConfig,
12
+ }) => {
13
+ return (
14
+ <Box
15
+ style={{
16
+ display: "flex",
17
+ flexDirection: "column",
18
+ alignItems: "flex-start",
19
+ gap: "16px",
20
+ marginTop: "24px",
21
+ width: "100%",
22
+ }}
23
+ >
24
+ <Typography
25
+ variant="pi"
26
+ textColor="warning600"
27
+ style={{
28
+ fontSize: "14px",
29
+ marginTop: "12px",
30
+ marginBottom: "12px",
31
+ fontWeight: "bold",
32
+ }}
33
+ >
34
+ ⚠️ Apple Pay can only be tested on a production domain with HTTPS and
35
+ Live mode. Testing in Strapi admin panel is not supported. Please test
36
+ Apple Pay on your production website.
37
+ </Typography>
38
+
39
+ <PaymentMethodSelector
40
+ paymentMethod={paymentMethod}
41
+ setPaymentMethod={setPaymentMethod}
42
+ captureMode={captureMode}
43
+ setCaptureMode={setCaptureMode}
44
+ onNavigateToConfig={onNavigateToConfig}
45
+ isLiveMode={false}
46
+ />
47
+ </Box>
48
+ );
49
+ };
50
+
51
+ export default ApplePayOnlyPanel;