strapi-plugin-payone-provider 4.6.9 → 4.6.11
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 +64 -0
- package/admin/src/pages/App/components/AppHeader.jsx +3 -2
- package/admin/src/pages/App/components/AppTabs.jsx +34 -88
- package/admin/src/pages/App/components/DocsPanel.jsx +1726 -1726
- package/admin/src/pages/App/components/GooglePaybutton.jsx +300 -300
- package/admin/src/pages/App/components/common/InfoTooltip.jsx +16 -0
- package/admin/src/pages/App/components/{ApplePayConfig.jsx → configuration/ApplePayConfig.jsx} +191 -62
- package/admin/src/pages/App/components/{ApplePayConfigPanel.jsx → configuration/ApplePayConfigPanel.jsx} +71 -70
- package/admin/src/pages/App/components/configuration/ConfigurationFields.jsx +408 -0
- package/admin/src/pages/App/components/configuration/ConfigurationPanel.jsx +67 -0
- package/admin/src/pages/App/components/{GooglePayConfig.jsx → configuration/GooglePayConfig.jsx} +254 -254
- package/admin/src/pages/App/components/{GooglePayConfigPanel.jsx → configuration/GooglePayConfigPanel.jsx} +82 -82
- package/admin/src/pages/App/components/configuration/TestConnection.jsx +129 -0
- package/admin/src/pages/App/components/paymentActions/ApplePayPanel.jsx +137 -95
- package/admin/src/pages/App/components/paymentActions/CaptureForm.jsx +119 -14
- package/admin/src/pages/App/components/paymentActions/CardDetailsInput.jsx +85 -24
- package/admin/src/pages/App/components/paymentActions/PaymentActionsPanel.jsx +361 -0
- package/admin/src/pages/App/components/paymentActions/PaymentMethodSelector.jsx +22 -4
- package/admin/src/pages/App/components/paymentActions/RefundForm.jsx +91 -20
- package/admin/src/pages/App/components/paymentActions/authorization/AuthorizationForm.jsx +157 -0
- package/admin/src/pages/App/components/paymentActions/authorization/AuthorizationFormFields.jsx +308 -0
- package/admin/src/pages/App/components/paymentActions/authorization/AuthorizationFormHeader.jsx +27 -0
- package/admin/src/pages/App/components/paymentActions/authorization/AuthorizationPaymentButtons.jsx +93 -0
- package/admin/src/pages/App/components/paymentActions/preauthorization/PreauthorizationForm.jsx +134 -0
- package/admin/src/pages/App/components/paymentActions/preauthorization/PreauthorizationFormFields.jsx +295 -0
- package/admin/src/pages/App/components/paymentActions/preauthorization/PreauthorizationFormHeader.jsx +27 -0
- package/admin/src/pages/App/components/paymentActions/preauthorization/PreauthorizationPaymentButtons.jsx +53 -0
- package/admin/src/pages/App/components/transaction-history/FiltersPanel.jsx +182 -0
- package/admin/src/pages/App/components/transaction-history/HistoryPanel.jsx +49 -0
- package/admin/src/pages/App/components/transaction-history/TransactionTable.jsx +169 -0
- package/admin/src/pages/App/components/transaction-history/TransactionTablePagination.jsx +28 -0
- package/admin/src/pages/App/components/transaction-history/details/TransactionDetails.jsx +155 -0
- package/admin/src/pages/App/index.jsx +5 -29
- package/admin/src/pages/hooks/usePaymentActions.js +87 -11
- package/admin/src/pages/hooks/useSettings.js +64 -22
- package/admin/src/pages/hooks/useTransactionHistory.js +100 -88
- package/admin/src/pages/utils/api.js +31 -3
- package/admin/src/pages/utils/countryLanguageUtils.js +236 -0
- package/admin/src/pages/utils/transactionTableUtils.js +60 -0
- package/package.json +1 -1
- package/server/bootstrap.js +6 -6
- package/server/controllers/payone.js +27 -3
- package/server/policies/index.js +2 -1
- package/server/policies/is-payone-notification.js +31 -0
- package/server/routes/index.js +10 -0
- package/server/services/payone.js +11 -4
- package/server/services/settingsService.js +8 -2
- package/server/services/testConnectionService.js +11 -72
- package/server/services/transactionService.js +58 -78
- package/server/services/transactionStatusService.js +87 -0
- package/admin/src/pages/App/components/ConfigurationPanel.jsx +0 -517
- package/admin/src/pages/App/components/CustomerInfoPopover.jsx +0 -147
- package/admin/src/pages/App/components/HistoryPanel.jsx +0 -94
- package/admin/src/pages/App/components/PaymentActionsPanel.jsx +0 -280
- package/admin/src/pages/App/components/RawDataPopover.jsx +0 -113
- package/admin/src/pages/App/components/TransactionHistoryItem.jsx +0 -522
- package/admin/src/pages/App/components/TransactionHistoryTable/TransactionHistoryTableFilters.jsx +0 -113
- package/admin/src/pages/App/components/TransactionHistoryTable/TransactionHistoryTablePagination.jsx +0 -180
- package/admin/src/pages/App/components/TransactionHistoryTable/index.jsx +0 -225
- package/admin/src/pages/App/components/paymentActions/AuthorizationForm.jsx +0 -197
- package/admin/src/pages/App/components/paymentActions/PreauthorizationForm.jsx +0 -142
package/admin/src/pages/App/components/{GooglePayConfig.jsx → configuration/GooglePayConfig.jsx}
RENAMED
|
@@ -1,254 +1,254 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
Box,
|
|
4
|
-
Flex,
|
|
5
|
-
Typography,
|
|
6
|
-
Select,
|
|
7
|
-
Option,
|
|
8
|
-
Checkbox,
|
|
9
|
-
Stack,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
{
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
<
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
/>
|
|
138
|
-
</Box>
|
|
139
|
-
|
|
140
|
-
{/* Allowed Card Networks */}
|
|
141
|
-
<Box>
|
|
142
|
-
<Typography
|
|
143
|
-
variant="pi"
|
|
144
|
-
fontWeight="semiBold"
|
|
145
|
-
style={{ marginLeft: "2px" }}
|
|
146
|
-
>
|
|
147
|
-
Allowed Card Networks
|
|
148
|
-
</Typography>
|
|
149
|
-
<Typography
|
|
150
|
-
variant="pi"
|
|
151
|
-
textColor="neutral600"
|
|
152
|
-
style={{ marginLeft: "2px" }}
|
|
153
|
-
>
|
|
154
|
-
Select payment card networks to accept
|
|
155
|
-
</Typography>
|
|
156
|
-
<Flex wrap="wrap" gap={4} style={{ marginTop: "12px" }}>
|
|
157
|
-
{GOOGLE_PAY_SUPPORTED_NETWORKS.map((network) => {
|
|
158
|
-
const isSelected = allowedCardNetworks?.includes(network.code);
|
|
159
|
-
|
|
160
|
-
return (
|
|
161
|
-
<Box
|
|
162
|
-
key={network.code}
|
|
163
|
-
style={{ flex: "0 0 calc(50% - 8px)", minWidth: "250px" }}
|
|
164
|
-
>
|
|
165
|
-
<Checkbox
|
|
166
|
-
name={`network-${network.code}`}
|
|
167
|
-
checked={isSelected}
|
|
168
|
-
onChange={() => handleNetworkToggle(network.code)}
|
|
169
|
-
>
|
|
170
|
-
{network.name} ({network.code})
|
|
171
|
-
</Checkbox>
|
|
172
|
-
</Box>
|
|
173
|
-
);
|
|
174
|
-
})}
|
|
175
|
-
</Flex>
|
|
176
|
-
{allowedCardNetworks?.length === 0 && (
|
|
177
|
-
<Typography
|
|
178
|
-
variant="pi"
|
|
179
|
-
textColor="danger600"
|
|
180
|
-
style={{ marginTop: "8px" }}
|
|
181
|
-
>
|
|
182
|
-
At least one card network must be selected
|
|
183
|
-
</Typography>
|
|
184
|
-
)}
|
|
185
|
-
</Box>
|
|
186
|
-
|
|
187
|
-
{/* Allowed Authentication Methods */}
|
|
188
|
-
<Box>
|
|
189
|
-
<Typography
|
|
190
|
-
variant="pi"
|
|
191
|
-
fontWeight="semiBold"
|
|
192
|
-
style={{ marginLeft: "2px" }}
|
|
193
|
-
>
|
|
194
|
-
Allowed Authentication Methods
|
|
195
|
-
</Typography>
|
|
196
|
-
<Typography
|
|
197
|
-
variant="pi"
|
|
198
|
-
textColor="neutral600"
|
|
199
|
-
style={{ marginLeft: "2px" }}
|
|
200
|
-
>
|
|
201
|
-
Select authentication methods for card payments
|
|
202
|
-
</Typography>
|
|
203
|
-
<Flex wrap="wrap" gap={4} style={{ marginTop: "12px" }}>
|
|
204
|
-
{GOOGLE_PAY_AUTH_METHODS.map((method) => {
|
|
205
|
-
const isSelected = allowedAuthMethods?.includes(method.code);
|
|
206
|
-
|
|
207
|
-
return (
|
|
208
|
-
<Box
|
|
209
|
-
key={method.code}
|
|
210
|
-
style={{ flex: "0 0 calc(50% - 8px)", minWidth: "250px" }}
|
|
211
|
-
>
|
|
212
|
-
<Checkbox
|
|
213
|
-
name={`auth-method-${method.code}`}
|
|
214
|
-
checked={isSelected}
|
|
215
|
-
onChange={() => handleAuthMethodToggle(method.code)}
|
|
216
|
-
>
|
|
217
|
-
{method.name} - {method.description}
|
|
218
|
-
</Checkbox>
|
|
219
|
-
</Box>
|
|
220
|
-
);
|
|
221
|
-
})}
|
|
222
|
-
</Flex>
|
|
223
|
-
{allowedAuthMethods?.length === 0 && (
|
|
224
|
-
<Typography
|
|
225
|
-
variant="pi"
|
|
226
|
-
textColor="danger600"
|
|
227
|
-
style={{ marginTop: "8px" }}
|
|
228
|
-
>
|
|
229
|
-
At least one authentication method must be selected
|
|
230
|
-
</Typography>
|
|
231
|
-
)}
|
|
232
|
-
</Box>
|
|
233
|
-
|
|
234
|
-
{/* Gateway Merchant ID Info */}
|
|
235
|
-
<Box>
|
|
236
|
-
<Typography
|
|
237
|
-
variant="pi"
|
|
238
|
-
fontWeight="semiBold"
|
|
239
|
-
style={{ marginLeft: "2px" }}
|
|
240
|
-
>
|
|
241
|
-
Gateway Merchant ID
|
|
242
|
-
</Typography>
|
|
243
|
-
<Typography variant="pi" textColor="neutral600">
|
|
244
|
-
{settings?.mid || settings?.portalid
|
|
245
|
-
? `Using: ${settings.mid || settings.portalid}`
|
|
246
|
-
: "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."}
|
|
247
|
-
</Typography>
|
|
248
|
-
</Box>
|
|
249
|
-
</Stack>
|
|
250
|
-
</Box>
|
|
251
|
-
);
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
export default GooglePayConfig;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
Flex,
|
|
5
|
+
Typography,
|
|
6
|
+
Select,
|
|
7
|
+
Option,
|
|
8
|
+
Checkbox,
|
|
9
|
+
Stack,
|
|
10
|
+
TextInput,
|
|
11
|
+
} from "@strapi/design-system";
|
|
12
|
+
import InfoTooltip from "../common/InfoTooltip";
|
|
13
|
+
import {
|
|
14
|
+
GOOGLE_PAY_SUPPORTED_COUNTRIES,
|
|
15
|
+
GOOGLE_PAY_SUPPORTED_CURRENCIES,
|
|
16
|
+
GOOGLE_PAY_SUPPORTED_NETWORKS,
|
|
17
|
+
GOOGLE_PAY_AUTH_METHODS,
|
|
18
|
+
DEFAULT_GOOGLE_PAY_CONFIG,
|
|
19
|
+
} from "../../../utils/googlePayConstants";
|
|
20
|
+
|
|
21
|
+
const GooglePayConfig = ({ config, onConfigChange, settings }) => {
|
|
22
|
+
const {
|
|
23
|
+
countryCode = DEFAULT_GOOGLE_PAY_CONFIG.countryCode,
|
|
24
|
+
currencyCode = DEFAULT_GOOGLE_PAY_CONFIG.currencyCode,
|
|
25
|
+
allowedCardNetworks = DEFAULT_GOOGLE_PAY_CONFIG.allowedCardNetworks,
|
|
26
|
+
allowedAuthMethods = DEFAULT_GOOGLE_PAY_CONFIG.allowedAuthMethods,
|
|
27
|
+
merchantName = DEFAULT_GOOGLE_PAY_CONFIG.merchantName,
|
|
28
|
+
} = config || {};
|
|
29
|
+
|
|
30
|
+
const handleCountryChange = (value) => {
|
|
31
|
+
onConfigChange({
|
|
32
|
+
...config,
|
|
33
|
+
countryCode: value,
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const handleCurrencyChange = (value) => {
|
|
38
|
+
onConfigChange({
|
|
39
|
+
...config,
|
|
40
|
+
currencyCode: value,
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const handleNetworkToggle = (networkCode) => {
|
|
45
|
+
const currentNetworks = allowedCardNetworks || [];
|
|
46
|
+
const newNetworks = currentNetworks.includes(networkCode)
|
|
47
|
+
? currentNetworks.filter((n) => n !== networkCode)
|
|
48
|
+
: [...currentNetworks, networkCode];
|
|
49
|
+
|
|
50
|
+
onConfigChange({
|
|
51
|
+
...config,
|
|
52
|
+
allowedCardNetworks: newNetworks,
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const handleAuthMethodToggle = (authMethodCode) => {
|
|
57
|
+
const currentMethods = allowedAuthMethods || [];
|
|
58
|
+
const newMethods = currentMethods.includes(authMethodCode)
|
|
59
|
+
? currentMethods.filter((m) => m !== authMethodCode)
|
|
60
|
+
: [...currentMethods, authMethodCode];
|
|
61
|
+
|
|
62
|
+
onConfigChange({
|
|
63
|
+
...config,
|
|
64
|
+
allowedAuthMethods: newMethods,
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<Box>
|
|
70
|
+
<Stack spacing={6}>
|
|
71
|
+
{/* Country and Currency */}
|
|
72
|
+
<Flex gap={4} wrap="wrap">
|
|
73
|
+
<Box style={{ flex: 1, minWidth: "300px" }}>
|
|
74
|
+
<Select
|
|
75
|
+
label="Country Code"
|
|
76
|
+
name="countryCode"
|
|
77
|
+
value={countryCode}
|
|
78
|
+
onChange={handleCountryChange}
|
|
79
|
+
required
|
|
80
|
+
labelAction={
|
|
81
|
+
<InfoTooltip
|
|
82
|
+
label="Country Code"
|
|
83
|
+
description="Select the country where your business operates"
|
|
84
|
+
id="countryCode-tooltip"
|
|
85
|
+
/>
|
|
86
|
+
}
|
|
87
|
+
>
|
|
88
|
+
{GOOGLE_PAY_SUPPORTED_COUNTRIES.map((country) => (
|
|
89
|
+
<Option key={country.code} value={country.code}>
|
|
90
|
+
{country.name} ({country.code})
|
|
91
|
+
</Option>
|
|
92
|
+
))}
|
|
93
|
+
</Select>
|
|
94
|
+
</Box>
|
|
95
|
+
|
|
96
|
+
<Box style={{ flex: 1, minWidth: "300px" }}>
|
|
97
|
+
<Select
|
|
98
|
+
label="Currency Code"
|
|
99
|
+
name="currencyCode"
|
|
100
|
+
value={currencyCode}
|
|
101
|
+
onChange={handleCurrencyChange}
|
|
102
|
+
required
|
|
103
|
+
labelAction={
|
|
104
|
+
<InfoTooltip
|
|
105
|
+
label="Currency Code"
|
|
106
|
+
description="Select the currency for transactions. Should match the selected country."
|
|
107
|
+
id="currencyCode-tooltip"
|
|
108
|
+
/>
|
|
109
|
+
}
|
|
110
|
+
>
|
|
111
|
+
{GOOGLE_PAY_SUPPORTED_CURRENCIES.map((currency) => (
|
|
112
|
+
<Option key={currency.code} value={currency.code}>
|
|
113
|
+
{currency.name} ({currency.code}) {currency.symbol}
|
|
114
|
+
</Option>
|
|
115
|
+
))}
|
|
116
|
+
</Select>
|
|
117
|
+
</Box>
|
|
118
|
+
</Flex>
|
|
119
|
+
|
|
120
|
+
{/* Merchant Name */}
|
|
121
|
+
<Box>
|
|
122
|
+
<TextInput
|
|
123
|
+
name="merchantName"
|
|
124
|
+
label="Merchant Name"
|
|
125
|
+
value={merchantName}
|
|
126
|
+
onChange={(e) =>
|
|
127
|
+
onConfigChange({ ...config, merchantName: e.target.value })
|
|
128
|
+
}
|
|
129
|
+
placeholder="Your Store Name"
|
|
130
|
+
endAction={
|
|
131
|
+
<InfoTooltip
|
|
132
|
+
label="Merchant Name"
|
|
133
|
+
description="The name of your business as it will appear in Google Pay"
|
|
134
|
+
id="merchantName-tooltip"
|
|
135
|
+
/>
|
|
136
|
+
}
|
|
137
|
+
/>
|
|
138
|
+
</Box>
|
|
139
|
+
|
|
140
|
+
{/* Allowed Card Networks */}
|
|
141
|
+
<Box>
|
|
142
|
+
<Typography
|
|
143
|
+
variant="pi"
|
|
144
|
+
fontWeight="semiBold"
|
|
145
|
+
style={{ marginLeft: "2px" }}
|
|
146
|
+
>
|
|
147
|
+
Allowed Card Networks
|
|
148
|
+
</Typography>
|
|
149
|
+
<Typography
|
|
150
|
+
variant="pi"
|
|
151
|
+
textColor="neutral600"
|
|
152
|
+
style={{ marginLeft: "2px" }}
|
|
153
|
+
>
|
|
154
|
+
Select payment card networks to accept
|
|
155
|
+
</Typography>
|
|
156
|
+
<Flex wrap="wrap" gap={4} style={{ marginTop: "12px" }}>
|
|
157
|
+
{GOOGLE_PAY_SUPPORTED_NETWORKS.map((network) => {
|
|
158
|
+
const isSelected = allowedCardNetworks?.includes(network.code);
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
<Box
|
|
162
|
+
key={network.code}
|
|
163
|
+
style={{ flex: "0 0 calc(50% - 8px)", minWidth: "250px" }}
|
|
164
|
+
>
|
|
165
|
+
<Checkbox
|
|
166
|
+
name={`network-${network.code}`}
|
|
167
|
+
checked={isSelected}
|
|
168
|
+
onChange={() => handleNetworkToggle(network.code)}
|
|
169
|
+
>
|
|
170
|
+
{network.name} ({network.code})
|
|
171
|
+
</Checkbox>
|
|
172
|
+
</Box>
|
|
173
|
+
);
|
|
174
|
+
})}
|
|
175
|
+
</Flex>
|
|
176
|
+
{allowedCardNetworks?.length === 0 && (
|
|
177
|
+
<Typography
|
|
178
|
+
variant="pi"
|
|
179
|
+
textColor="danger600"
|
|
180
|
+
style={{ marginTop: "8px" }}
|
|
181
|
+
>
|
|
182
|
+
At least one card network must be selected
|
|
183
|
+
</Typography>
|
|
184
|
+
)}
|
|
185
|
+
</Box>
|
|
186
|
+
|
|
187
|
+
{/* Allowed Authentication Methods */}
|
|
188
|
+
<Box>
|
|
189
|
+
<Typography
|
|
190
|
+
variant="pi"
|
|
191
|
+
fontWeight="semiBold"
|
|
192
|
+
style={{ marginLeft: "2px" }}
|
|
193
|
+
>
|
|
194
|
+
Allowed Authentication Methods
|
|
195
|
+
</Typography>
|
|
196
|
+
<Typography
|
|
197
|
+
variant="pi"
|
|
198
|
+
textColor="neutral600"
|
|
199
|
+
style={{ marginLeft: "2px" }}
|
|
200
|
+
>
|
|
201
|
+
Select authentication methods for card payments
|
|
202
|
+
</Typography>
|
|
203
|
+
<Flex wrap="wrap" gap={4} style={{ marginTop: "12px" }}>
|
|
204
|
+
{GOOGLE_PAY_AUTH_METHODS.map((method) => {
|
|
205
|
+
const isSelected = allowedAuthMethods?.includes(method.code);
|
|
206
|
+
|
|
207
|
+
return (
|
|
208
|
+
<Box
|
|
209
|
+
key={method.code}
|
|
210
|
+
style={{ flex: "0 0 calc(50% - 8px)", minWidth: "250px" }}
|
|
211
|
+
>
|
|
212
|
+
<Checkbox
|
|
213
|
+
name={`auth-method-${method.code}`}
|
|
214
|
+
checked={isSelected}
|
|
215
|
+
onChange={() => handleAuthMethodToggle(method.code)}
|
|
216
|
+
>
|
|
217
|
+
{method.name} - {method.description}
|
|
218
|
+
</Checkbox>
|
|
219
|
+
</Box>
|
|
220
|
+
);
|
|
221
|
+
})}
|
|
222
|
+
</Flex>
|
|
223
|
+
{allowedAuthMethods?.length === 0 && (
|
|
224
|
+
<Typography
|
|
225
|
+
variant="pi"
|
|
226
|
+
textColor="danger600"
|
|
227
|
+
style={{ marginTop: "8px" }}
|
|
228
|
+
>
|
|
229
|
+
At least one authentication method must be selected
|
|
230
|
+
</Typography>
|
|
231
|
+
)}
|
|
232
|
+
</Box>
|
|
233
|
+
|
|
234
|
+
{/* Gateway Merchant ID Info */}
|
|
235
|
+
<Box>
|
|
236
|
+
<Typography
|
|
237
|
+
variant="pi"
|
|
238
|
+
fontWeight="semiBold"
|
|
239
|
+
style={{ marginLeft: "2px" }}
|
|
240
|
+
>
|
|
241
|
+
Gateway Merchant ID
|
|
242
|
+
</Typography>
|
|
243
|
+
<Typography variant="pi" textColor="neutral600">
|
|
244
|
+
{settings?.mid || settings?.portalid
|
|
245
|
+
? `Using: ${settings.mid || settings.portalid}`
|
|
246
|
+
: "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."}
|
|
247
|
+
</Typography>
|
|
248
|
+
</Box>
|
|
249
|
+
</Stack>
|
|
250
|
+
</Box>
|
|
251
|
+
);
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
export default GooglePayConfig;
|