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.
- package/README.md +24 -11
- package/admin/src/components/Initializer/index.jsx +3 -3
- package/admin/src/components/PluginIcon/index.jsx +3 -3
- package/admin/src/index.js +33 -11
- package/admin/src/pages/App/components/AppHeader.jsx +17 -32
- package/admin/src/pages/App/components/AppTabs.jsx +36 -156
- package/admin/src/pages/App/components/ApplePayBtn.jsx +9 -11
- package/admin/src/pages/App/components/ApplePayConfig.jsx +221 -161
- package/admin/src/pages/App/components/ApplePayConfigPanel.jsx +33 -45
- package/admin/src/pages/App/components/DocsPanel.jsx +66 -1726
- package/admin/src/pages/App/components/GooglePayConfig.jsx +136 -169
- package/admin/src/pages/App/components/GooglePayConfigPanel.jsx +37 -55
- package/admin/src/pages/App/components/GooglePaybutton.jsx +101 -43
- package/admin/src/pages/App/components/RenderInput.jsx +94 -0
- package/admin/src/pages/App/components/StatusBadge.jsx +27 -16
- package/admin/src/pages/App/components/configuration/ConfigurationFields.jsx +255 -0
- package/admin/src/pages/App/components/configuration/ConfigurationPanel.jsx +54 -0
- package/admin/src/pages/App/components/configuration/TestConnection.jsx +130 -0
- package/admin/src/pages/App/components/docs/ApplePaySection.jsx +260 -0
- package/admin/src/pages/App/components/docs/BaseUrlSection.jsx +53 -0
- package/admin/src/pages/App/components/docs/CaptureRefundSection.jsx +113 -0
- package/admin/src/pages/App/components/docs/CodeBlock.jsx +59 -0
- package/admin/src/pages/App/components/docs/CreditCardSection.jsx +93 -0
- package/admin/src/pages/App/components/docs/GooglePaySection.jsx +248 -0
- package/admin/src/pages/App/components/docs/PayPalSection.jsx +116 -0
- package/admin/src/pages/App/components/docs/PaymentMethodsSection.jsx +55 -0
- package/admin/src/pages/App/components/docs/TableOfContents.jsx +47 -0
- package/admin/src/pages/App/components/docs/TestCredentialsSection.jsx +304 -0
- package/admin/src/pages/App/components/docs/ThreeDSecureSection.jsx +188 -0
- package/admin/src/pages/App/components/icons/BankIcon.jsx +1 -1
- package/admin/src/pages/App/components/icons/ChevronDownIcon.jsx +1 -1
- package/admin/src/pages/App/components/icons/ChevronUpIcon.jsx +1 -1
- package/admin/src/pages/App/components/icons/CreditCardIcon.jsx +1 -1
- package/admin/src/pages/App/components/icons/ErrorIcon.jsx +1 -1
- package/admin/src/pages/App/components/icons/InfoIcon.jsx +1 -1
- package/admin/src/pages/App/components/icons/MarkCircle.jsx +19 -0
- package/admin/src/pages/App/components/icons/PaymentIcon.jsx +1 -1
- package/admin/src/pages/App/components/icons/PendingIcon.jsx +1 -1
- package/admin/src/pages/App/components/icons/PersonIcon.jsx +1 -1
- package/admin/src/pages/App/components/icons/SuccessIcon.jsx +1 -1
- package/admin/src/pages/App/components/icons/WalletIcon.jsx +1 -1
- package/admin/src/pages/App/components/payment-actions/ApplePayPanel.jsx +51 -0
- package/admin/src/pages/App/components/payment-actions/AuthorizationForm.jsx +341 -0
- package/admin/src/pages/App/components/payment-actions/CaptureForm.jsx +128 -0
- package/admin/src/pages/App/components/{paymentActions → payment-actions}/CardDetailsInput.jsx +77 -72
- package/admin/src/pages/App/components/payment-actions/PaymentActionsPanel.jsx +194 -0
- package/admin/src/pages/App/components/payment-actions/PaymentMethodSelector.jsx +313 -0
- package/admin/src/pages/App/components/payment-actions/PaymentResult.jsx +133 -0
- package/admin/src/pages/App/components/payment-actions/PreauthorizationForm.jsx +280 -0
- package/admin/src/pages/App/components/payment-actions/RefundForm.jsx +121 -0
- package/admin/src/pages/App/components/transaction-history/FiltersPanel.jsx +145 -0
- package/admin/src/pages/App/components/transaction-history/HistoryPanel.jsx +50 -0
- package/admin/src/pages/App/components/transaction-history/TransactionTable.jsx +163 -0
- package/admin/src/pages/App/components/transaction-history/details/TransactionDetails.jsx +156 -0
- package/admin/src/pages/App/components/{TransactionHistoryItem.jsx → transaction-history/details/TransactionHistoryItem.jsx} +16 -28
- package/admin/src/pages/App/index.jsx +27 -67
- package/admin/src/pages/App/styles.css +46 -169
- package/admin/src/pages/constants/paymentConstants.js +52 -16
- package/admin/src/pages/hooks/use-system-theme.js +27 -0
- package/admin/src/pages/hooks/usePaymentActions.js +273 -210
- package/admin/src/pages/hooks/useSettings.js +87 -48
- package/admin/src/pages/hooks/useTransactionHistory.js +109 -47
- package/admin/src/pages/utils/api.js +57 -72
- package/admin/src/pages/utils/applePayConstants.js +2 -28
- package/admin/src/pages/utils/countryLanguageUtils.js +280 -0
- package/admin/src/pages/utils/getInputComponent.jsx +225 -0
- package/admin/src/pages/utils/googlePayConstants.js +2 -9
- package/admin/src/pages/utils/paymentUtils.js +13 -25
- package/admin/src/pages/utils/tooltipHelpers.js +18 -0
- package/admin/src/pages/utils/transactionTableUtils.js +60 -0
- package/package.json +7 -12
- package/server/config/index.js +18 -2
- package/server/controllers/payone.js +80 -31
- package/server/policies/is-auth.js +9 -3
- package/server/policies/isSuperAdmin.js +7 -5
- package/server/services/paymentService.js +6 -22
- package/server/services/payone.js +3 -3
- package/server/services/settingsService.js +13 -3
- package/server/services/testConnectionService.js +11 -73
- package/server/services/transactionService.js +61 -32
- package/server/utils/normalize.js +0 -12
- package/server/utils/paymentMethodParams.js +0 -1
- package/server/utils/responseParser.js +9 -14
- package/strapi-admin.js +3 -1
- package/admin/src/pages/App/components/ConfigurationPanel.jsx +0 -517
- package/admin/src/pages/App/components/HistoryPanel.jsx +0 -312
- package/admin/src/pages/App/components/PaymentActionsPanel.jsx +0 -280
- package/admin/src/pages/App/components/paymentActions/ApplePayPanel.jsx +0 -95
- package/admin/src/pages/App/components/paymentActions/AuthorizationForm.jsx +0 -197
- package/admin/src/pages/App/components/paymentActions/CaptureForm.jsx +0 -65
- package/admin/src/pages/App/components/paymentActions/PaymentMethodSelector.jsx +0 -306
- package/admin/src/pages/App/components/paymentActions/PaymentResult.jsx +0 -192
- package/admin/src/pages/App/components/paymentActions/PreauthorizationForm.jsx +0 -142
- package/admin/src/pages/App/components/paymentActions/RefundForm.jsx +0 -90
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
Box,
|
|
4
|
-
Flex,
|
|
5
|
-
Typography,
|
|
6
|
-
TextInput,
|
|
7
|
-
Button,
|
|
8
|
-
} from "@strapi/design-system";
|
|
9
|
-
import { Play } from "@strapi/icons";
|
|
10
|
-
import GooglePayButton from "../GooglePaybutton";
|
|
11
|
-
import ApplePayBtn from "../ApplePayBtn";
|
|
12
|
-
import CardDetailsInput from "./CardDetailsInput";
|
|
13
|
-
|
|
14
|
-
const AuthorizationForm = ({
|
|
15
|
-
paymentAmount,
|
|
16
|
-
setPaymentAmount,
|
|
17
|
-
authReference,
|
|
18
|
-
setAuthReference,
|
|
19
|
-
isProcessingPayment,
|
|
20
|
-
onAuthorization,
|
|
21
|
-
paymentMethod,
|
|
22
|
-
settings,
|
|
23
|
-
setGooglePayToken,
|
|
24
|
-
applePayToken,
|
|
25
|
-
setApplePayToken,
|
|
26
|
-
cardtype,
|
|
27
|
-
setCardtype,
|
|
28
|
-
cardpan,
|
|
29
|
-
setCardpan,
|
|
30
|
-
cardexpiredate,
|
|
31
|
-
setCardexpiredate,
|
|
32
|
-
cardcvc2,
|
|
33
|
-
setCardcvc2,
|
|
34
|
-
}) => {
|
|
35
|
-
const handleGooglePayToken = (token, paymentData) => {
|
|
36
|
-
if (!token) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
setGooglePayToken(token);
|
|
40
|
-
onAuthorization(token);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const handleGooglePayError = (error) => {
|
|
44
|
-
console.error("[AuthorizationForm] Google Pay error:", error);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const handleApplePayToken = async (token, paymentData) => {
|
|
48
|
-
if (!token) {
|
|
49
|
-
return Promise.reject(new Error("Token is missing"));
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
setApplePayToken(token);
|
|
53
|
-
|
|
54
|
-
return Promise.resolve({
|
|
55
|
-
success: true,
|
|
56
|
-
message:
|
|
57
|
-
"Token received successfully. Please click 'Process Authorization' to complete the payment.",
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const handleApplePayError = (error) => {
|
|
62
|
-
console.error("[AuthorizationForm] Apple Pay error:", error);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
return (
|
|
66
|
-
<Flex direction="column" alignItems="stretch" gap={4}>
|
|
67
|
-
<Flex direction="row" gap={2}>
|
|
68
|
-
<Typography
|
|
69
|
-
variant="omega"
|
|
70
|
-
fontWeight="semiBold"
|
|
71
|
-
textColor="neutral800"
|
|
72
|
-
className="payment-form-title"
|
|
73
|
-
>
|
|
74
|
-
Authorization
|
|
75
|
-
</Typography>
|
|
76
|
-
<Typography
|
|
77
|
-
variant="pi"
|
|
78
|
-
textColor="neutral600"
|
|
79
|
-
className="payment-form-description"
|
|
80
|
-
>
|
|
81
|
-
Authorize and capture an amount immediately.
|
|
82
|
-
</Typography>
|
|
83
|
-
</Flex>
|
|
84
|
-
|
|
85
|
-
<Flex gap={4} wrap="wrap">
|
|
86
|
-
<TextInput
|
|
87
|
-
label="Amount (in cents) *"
|
|
88
|
-
name="authAmount"
|
|
89
|
-
value={paymentAmount}
|
|
90
|
-
onChange={(e) => setPaymentAmount(e.target.value)}
|
|
91
|
-
placeholder="Enter amount (e.g., 1000 for €10.00)"
|
|
92
|
-
hint="Amount in cents (e.g., 1000 = €10.00)"
|
|
93
|
-
required
|
|
94
|
-
className="payment-input"
|
|
95
|
-
style={{ flex: 1, minWidth: "250px" }}
|
|
96
|
-
/>
|
|
97
|
-
|
|
98
|
-
<TextInput
|
|
99
|
-
label="Reference *"
|
|
100
|
-
name="authReference"
|
|
101
|
-
value={authReference}
|
|
102
|
-
onChange={(e) => setAuthReference(e.target.value)}
|
|
103
|
-
placeholder="Auto-generated if empty"
|
|
104
|
-
hint="Reference will be auto-generated if left empty"
|
|
105
|
-
className="payment-input"
|
|
106
|
-
style={{ flex: 1, minWidth: "250px" }}
|
|
107
|
-
/>
|
|
108
|
-
</Flex>
|
|
109
|
-
|
|
110
|
-
{paymentMethod === "cc" && settings?.enable3DSecure && (
|
|
111
|
-
<Box marginTop={4}>
|
|
112
|
-
<CardDetailsInput
|
|
113
|
-
cardtype={cardtype}
|
|
114
|
-
setCardtype={setCardtype}
|
|
115
|
-
cardpan={cardpan}
|
|
116
|
-
setCardpan={setCardpan}
|
|
117
|
-
cardexpiredate={cardexpiredate}
|
|
118
|
-
setCardexpiredate={setCardexpiredate}
|
|
119
|
-
cardcvc2={cardcvc2}
|
|
120
|
-
setCardcvc2={setCardcvc2}
|
|
121
|
-
/>
|
|
122
|
-
</Box>
|
|
123
|
-
)}
|
|
124
|
-
|
|
125
|
-
{paymentMethod === "gpp" ? (
|
|
126
|
-
<GooglePayButton
|
|
127
|
-
amount={paymentAmount}
|
|
128
|
-
currency="EUR"
|
|
129
|
-
onTokenReceived={handleGooglePayToken}
|
|
130
|
-
onError={handleGooglePayError}
|
|
131
|
-
settings={settings}
|
|
132
|
-
/>
|
|
133
|
-
) : paymentMethod === "apl" ? (
|
|
134
|
-
<Box>
|
|
135
|
-
<ApplePayBtn
|
|
136
|
-
amount={paymentAmount}
|
|
137
|
-
onTokenReceived={handleApplePayToken}
|
|
138
|
-
onError={handleApplePayError}
|
|
139
|
-
settings={settings}
|
|
140
|
-
/>
|
|
141
|
-
{applePayToken && (
|
|
142
|
-
<Box
|
|
143
|
-
marginTop={3}
|
|
144
|
-
style={{
|
|
145
|
-
width: "100%",
|
|
146
|
-
display: "flex",
|
|
147
|
-
flexDirection: "column",
|
|
148
|
-
alignItems: "flex-start",
|
|
149
|
-
gap: "8px",
|
|
150
|
-
}}
|
|
151
|
-
>
|
|
152
|
-
<Typography
|
|
153
|
-
variant="pi"
|
|
154
|
-
textColor="success600"
|
|
155
|
-
style={{ marginBottom: "8px", fontWeight: "bold" }}
|
|
156
|
-
>
|
|
157
|
-
✓ Apple Pay token received. You can now process the
|
|
158
|
-
authorization:
|
|
159
|
-
</Typography>
|
|
160
|
-
<Button
|
|
161
|
-
variant="default"
|
|
162
|
-
onClick={() => onAuthorization(applePayToken)}
|
|
163
|
-
loading={isProcessingPayment}
|
|
164
|
-
startIcon={<Play />}
|
|
165
|
-
style={{ maxWidth: "200px" }}
|
|
166
|
-
disabled={!paymentAmount.trim() || !authReference.trim()}
|
|
167
|
-
className="payment-button payment-button-primary"
|
|
168
|
-
>
|
|
169
|
-
Process Authorization
|
|
170
|
-
</Button>
|
|
171
|
-
</Box>
|
|
172
|
-
)}
|
|
173
|
-
</Box>
|
|
174
|
-
) : (
|
|
175
|
-
<Button
|
|
176
|
-
variant="default"
|
|
177
|
-
onClick={onAuthorization}
|
|
178
|
-
loading={isProcessingPayment}
|
|
179
|
-
startIcon={<Play />}
|
|
180
|
-
style={{ maxWidth: "200px" }}
|
|
181
|
-
className="payment-button payment-button-primary"
|
|
182
|
-
disabled={
|
|
183
|
-
!paymentAmount.trim() ||
|
|
184
|
-
(paymentMethod === "cc" &&
|
|
185
|
-
settings?.enable3DSecure !== false &&
|
|
186
|
-
(!cardtype || !cardpan || !cardexpiredate || !cardcvc2)) ||
|
|
187
|
-
(paymentMethod === "apl" && !applePayToken)
|
|
188
|
-
}
|
|
189
|
-
>
|
|
190
|
-
Process Authorization
|
|
191
|
-
</Button>
|
|
192
|
-
)}
|
|
193
|
-
</Flex>
|
|
194
|
-
);
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
export default AuthorizationForm;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Box, Flex, Typography, TextInput, Button } from "@strapi/design-system";
|
|
3
|
-
import { Play } from "@strapi/icons";
|
|
4
|
-
|
|
5
|
-
const CaptureForm = ({
|
|
6
|
-
paymentAmount,
|
|
7
|
-
setPaymentAmount,
|
|
8
|
-
captureTxid,
|
|
9
|
-
setCaptureTxid,
|
|
10
|
-
isProcessingPayment,
|
|
11
|
-
onCapture
|
|
12
|
-
}) => {
|
|
13
|
-
return (
|
|
14
|
-
<Flex direction="column" alignItems="stretch" gap={4}>
|
|
15
|
-
<Flex direction="row" gap={2}>
|
|
16
|
-
<Typography variant="omega" fontWeight="semiBold" textColor="neutral800" className="payment-form-title">
|
|
17
|
-
Capture
|
|
18
|
-
</Typography>
|
|
19
|
-
<Typography variant="pi" textColor="neutral600" className="payment-form-description">
|
|
20
|
-
Capture a previously authorized amount. Note: Reference parameter is
|
|
21
|
-
not supported by Payone capture.
|
|
22
|
-
</Typography>
|
|
23
|
-
</Flex>
|
|
24
|
-
|
|
25
|
-
<Flex gap={4} wrap="wrap">
|
|
26
|
-
<TextInput
|
|
27
|
-
label="Transaction ID"
|
|
28
|
-
name="captureTxid"
|
|
29
|
-
value={captureTxid}
|
|
30
|
-
onChange={(e) => setCaptureTxid(e.target.value)}
|
|
31
|
-
placeholder="Enter TxId from preauthorization"
|
|
32
|
-
hint="Transaction ID from a previous preauthorization"
|
|
33
|
-
className="payment-input"
|
|
34
|
-
style={{ flex: 1, minWidth: "250px" }}
|
|
35
|
-
/>
|
|
36
|
-
|
|
37
|
-
<TextInput
|
|
38
|
-
label="Amount (in cents)"
|
|
39
|
-
name="captureAmount"
|
|
40
|
-
value={paymentAmount}
|
|
41
|
-
onChange={(e) => setPaymentAmount(e.target.value)}
|
|
42
|
-
placeholder="1000"
|
|
43
|
-
hint="Amount in cents to capture"
|
|
44
|
-
className="payment-input"
|
|
45
|
-
style={{ flex: 1, minWidth: "250px" }}
|
|
46
|
-
/>
|
|
47
|
-
</Flex>
|
|
48
|
-
|
|
49
|
-
<Button
|
|
50
|
-
variant="default"
|
|
51
|
-
onClick={onCapture}
|
|
52
|
-
loading={isProcessingPayment}
|
|
53
|
-
startIcon={<Play />}
|
|
54
|
-
style={{ maxWidth: '200px' }}
|
|
55
|
-
className="payment-button payment-button-primary"
|
|
56
|
-
disabled={!captureTxid.trim() || !paymentAmount.trim()}
|
|
57
|
-
>
|
|
58
|
-
Process Capture
|
|
59
|
-
</Button>
|
|
60
|
-
</Flex>
|
|
61
|
-
);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export default CaptureForm;
|
|
65
|
-
|
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
Box,
|
|
4
|
-
Flex,
|
|
5
|
-
Select,
|
|
6
|
-
Option,
|
|
7
|
-
Typography,
|
|
8
|
-
Link,
|
|
9
|
-
Alert,
|
|
10
|
-
} from "@strapi/design-system";
|
|
11
|
-
import pluginId from "../../../../pluginId";
|
|
12
|
-
import {
|
|
13
|
-
getPaymentMethodOptions,
|
|
14
|
-
supportsCaptureMode,
|
|
15
|
-
getCaptureModeOptions,
|
|
16
|
-
getPaymentMethodDisplayName,
|
|
17
|
-
} from "../../../utils/paymentUtils";
|
|
18
|
-
|
|
19
|
-
const PaymentMethodSelector = ({
|
|
20
|
-
paymentMethod,
|
|
21
|
-
setPaymentMethod,
|
|
22
|
-
captureMode,
|
|
23
|
-
setCaptureMode,
|
|
24
|
-
onNavigateToConfig,
|
|
25
|
-
isLiveMode,
|
|
26
|
-
}) => {
|
|
27
|
-
return (
|
|
28
|
-
<Box>
|
|
29
|
-
<Flex direction="column" alignItems="stretch" gap={4}>
|
|
30
|
-
<Select
|
|
31
|
-
label="Select Payment Method"
|
|
32
|
-
name="paymentMethod"
|
|
33
|
-
value={paymentMethod}
|
|
34
|
-
onChange={(value) => setPaymentMethod(value)}
|
|
35
|
-
hint={`Current: ${getPaymentMethodDisplayName(paymentMethod)}`}
|
|
36
|
-
>
|
|
37
|
-
{getPaymentMethodOptions(isLiveMode).map((option) => (
|
|
38
|
-
<Option key={option.value} value={option.value}>
|
|
39
|
-
{option.label}
|
|
40
|
-
</Option>
|
|
41
|
-
))}
|
|
42
|
-
</Select>
|
|
43
|
-
{paymentMethod === "apl" && onNavigateToConfig && (
|
|
44
|
-
<>
|
|
45
|
-
<Box
|
|
46
|
-
style={{ display: "flex", flexDirection: "column", gap: "16px" }}
|
|
47
|
-
>
|
|
48
|
-
<Box
|
|
49
|
-
style={{
|
|
50
|
-
background: "transparent",
|
|
51
|
-
padding: "16px",
|
|
52
|
-
borderRadius: "4px",
|
|
53
|
-
border: "1px solid #eaeaea",
|
|
54
|
-
}}
|
|
55
|
-
>
|
|
56
|
-
<Typography variant="pi" style={{ lineHeight: "1.6" }}>
|
|
57
|
-
<strong>Apple Pay requires middleware configuration</strong>{" "}
|
|
58
|
-
to work properly. You must configure Content Security Policy
|
|
59
|
-
(CSP) in{" "}
|
|
60
|
-
<code
|
|
61
|
-
style={{
|
|
62
|
-
padding: "2px 6px",
|
|
63
|
-
borderRadius: "3px",
|
|
64
|
-
fontSize: "13px",
|
|
65
|
-
}}
|
|
66
|
-
>
|
|
67
|
-
config/middlewares.js
|
|
68
|
-
</code>{" "}
|
|
69
|
-
to allow Apple Pay scripts.
|
|
70
|
-
</Typography>
|
|
71
|
-
|
|
72
|
-
<Box style={{ marginTop: "16px" }}>
|
|
73
|
-
<Typography
|
|
74
|
-
variant="pi"
|
|
75
|
-
style={{
|
|
76
|
-
fontWeight: "600",
|
|
77
|
-
marginBottom: "8px",
|
|
78
|
-
display: "block",
|
|
79
|
-
}}
|
|
80
|
-
>
|
|
81
|
-
Required CSP directives:
|
|
82
|
-
</Typography>
|
|
83
|
-
|
|
84
|
-
<Box>
|
|
85
|
-
<Typography
|
|
86
|
-
variant="pi"
|
|
87
|
-
style={{
|
|
88
|
-
fontFamily: "monospace",
|
|
89
|
-
fontSize: "12px",
|
|
90
|
-
lineHeight: "1.8",
|
|
91
|
-
}}
|
|
92
|
-
>
|
|
93
|
-
<div>
|
|
94
|
-
'script-src': ['https://applepay.cdn-apple.com',
|
|
95
|
-
'https://www.apple.com']
|
|
96
|
-
</div>
|
|
97
|
-
<div>
|
|
98
|
-
'connect-src': ['https://applepay.cdn-apple.com',
|
|
99
|
-
'https://www.apple.com']
|
|
100
|
-
</div>
|
|
101
|
-
<div>'frame-src': ['https://applepay.cdn-apple.com']</div>
|
|
102
|
-
</Typography>
|
|
103
|
-
</Box>
|
|
104
|
-
</Box>
|
|
105
|
-
|
|
106
|
-
<Box
|
|
107
|
-
padding={2}
|
|
108
|
-
background="warning100"
|
|
109
|
-
style={{
|
|
110
|
-
marginTop: "16px",
|
|
111
|
-
borderRadius: "4px",
|
|
112
|
-
borderLeft: "3px solid #f29d41",
|
|
113
|
-
}}
|
|
114
|
-
>
|
|
115
|
-
<Typography variant="pi" style={{ fontWeight: "600" }}>
|
|
116
|
-
⚠️ Without this configuration, Apple Pay will NOT work!
|
|
117
|
-
</Typography>
|
|
118
|
-
</Box>
|
|
119
|
-
</Box>
|
|
120
|
-
|
|
121
|
-
<Box
|
|
122
|
-
style={{
|
|
123
|
-
background: "transparent",
|
|
124
|
-
padding: "16px",
|
|
125
|
-
borderRadius: "4px",
|
|
126
|
-
border: "1px solid #eaeaea",
|
|
127
|
-
}}
|
|
128
|
-
>
|
|
129
|
-
<Typography variant="pi" style={{ lineHeight: "1.6" }}>
|
|
130
|
-
<strong>Download the domain verification file</strong> from
|
|
131
|
-
your Payone merchant portal and place it in the following
|
|
132
|
-
locations:
|
|
133
|
-
</Typography>
|
|
134
|
-
|
|
135
|
-
<Box>
|
|
136
|
-
<Typography
|
|
137
|
-
variant="pi"
|
|
138
|
-
style={{
|
|
139
|
-
fontFamily: "monospace",
|
|
140
|
-
fontSize: "12px",
|
|
141
|
-
lineHeight: "1.8",
|
|
142
|
-
}}
|
|
143
|
-
>
|
|
144
|
-
<div style={{ marginBottom: "8px" }}>
|
|
145
|
-
<strong>Strapi:</strong>{" "}
|
|
146
|
-
<code>
|
|
147
|
-
public/.well-known/apple-developer-merchantid-domain-association
|
|
148
|
-
</code>
|
|
149
|
-
</div>
|
|
150
|
-
<div>
|
|
151
|
-
<strong>Frontend:</strong>{" "}
|
|
152
|
-
<code>
|
|
153
|
-
public/.well-known/apple-developer-merchantid-domain-association
|
|
154
|
-
</code>
|
|
155
|
-
</div>
|
|
156
|
-
</Typography>
|
|
157
|
-
</Box>
|
|
158
|
-
|
|
159
|
-
<Box style={{ marginTop: "16px" }}>
|
|
160
|
-
<Typography variant="pi" style={{ lineHeight: "1.6" }}>
|
|
161
|
-
<strong>Download URL:</strong> Get the domain verification
|
|
162
|
-
file from Payone documentation:
|
|
163
|
-
</Typography>
|
|
164
|
-
<Box
|
|
165
|
-
padding={2}
|
|
166
|
-
background="primary100"
|
|
167
|
-
style={{ marginTop: "8px", borderRadius: "4px" }}
|
|
168
|
-
>
|
|
169
|
-
<Link
|
|
170
|
-
href="https://docs.payone.com/payment-methods/apple-pay/apple-pay-without-dev"
|
|
171
|
-
target="_blank"
|
|
172
|
-
rel="noopener noreferrer"
|
|
173
|
-
style={{
|
|
174
|
-
color: "#4945ff",
|
|
175
|
-
textDecoration: "none",
|
|
176
|
-
fontWeight: "500",
|
|
177
|
-
fontSize: "14px",
|
|
178
|
-
}}
|
|
179
|
-
>
|
|
180
|
-
→
|
|
181
|
-
https://docs.payone.com/payment-methods/apple-pay/apple-pay-without-dev
|
|
182
|
-
</Link>
|
|
183
|
-
</Box>
|
|
184
|
-
</Box>
|
|
185
|
-
|
|
186
|
-
<Box
|
|
187
|
-
padding={2}
|
|
188
|
-
background="danger100"
|
|
189
|
-
style={{
|
|
190
|
-
marginTop: "16px",
|
|
191
|
-
borderRadius: "4px",
|
|
192
|
-
borderLeft: "3px solid #d02b20",
|
|
193
|
-
}}
|
|
194
|
-
>
|
|
195
|
-
<Typography
|
|
196
|
-
variant="pi"
|
|
197
|
-
textColor="danger600"
|
|
198
|
-
style={{ fontWeight: "600" }}
|
|
199
|
-
>
|
|
200
|
-
⚠️ Without this file, Apple Pay will NOT work on your
|
|
201
|
-
domain!
|
|
202
|
-
</Typography>
|
|
203
|
-
</Box>
|
|
204
|
-
</Box>
|
|
205
|
-
</Box>
|
|
206
|
-
|
|
207
|
-
<Box padding={3} borderRadius="4px">
|
|
208
|
-
<Typography variant="pi" textColor="neutral600">
|
|
209
|
-
Configure Apple Pay settings:{" "}
|
|
210
|
-
<Link
|
|
211
|
-
href={`/plugins/${pluginId}/apple-pay-config`}
|
|
212
|
-
onClick={(e) => {
|
|
213
|
-
e.preventDefault();
|
|
214
|
-
onNavigateToConfig("apple-pay");
|
|
215
|
-
}}
|
|
216
|
-
style={{
|
|
217
|
-
cursor: "pointer",
|
|
218
|
-
textDecoration: "underline",
|
|
219
|
-
color: "#0066ff",
|
|
220
|
-
}}
|
|
221
|
-
>
|
|
222
|
-
/plugins/{pluginId}/apple-pay-config
|
|
223
|
-
</Link>
|
|
224
|
-
</Typography>
|
|
225
|
-
</Box>
|
|
226
|
-
</>
|
|
227
|
-
)}
|
|
228
|
-
{paymentMethod === "gpp" && onNavigateToConfig && (
|
|
229
|
-
<>
|
|
230
|
-
<Alert
|
|
231
|
-
closeLabel="Close"
|
|
232
|
-
title="⚠️ Important: Middleware Configuration Required"
|
|
233
|
-
variant="warning"
|
|
234
|
-
>
|
|
235
|
-
<Typography variant="pi" marginTop={2}>
|
|
236
|
-
<strong>Google Pay requires middleware configuration</strong> to
|
|
237
|
-
work properly. You must configure Content Security Policy (CSP)
|
|
238
|
-
in <code>config/middlewares.js</code> to allow Google Pay
|
|
239
|
-
scripts, otherwise Google Pay will NOT work.
|
|
240
|
-
</Typography>
|
|
241
|
-
<Typography variant="pi" marginTop={2}>
|
|
242
|
-
Required CSP directives for Google Pay:
|
|
243
|
-
</Typography>
|
|
244
|
-
<Box
|
|
245
|
-
marginTop={2}
|
|
246
|
-
padding={2}
|
|
247
|
-
background="neutral100"
|
|
248
|
-
borderRadius="4px"
|
|
249
|
-
>
|
|
250
|
-
<Typography
|
|
251
|
-
variant="pi"
|
|
252
|
-
style={{ fontFamily: "monospace", fontSize: "12px" }}
|
|
253
|
-
>
|
|
254
|
-
'script-src': ['https://pay.google.com']
|
|
255
|
-
<br />
|
|
256
|
-
'connect-src': ['https://pay.google.com']
|
|
257
|
-
<br />
|
|
258
|
-
'frame-src': ['https://pay.google.com']
|
|
259
|
-
</Typography>
|
|
260
|
-
</Box>
|
|
261
|
-
<Typography variant="pi" marginTop={2} fontWeight="bold">
|
|
262
|
-
⚠️ Without this configuration, Google Pay will NOT work!
|
|
263
|
-
</Typography>
|
|
264
|
-
</Alert>
|
|
265
|
-
<Box padding={3} background="neutral100" borderRadius="4px">
|
|
266
|
-
<Typography variant="pi" textColor="neutral600">
|
|
267
|
-
Configure Google Pay settings:{" "}
|
|
268
|
-
<Link
|
|
269
|
-
href={`/plugins/${pluginId}/google-pay-config`}
|
|
270
|
-
onClick={(e) => {
|
|
271
|
-
e.preventDefault();
|
|
272
|
-
onNavigateToConfig("google-pay");
|
|
273
|
-
}}
|
|
274
|
-
style={{
|
|
275
|
-
cursor: "pointer",
|
|
276
|
-
textDecoration: "underline",
|
|
277
|
-
color: "#0066ff",
|
|
278
|
-
}}
|
|
279
|
-
>
|
|
280
|
-
/plugins/{pluginId}/google-pay-config
|
|
281
|
-
</Link>
|
|
282
|
-
</Typography>
|
|
283
|
-
</Box>
|
|
284
|
-
</>
|
|
285
|
-
)}
|
|
286
|
-
{paymentMethod !== "apl" && supportsCaptureMode(paymentMethod) && (
|
|
287
|
-
<Select
|
|
288
|
-
label="Capture Mode"
|
|
289
|
-
name="captureMode"
|
|
290
|
-
value={captureMode}
|
|
291
|
-
onChange={(value) => setCaptureMode(value)}
|
|
292
|
-
hint="Select capture mode for wallet payments"
|
|
293
|
-
>
|
|
294
|
-
{getCaptureModeOptions().map((option) => (
|
|
295
|
-
<Option key={option.value} value={option.value}>
|
|
296
|
-
{option.label}
|
|
297
|
-
</Option>
|
|
298
|
-
))}
|
|
299
|
-
</Select>
|
|
300
|
-
)}
|
|
301
|
-
</Flex>
|
|
302
|
-
</Box>
|
|
303
|
-
);
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
export default PaymentMethodSelector;
|