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,5 +1,12 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
Flex,
|
|
5
|
+
Typography,
|
|
6
|
+
Checkbox,
|
|
7
|
+
Divider,
|
|
8
|
+
} from "@strapi/design-system";
|
|
9
|
+
import RenderInput from "./RenderInput";
|
|
3
10
|
import {
|
|
4
11
|
APPLE_PAY_SUPPORTED_COUNTRIES,
|
|
5
12
|
APPLE_PAY_SUPPORTED_NETWORKS,
|
|
@@ -8,14 +15,10 @@ import {
|
|
|
8
15
|
getSupportedNetworksForCountry,
|
|
9
16
|
APPLE_PAY_BUTTON_STYLES,
|
|
10
17
|
APPLE_PAY_BUTTON_TYPES,
|
|
11
|
-
DEFAULT_APPLE_PAY_CONFIG
|
|
18
|
+
DEFAULT_APPLE_PAY_CONFIG,
|
|
12
19
|
} from "../../utils/applePayConstants";
|
|
13
20
|
|
|
14
|
-
const ApplePayConfig = ({
|
|
15
|
-
config,
|
|
16
|
-
onConfigChange,
|
|
17
|
-
settings
|
|
18
|
-
}) => {
|
|
21
|
+
const ApplePayConfig = ({ config, onConfigChange, settings }) => {
|
|
19
22
|
const {
|
|
20
23
|
countryCode = DEFAULT_APPLE_PAY_CONFIG.countryCode,
|
|
21
24
|
currencyCode = DEFAULT_APPLE_PAY_CONFIG.currencyCode,
|
|
@@ -26,16 +29,17 @@ const ApplePayConfig = ({
|
|
|
26
29
|
} = config || {};
|
|
27
30
|
|
|
28
31
|
const supportedCurrencies = getSupportedCurrenciesForCountry(countryCode);
|
|
29
|
-
const supportedNetworksForCountry =
|
|
32
|
+
const supportedNetworksForCountry =
|
|
33
|
+
getSupportedNetworksForCountry(countryCode);
|
|
30
34
|
|
|
31
35
|
const handleCountryChange = (value) => {
|
|
32
36
|
const newConfig = {
|
|
33
37
|
...config,
|
|
34
|
-
countryCode: value
|
|
38
|
+
countryCode: value,
|
|
35
39
|
};
|
|
36
40
|
|
|
37
41
|
const newSupportedCurrencies = getSupportedCurrenciesForCountry(value);
|
|
38
|
-
if (!newSupportedCurrencies.find(c => c.code === currencyCode)) {
|
|
42
|
+
if (!newSupportedCurrencies.find((c) => c.code === currencyCode)) {
|
|
39
43
|
newConfig.currencyCode = newSupportedCurrencies[0]?.code || "USD";
|
|
40
44
|
}
|
|
41
45
|
|
|
@@ -47,148 +51,166 @@ const ApplePayConfig = ({
|
|
|
47
51
|
const handleCurrencyChange = (value) => {
|
|
48
52
|
onConfigChange({
|
|
49
53
|
...config,
|
|
50
|
-
currencyCode: value
|
|
54
|
+
currencyCode: value,
|
|
51
55
|
});
|
|
52
56
|
};
|
|
53
57
|
|
|
54
58
|
const handleNetworkToggle = (networkCode) => {
|
|
55
59
|
const currentNetworks = supportedNetworks || [];
|
|
56
60
|
const newNetworks = currentNetworks.includes(networkCode)
|
|
57
|
-
? currentNetworks.filter(n => n !== networkCode)
|
|
61
|
+
? currentNetworks.filter((n) => n !== networkCode)
|
|
58
62
|
: [...currentNetworks, networkCode];
|
|
59
63
|
|
|
60
64
|
onConfigChange({
|
|
61
65
|
...config,
|
|
62
|
-
supportedNetworks: newNetworks
|
|
66
|
+
supportedNetworks: newNetworks,
|
|
63
67
|
});
|
|
64
68
|
};
|
|
65
69
|
|
|
66
70
|
const handleCapabilityToggle = (capabilityCode) => {
|
|
67
71
|
const currentCapabilities = merchantCapabilities || [];
|
|
68
72
|
const newCapabilities = currentCapabilities.includes(capabilityCode)
|
|
69
|
-
? currentCapabilities.filter(c => c !== capabilityCode)
|
|
73
|
+
? currentCapabilities.filter((c) => c !== capabilityCode)
|
|
70
74
|
: [...currentCapabilities, capabilityCode];
|
|
71
75
|
|
|
72
76
|
onConfigChange({
|
|
73
77
|
...config,
|
|
74
|
-
merchantCapabilities: newCapabilities
|
|
78
|
+
merchantCapabilities: newCapabilities,
|
|
75
79
|
});
|
|
76
80
|
};
|
|
77
81
|
|
|
78
82
|
return (
|
|
79
83
|
<Box>
|
|
80
|
-
<
|
|
81
|
-
<Box>
|
|
82
|
-
<Typography variant="delta" as="h3" fontWeight="bold" style={{ marginBottom: "6px" }}>
|
|
83
|
-
Apple Pay Configuration
|
|
84
|
-
</Typography>
|
|
85
|
-
<Typography variant="pi" textColor="neutral600">
|
|
86
|
-
Configure Apple Pay settings for your payment gateway
|
|
87
|
-
</Typography>
|
|
88
|
-
</Box>
|
|
89
|
-
|
|
84
|
+
<Flex direction="column" gap={6} alignItems="stretch">
|
|
90
85
|
{/* Country and Currency */}
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
86
|
+
<Box
|
|
87
|
+
style={{
|
|
88
|
+
display: "grid",
|
|
89
|
+
gridTemplateColumns: "repeat(2, 1fr)",
|
|
90
|
+
gap: "16px",
|
|
91
|
+
width: "100%",
|
|
92
|
+
}}
|
|
93
|
+
>
|
|
94
|
+
<Box>
|
|
95
|
+
<RenderInput
|
|
95
96
|
name="countryCode"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
label="Country Code"
|
|
98
|
+
value={countryCode || ""}
|
|
99
|
+
onChange={(e) => {
|
|
100
|
+
const value = e.target?.value || e;
|
|
101
|
+
handleCountryChange(value);
|
|
102
|
+
}}
|
|
103
|
+
inputType="select"
|
|
99
104
|
required
|
|
100
|
-
|
|
101
|
-
{APPLE_PAY_SUPPORTED_COUNTRIES.map(country => (
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
</Select>
|
|
105
|
+
tooltipContent="Select the country where your business operates"
|
|
106
|
+
options={APPLE_PAY_SUPPORTED_COUNTRIES.map((country) => ({
|
|
107
|
+
value: country.code,
|
|
108
|
+
label: `${country.name} (${country.code})`,
|
|
109
|
+
}))}
|
|
110
|
+
/>
|
|
107
111
|
</Box>
|
|
108
112
|
|
|
109
|
-
<Box
|
|
110
|
-
<
|
|
111
|
-
label="Currency Code"
|
|
113
|
+
<Box>
|
|
114
|
+
<RenderInput
|
|
112
115
|
name="currencyCode"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
label="Currency Code"
|
|
117
|
+
value={currencyCode || ""}
|
|
118
|
+
onChange={(e) => {
|
|
119
|
+
const value = e.target?.value || e;
|
|
120
|
+
handleCurrencyChange(value);
|
|
121
|
+
}}
|
|
122
|
+
inputType="select"
|
|
116
123
|
required
|
|
117
|
-
|
|
118
|
-
{supportedCurrencies.map(currency => (
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
</Select>
|
|
124
|
+
tooltipContent={`Supported currencies for ${countryCode}`}
|
|
125
|
+
options={supportedCurrencies.map((currency) => ({
|
|
126
|
+
value: currency.code,
|
|
127
|
+
label: `${currency.name} (${currency.code}) ${currency.symbol}`,
|
|
128
|
+
}))}
|
|
129
|
+
/>
|
|
124
130
|
{supportedCurrencies.length === 0 && (
|
|
125
|
-
<Typography
|
|
126
|
-
|
|
131
|
+
<Typography
|
|
132
|
+
variant="pi"
|
|
133
|
+
textColor="danger600"
|
|
134
|
+
style={{ marginTop: "4px" }}
|
|
135
|
+
>
|
|
136
|
+
No supported currencies for this country. Please select a
|
|
137
|
+
different country.
|
|
127
138
|
</Typography>
|
|
128
139
|
)}
|
|
129
140
|
</Box>
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
{/* Button Style and Type */}
|
|
133
|
-
<Flex gap={4} wrap="wrap">
|
|
134
|
-
<Box style={{ flex: 1, minWidth: "300px" }}>
|
|
135
|
-
<Select
|
|
136
|
-
label="Button Style"
|
|
141
|
+
<Box>
|
|
142
|
+
<RenderInput
|
|
137
143
|
name="buttonStyle"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
)
|
|
147
|
-
|
|
144
|
+
label="Button Style"
|
|
145
|
+
value={buttonStyle || ""}
|
|
146
|
+
onChange={(e) => {
|
|
147
|
+
const value = e.target?.value || e;
|
|
148
|
+
onConfigChange({ ...config, buttonStyle: value });
|
|
149
|
+
}}
|
|
150
|
+
inputType="select"
|
|
151
|
+
tooltipContent="Visual style of the Apple Pay button"
|
|
152
|
+
options={APPLE_PAY_BUTTON_STYLES.map((style) => ({
|
|
153
|
+
value: style.code,
|
|
154
|
+
label: style.name,
|
|
155
|
+
}))}
|
|
156
|
+
/>
|
|
148
157
|
</Box>
|
|
149
158
|
|
|
150
|
-
<Box
|
|
151
|
-
<
|
|
152
|
-
label="Button Type"
|
|
159
|
+
<Box>
|
|
160
|
+
<RenderInput
|
|
153
161
|
name="buttonType"
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
)
|
|
163
|
-
|
|
162
|
+
label="Button Type"
|
|
163
|
+
value={buttonType || ""}
|
|
164
|
+
onChange={(e) => {
|
|
165
|
+
const value = e.target?.value || e;
|
|
166
|
+
onConfigChange({ ...config, buttonType: value });
|
|
167
|
+
}}
|
|
168
|
+
inputType="select"
|
|
169
|
+
tooltipContent="Type of action the button represents"
|
|
170
|
+
options={APPLE_PAY_BUTTON_TYPES.map((type) => ({
|
|
171
|
+
value: type.code,
|
|
172
|
+
label: type.name,
|
|
173
|
+
}))}
|
|
174
|
+
/>
|
|
164
175
|
</Box>
|
|
165
|
-
</
|
|
176
|
+
</Box>
|
|
166
177
|
|
|
178
|
+
<Divider />
|
|
167
179
|
{/* Supported Networks */}
|
|
168
180
|
<Box>
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
181
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "4px" }}>
|
|
182
|
+
<Typography variant="pi" fontWeight="semiBold">
|
|
183
|
+
Supported Networks
|
|
184
|
+
</Typography>
|
|
185
|
+
<Typography variant="pi" textColor="neutral600">
|
|
186
|
+
Select payment networks supported in {countryCode}
|
|
187
|
+
</Typography>
|
|
188
|
+
</div>
|
|
175
189
|
<Flex wrap="wrap" gap={4} style={{ marginTop: "12px" }}>
|
|
176
|
-
{APPLE_PAY_SUPPORTED_NETWORKS.map(network => {
|
|
177
|
-
const isSupported = supportedNetworksForCountry.includes(
|
|
190
|
+
{APPLE_PAY_SUPPORTED_NETWORKS.map((network) => {
|
|
191
|
+
const isSupported = supportedNetworksForCountry.includes(
|
|
192
|
+
network.code
|
|
193
|
+
);
|
|
178
194
|
const isSelected = supportedNetworks?.includes(network.code);
|
|
179
195
|
|
|
180
196
|
return (
|
|
181
|
-
<Box
|
|
197
|
+
<Box
|
|
198
|
+
key={network.code}
|
|
199
|
+
style={{ flex: "0 0 calc(50% - 8px)", minWidth: "250px" }}
|
|
200
|
+
>
|
|
182
201
|
<Checkbox
|
|
183
202
|
name={`network-${network.code}`}
|
|
184
203
|
checked={isSelected}
|
|
185
|
-
|
|
204
|
+
onCheckedChange={() => handleNetworkToggle(network.code)}
|
|
186
205
|
disabled={!isSupported}
|
|
187
|
-
hint={!isSupported ? `Not supported in ${countryCode}` : undefined}
|
|
188
206
|
>
|
|
189
207
|
{network.name} ({network.code})
|
|
190
208
|
{!isSupported && (
|
|
191
|
-
<Typography
|
|
209
|
+
<Typography
|
|
210
|
+
variant="sigma"
|
|
211
|
+
textColor="neutral500"
|
|
212
|
+
style={{ marginLeft: "8px" }}
|
|
213
|
+
>
|
|
192
214
|
(Not available)
|
|
193
215
|
</Typography>
|
|
194
216
|
)}
|
|
@@ -198,30 +220,54 @@ const ApplePayConfig = ({
|
|
|
198
220
|
})}
|
|
199
221
|
</Flex>
|
|
200
222
|
{supportedNetworks?.length === 0 && (
|
|
201
|
-
<Typography
|
|
223
|
+
<Typography
|
|
224
|
+
variant="pi"
|
|
225
|
+
textColor="danger600"
|
|
226
|
+
style={{ marginTop: "8px" }}
|
|
227
|
+
>
|
|
202
228
|
At least one network must be selected
|
|
203
229
|
</Typography>
|
|
204
230
|
)}
|
|
205
231
|
</Box>
|
|
206
232
|
|
|
233
|
+
<Divider />
|
|
234
|
+
|
|
207
235
|
{/* Merchant Capabilities */}
|
|
208
236
|
<Box>
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
237
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "4px" }}>
|
|
238
|
+
<Typography
|
|
239
|
+
variant="pi"
|
|
240
|
+
fontWeight="semiBold"
|
|
241
|
+
style={{ marginLeft: "2px" }}
|
|
242
|
+
>
|
|
243
|
+
Merchant Capabilities
|
|
244
|
+
</Typography>
|
|
245
|
+
<Typography
|
|
246
|
+
variant="pi"
|
|
247
|
+
textColor="neutral600"
|
|
248
|
+
style={{ marginLeft: "2px" }}
|
|
249
|
+
>
|
|
250
|
+
Select payment capabilities. "3D Secure" is required for most
|
|
251
|
+
payment methods.
|
|
252
|
+
</Typography>
|
|
253
|
+
</div>
|
|
215
254
|
<Flex wrap="wrap" gap={4} style={{ marginTop: "12px" }}>
|
|
216
|
-
{APPLE_PAY_MERCHANT_CAPABILITIES.map(capability => {
|
|
217
|
-
const isSelected = merchantCapabilities?.includes(
|
|
255
|
+
{APPLE_PAY_MERCHANT_CAPABILITIES.map((capability) => {
|
|
256
|
+
const isSelected = merchantCapabilities?.includes(
|
|
257
|
+
capability.code
|
|
258
|
+
);
|
|
218
259
|
|
|
219
260
|
return (
|
|
220
|
-
<Box
|
|
261
|
+
<Box
|
|
262
|
+
key={capability.code}
|
|
263
|
+
style={{ flex: "0 0 calc(50% - 8px)", minWidth: "250px" }}
|
|
264
|
+
>
|
|
221
265
|
<Checkbox
|
|
222
266
|
name={`capability-${capability.code}`}
|
|
223
267
|
checked={isSelected}
|
|
224
|
-
|
|
268
|
+
onCheckedChange={() =>
|
|
269
|
+
handleCapabilityToggle(capability.code)
|
|
270
|
+
}
|
|
225
271
|
>
|
|
226
272
|
{capability.name} - {capability.description}
|
|
227
273
|
</Checkbox>
|
|
@@ -230,69 +276,83 @@ const ApplePayConfig = ({
|
|
|
230
276
|
})}
|
|
231
277
|
</Flex>
|
|
232
278
|
{merchantCapabilities?.length === 0 && (
|
|
233
|
-
<Typography
|
|
234
|
-
|
|
279
|
+
<Typography
|
|
280
|
+
variant="pi"
|
|
281
|
+
textColor="danger600"
|
|
282
|
+
style={{ marginTop: "8px" }}
|
|
283
|
+
>
|
|
284
|
+
At least one capability must be selected. "supports3DS" is
|
|
285
|
+
recommended.
|
|
235
286
|
</Typography>
|
|
236
287
|
)}
|
|
237
288
|
</Box>
|
|
238
289
|
|
|
290
|
+
<Divider />
|
|
239
291
|
|
|
240
|
-
{/*
|
|
241
|
-
<
|
|
242
|
-
|
|
243
|
-
|
|
292
|
+
{/* Domain Verification File Alert */}
|
|
293
|
+
<Flex
|
|
294
|
+
direction="column"
|
|
295
|
+
padding={3}
|
|
296
|
+
background="warning100"
|
|
297
|
+
borderRadius="4px"
|
|
298
|
+
borderColor="warning200"
|
|
299
|
+
borderWidth="1px"
|
|
300
|
+
borderStyle="solid"
|
|
301
|
+
alignItems="stretch"
|
|
302
|
+
gap={4}
|
|
303
|
+
>
|
|
304
|
+
<Typography variant="pi" fontWeight="bold" textColor="warning700">
|
|
305
|
+
⚠️ Domain Verification File Required
|
|
244
306
|
</Typography>
|
|
245
|
-
<Typography variant="pi" textColor="
|
|
246
|
-
{
|
|
247
|
-
|
|
248
|
-
: "Merchant identifier will be obtained from Payone after domain verification. See documentation for setup instructions."
|
|
249
|
-
}
|
|
307
|
+
<Typography variant="pi" textColor="neutral700">
|
|
308
|
+
<strong>Download the Apple Pay domain verification file</strong>{" "}
|
|
309
|
+
from your Payone documentation:
|
|
250
310
|
</Typography>
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
<Box padding={2} background="neutral0" borderRadius="4px" marginTop={2} marginBottom={2}>
|
|
263
|
-
<Typography variant="pi" style={{ fontSize: "12px" }}>
|
|
264
|
-
<strong>Download URL:</strong> Download the domain verification file from Payone documentation:{" "}
|
|
265
|
-
<a
|
|
266
|
-
href="https://docs.payone.com/payment-methods/apple-pay/apple-pay-without-dev"
|
|
267
|
-
target="_blank"
|
|
268
|
-
rel="noopener noreferrer"
|
|
269
|
-
style={{ color: "#0066ff", textDecoration: "underline" }}
|
|
270
|
-
>
|
|
271
|
-
https://docs.payone.com/payment-methods/apple-pay/apple-pay-without-dev
|
|
272
|
-
</a>
|
|
273
|
-
</Typography>
|
|
274
|
-
</Box>
|
|
275
|
-
<Typography variant="pi" textColor="neutral700" marginBottom={2}>
|
|
276
|
-
<strong>Place the file at:</strong>
|
|
277
|
-
</Typography>
|
|
278
|
-
<Box padding={2} background="neutral0" borderRadius="4px" marginTop={2} marginBottom={2}>
|
|
279
|
-
<Typography variant="pi" style={{ fontFamily: "monospace", fontSize: "12px" }}>
|
|
280
|
-
<strong>Strapi:</strong> <code>public/.well-known/apple-developer-merchantid-domain-association</code><br />
|
|
281
|
-
<strong>Frontend:</strong> <code>public/.well-known/apple-developer-merchantid-domain-association</code>
|
|
282
|
-
</Typography>
|
|
283
|
-
</Box>
|
|
284
|
-
<Typography variant="pi" textColor="neutral700" marginTop={2}>
|
|
285
|
-
The file must be accessible at: <code>https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association</code>
|
|
311
|
+
<Box padding={2} background="neutral0" borderRadius="4px">
|
|
312
|
+
<Typography variant="pi" style={{ fontSize: "12px" }}>
|
|
313
|
+
<strong>Download URL:</strong>{" "}
|
|
314
|
+
<a
|
|
315
|
+
href="https://docs.payone.com/payment-methods/apple-pay/apple-pay-without-dev"
|
|
316
|
+
target="_blank"
|
|
317
|
+
rel="noopener noreferrer"
|
|
318
|
+
style={{ color: "#0066ff", textDecoration: "underline" }}
|
|
319
|
+
>
|
|
320
|
+
https://docs.payone.com/payment-methods/apple-pay/apple-pay-without-dev
|
|
321
|
+
</a>
|
|
286
322
|
</Typography>
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
323
|
+
</Box>
|
|
324
|
+
<Typography variant="pi" textColor="neutral700">
|
|
325
|
+
<strong>Place the file at:</strong>
|
|
326
|
+
</Typography>
|
|
327
|
+
<Box padding={2} background="neutral0" borderRadius="4px">
|
|
328
|
+
<Typography
|
|
329
|
+
variant="pi"
|
|
330
|
+
style={{ fontFamily: "monospace", fontSize: "12px" }}
|
|
331
|
+
>
|
|
332
|
+
<strong>Strapi:</strong>{" "}
|
|
333
|
+
<code>
|
|
334
|
+
public/.well-known/apple-developer-merchantid-domain-association
|
|
335
|
+
</code>
|
|
336
|
+
<br />
|
|
337
|
+
<strong>Frontend:</strong>{" "}
|
|
338
|
+
<code>
|
|
339
|
+
public/.well-known/apple-developer-merchantid-domain-association
|
|
340
|
+
</code>
|
|
290
341
|
</Typography>
|
|
291
342
|
</Box>
|
|
292
|
-
|
|
293
|
-
|
|
343
|
+
<Typography variant="pi" textColor="neutral700" marginTop={2}>
|
|
344
|
+
The file must be accessible at:{" "}
|
|
345
|
+
<code>
|
|
346
|
+
https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association
|
|
347
|
+
</code>
|
|
348
|
+
</Typography>
|
|
349
|
+
<Typography variant="pi" fontWeight="bold" textColor="danger600">
|
|
350
|
+
Without this file, Apple Pay will NOT work on your domain!
|
|
351
|
+
</Typography>
|
|
352
|
+
</Flex>
|
|
353
|
+
</Flex>
|
|
294
354
|
</Box>
|
|
295
355
|
);
|
|
296
356
|
};
|
|
297
357
|
|
|
298
|
-
export default ApplePayConfig;
|
|
358
|
+
export default ApplePayConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import {
|
|
3
3
|
Box,
|
|
4
4
|
Card,
|
|
@@ -11,59 +11,47 @@ import { Check } from "@strapi/icons";
|
|
|
11
11
|
import ApplePayConfig from "./ApplePayConfig";
|
|
12
12
|
|
|
13
13
|
const ApplePayConfigPanel = ({ settings, onInputChange, isSaving, onSave }) => {
|
|
14
|
-
const [applePayConfig, setApplePayConfig] = useState(
|
|
14
|
+
const [applePayConfig, setApplePayConfig] = React.useState(
|
|
15
15
|
settings?.applePayConfig || {}
|
|
16
16
|
);
|
|
17
17
|
|
|
18
|
-
useEffect(() => {
|
|
18
|
+
React.useEffect(() => {
|
|
19
19
|
setApplePayConfig(settings?.applePayConfig || {});
|
|
20
20
|
}, [settings?.applePayConfig]);
|
|
21
21
|
|
|
22
22
|
return (
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
onConfigChange={(newConfig) => {
|
|
37
|
-
setApplePayConfig(newConfig);
|
|
38
|
-
onInputChange("applePayConfig", newConfig);
|
|
39
|
-
}}
|
|
40
|
-
settings={settings}
|
|
41
|
-
/>
|
|
42
|
-
</CardBody>
|
|
43
|
-
</Card>
|
|
44
|
-
</Box>
|
|
23
|
+
<Flex direction="column" alignItems="stretch" gap={8} padding={8}>
|
|
24
|
+
<Card>
|
|
25
|
+
<CardBody padding={6}>
|
|
26
|
+
<ApplePayConfig
|
|
27
|
+
config={applePayConfig}
|
|
28
|
+
onConfigChange={(newConfig) => {
|
|
29
|
+
setApplePayConfig(newConfig);
|
|
30
|
+
onInputChange("applePayConfig", newConfig);
|
|
31
|
+
}}
|
|
32
|
+
settings={settings}
|
|
33
|
+
/>
|
|
34
|
+
</CardBody>
|
|
35
|
+
</Card>
|
|
45
36
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
</Typography>
|
|
63
|
-
</Flex>
|
|
64
|
-
</Box>
|
|
37
|
+
<Flex direction="column" gap={4} alignItems="stretch" paddingTop={4}>
|
|
38
|
+
<Typography variant="sigma" textColor="neutral600">
|
|
39
|
+
Note: Apple Pay configuration is used for Apple Pay payment requests.
|
|
40
|
+
Make sure to configure the correct merchant identifier, supported
|
|
41
|
+
networks, and capabilities for your region.
|
|
42
|
+
</Typography>
|
|
43
|
+
<Button
|
|
44
|
+
loading={isSaving}
|
|
45
|
+
onClick={onSave}
|
|
46
|
+
startIcon={<Check />}
|
|
47
|
+
size="L"
|
|
48
|
+
variant="default"
|
|
49
|
+
maxWidth={"220px"}
|
|
50
|
+
>
|
|
51
|
+
Save Configuration
|
|
52
|
+
</Button>
|
|
65
53
|
</Flex>
|
|
66
|
-
</
|
|
54
|
+
</Flex>
|
|
67
55
|
);
|
|
68
56
|
};
|
|
69
57
|
|