strapi-plugin-payone-provider 4.6.10 → 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/StatusBadge.jsx +1 -1
- 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
|
@@ -1,57 +1,163 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
Flex,
|
|
5
|
+
Typography,
|
|
6
|
+
TextInput,
|
|
7
|
+
Button,
|
|
8
|
+
Select,
|
|
9
|
+
Option,
|
|
10
|
+
} from "@strapi/design-system";
|
|
3
11
|
import { Play } from "@strapi/icons";
|
|
12
|
+
import { getCurrencyOptions } from "../../../utils/countryLanguageUtils";
|
|
13
|
+
import InfoTooltip from "../common/InfoTooltip";
|
|
4
14
|
|
|
5
15
|
const CaptureForm = ({
|
|
6
16
|
paymentAmount,
|
|
7
17
|
setPaymentAmount,
|
|
8
18
|
captureTxid,
|
|
9
19
|
setCaptureTxid,
|
|
20
|
+
captureCurrency,
|
|
21
|
+
setCaptureCurrency,
|
|
22
|
+
captureSequenceNumber,
|
|
23
|
+
setCaptureSequenceNumber,
|
|
24
|
+
captureMode,
|
|
25
|
+
setCaptureMode,
|
|
26
|
+
paymentMethod,
|
|
10
27
|
isProcessingPayment,
|
|
11
|
-
onCapture
|
|
28
|
+
onCapture,
|
|
12
29
|
}) => {
|
|
30
|
+
const currencyOptions = getCurrencyOptions();
|
|
31
|
+
|
|
13
32
|
return (
|
|
14
33
|
<Flex direction="column" alignItems="stretch" gap={4}>
|
|
15
34
|
<Flex direction="row" gap={2}>
|
|
16
|
-
<Typography
|
|
35
|
+
<Typography
|
|
36
|
+
variant="omega"
|
|
37
|
+
fontWeight="semiBold"
|
|
38
|
+
textColor="neutral800"
|
|
39
|
+
className="payment-form-title"
|
|
40
|
+
>
|
|
17
41
|
Capture
|
|
18
42
|
</Typography>
|
|
19
|
-
<Typography
|
|
43
|
+
<Typography
|
|
44
|
+
variant="pi"
|
|
45
|
+
textColor="neutral600"
|
|
46
|
+
className="payment-form-description"
|
|
47
|
+
>
|
|
20
48
|
Capture a previously authorized amount. Note: Reference parameter is
|
|
21
49
|
not supported by Payone capture.
|
|
22
50
|
</Typography>
|
|
23
51
|
</Flex>
|
|
24
52
|
|
|
25
|
-
<
|
|
53
|
+
<Box
|
|
54
|
+
style={{
|
|
55
|
+
display: "grid",
|
|
56
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(250px, 1fr))",
|
|
57
|
+
gap: "16px",
|
|
58
|
+
}}
|
|
59
|
+
>
|
|
26
60
|
<TextInput
|
|
27
|
-
label="Transaction ID"
|
|
61
|
+
label="Transaction ID *"
|
|
28
62
|
name="captureTxid"
|
|
29
63
|
value={captureTxid}
|
|
30
64
|
onChange={(e) => setCaptureTxid(e.target.value)}
|
|
31
65
|
placeholder="Enter TxId from preauthorization"
|
|
32
|
-
|
|
66
|
+
required
|
|
33
67
|
className="payment-input"
|
|
34
|
-
|
|
68
|
+
endAction={
|
|
69
|
+
<InfoTooltip
|
|
70
|
+
label="Transaction ID"
|
|
71
|
+
description="Transaction ID (TxId) from a previous preauthorization. This is required to capture the authorized amount."
|
|
72
|
+
id="captureTxid-tooltip"
|
|
73
|
+
/>
|
|
74
|
+
}
|
|
35
75
|
/>
|
|
36
76
|
|
|
37
77
|
<TextInput
|
|
38
|
-
label="Amount
|
|
78
|
+
label="Amount *"
|
|
39
79
|
name="captureAmount"
|
|
40
80
|
value={paymentAmount}
|
|
41
81
|
onChange={(e) => setPaymentAmount(e.target.value)}
|
|
42
82
|
placeholder="1000"
|
|
43
|
-
|
|
83
|
+
required
|
|
44
84
|
className="payment-input"
|
|
45
|
-
|
|
85
|
+
endAction={
|
|
86
|
+
<InfoTooltip
|
|
87
|
+
label="Amount"
|
|
88
|
+
description="Amount in cents to capture (e.g., 1000 = €10.00). Cannot exceed the preauthorized amount."
|
|
89
|
+
id="captureAmount-tooltip"
|
|
90
|
+
/>
|
|
91
|
+
}
|
|
92
|
+
/>
|
|
93
|
+
|
|
94
|
+
<Select
|
|
95
|
+
label="Currency"
|
|
96
|
+
name="captureCurrency"
|
|
97
|
+
value={captureCurrency || "EUR"}
|
|
98
|
+
onChange={(value) => setCaptureCurrency(value)}
|
|
99
|
+
placeholder="EUR"
|
|
100
|
+
labelAction={
|
|
101
|
+
<InfoTooltip
|
|
102
|
+
label="Currency"
|
|
103
|
+
description="Currency code (e.g., EUR, USD, GBP). Must match the currency used in the original preauthorization."
|
|
104
|
+
id="captureCurrency-tooltip"
|
|
105
|
+
/>
|
|
106
|
+
}
|
|
107
|
+
>
|
|
108
|
+
{currencyOptions.map((option) => (
|
|
109
|
+
<Option key={option.value} value={option.value} multi={false}>
|
|
110
|
+
{option.label}
|
|
111
|
+
</Option>
|
|
112
|
+
))}
|
|
113
|
+
</Select>
|
|
114
|
+
|
|
115
|
+
<TextInput
|
|
116
|
+
label="Sequence Number"
|
|
117
|
+
name="captureSequenceNumber"
|
|
118
|
+
value={captureSequenceNumber || "1"}
|
|
119
|
+
onChange={(e) => setCaptureSequenceNumber(e.target.value)}
|
|
120
|
+
placeholder="1"
|
|
121
|
+
className="payment-input"
|
|
122
|
+
endAction={
|
|
123
|
+
<InfoTooltip
|
|
124
|
+
label="Sequence Number"
|
|
125
|
+
description="Sequence number for this capture (1-127). Default is 1 for the first capture. Increment for partial captures."
|
|
126
|
+
id="captureSequenceNumber-tooltip"
|
|
127
|
+
/>
|
|
128
|
+
}
|
|
46
129
|
/>
|
|
47
|
-
|
|
130
|
+
|
|
131
|
+
{["wlt", "gpp", "apl"].includes(paymentMethod) && (
|
|
132
|
+
<Select
|
|
133
|
+
label="Capture Mode"
|
|
134
|
+
name="captureMode"
|
|
135
|
+
value={captureMode || "full"}
|
|
136
|
+
onChange={(value) => setCaptureMode(value)}
|
|
137
|
+
labelAction={
|
|
138
|
+
<InfoTooltip
|
|
139
|
+
label="Capture Mode"
|
|
140
|
+
description="Capture mode for wallet payments (Google Pay, Apple Pay): 'full' captures the entire authorized amount, 'partial' allows capturing a portion."
|
|
141
|
+
id="captureMode-tooltip"
|
|
142
|
+
/>
|
|
143
|
+
}
|
|
144
|
+
>
|
|
145
|
+
<Option value="full" multi={false}>
|
|
146
|
+
Full
|
|
147
|
+
</Option>
|
|
148
|
+
<Option value="partial" multi={false}>
|
|
149
|
+
Partial
|
|
150
|
+
</Option>
|
|
151
|
+
</Select>
|
|
152
|
+
)}
|
|
153
|
+
</Box>
|
|
48
154
|
|
|
49
155
|
<Button
|
|
50
156
|
variant="default"
|
|
51
157
|
onClick={onCapture}
|
|
52
158
|
loading={isProcessingPayment}
|
|
53
159
|
startIcon={<Play />}
|
|
54
|
-
style={{ maxWidth:
|
|
160
|
+
style={{ maxWidth: "200px" }}
|
|
55
161
|
className="payment-button payment-button-primary"
|
|
56
162
|
disabled={!captureTxid.trim() || !paymentAmount.trim()}
|
|
57
163
|
>
|
|
@@ -62,4 +168,3 @@ const CaptureForm = ({
|
|
|
62
168
|
};
|
|
63
169
|
|
|
64
170
|
export default CaptureForm;
|
|
65
|
-
|
|
@@ -6,8 +6,9 @@ import {
|
|
|
6
6
|
TextInput,
|
|
7
7
|
Select,
|
|
8
8
|
Option,
|
|
9
|
-
Link
|
|
9
|
+
Link,
|
|
10
10
|
} from "@strapi/design-system";
|
|
11
|
+
import InfoTooltip from "../common/InfoTooltip";
|
|
11
12
|
|
|
12
13
|
// 3DS Test Cards that require redirect (challenge workflow)
|
|
13
14
|
const TEST_3DS_CARDS = [
|
|
@@ -17,7 +18,7 @@ const TEST_3DS_CARDS = [
|
|
|
17
18
|
cardpan: "4716971940353559",
|
|
18
19
|
cardexpiredate: "2512",
|
|
19
20
|
cardcvc2: "123",
|
|
20
|
-
description: "3DS 2.0 with challenge - Password: 12345"
|
|
21
|
+
description: "3DS 2.0 with challenge - Password: 12345",
|
|
21
22
|
},
|
|
22
23
|
{
|
|
23
24
|
name: "Mastercard - 3DS 2.0 (Challenge)",
|
|
@@ -25,7 +26,7 @@ const TEST_3DS_CARDS = [
|
|
|
25
26
|
cardpan: "5404127720739582",
|
|
26
27
|
cardexpiredate: "2512",
|
|
27
28
|
cardcvc2: "123",
|
|
28
|
-
description: "3DS 2.0 with challenge - Password: 12345"
|
|
29
|
+
description: "3DS 2.0 with challenge - Password: 12345",
|
|
29
30
|
},
|
|
30
31
|
// {
|
|
31
32
|
// name: "AMEX - 3DS 2.0 (Challenge)",
|
|
@@ -45,7 +46,7 @@ const CardDetailsInput = ({
|
|
|
45
46
|
cardexpiredate,
|
|
46
47
|
setCardexpiredate,
|
|
47
48
|
cardcvc2,
|
|
48
|
-
setCardcvc2
|
|
49
|
+
setCardcvc2,
|
|
49
50
|
}) => {
|
|
50
51
|
const [selectedTestCard, setSelectedTestCard] = React.useState("");
|
|
51
52
|
const isUpdatingFromTestCard = useRef(false);
|
|
@@ -57,7 +58,7 @@ const CardDetailsInput = ({
|
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
const matchingCard = TEST_3DS_CARDS.find(
|
|
60
|
-
card => card.cardtype === cardtype && card.cardpan === cardpan
|
|
61
|
+
(card) => card.cardtype === cardtype && card.cardpan === cardpan
|
|
61
62
|
);
|
|
62
63
|
|
|
63
64
|
if (matchingCard) {
|
|
@@ -76,8 +77,8 @@ const CardDetailsInput = ({
|
|
|
76
77
|
return;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
const selectedCard = TEST_3DS_CARDS.find(
|
|
80
|
-
`${card.cardtype}-${card.cardpan}` === value
|
|
80
|
+
const selectedCard = TEST_3DS_CARDS.find(
|
|
81
|
+
(card) => `${card.cardtype}-${card.cardpan}` === value
|
|
81
82
|
);
|
|
82
83
|
|
|
83
84
|
if (selectedCard) {
|
|
@@ -100,13 +101,25 @@ const CardDetailsInput = ({
|
|
|
100
101
|
name="testCard"
|
|
101
102
|
value={selectedTestCard}
|
|
102
103
|
placeholder="Select a 3DS test card to auto-fill"
|
|
103
|
-
hint="These cards will trigger 3DS authentication redirect. Password: 12345"
|
|
104
104
|
onChange={handleTestCardSelect}
|
|
105
105
|
className="payment-input"
|
|
106
|
+
labelAction={
|
|
107
|
+
<InfoTooltip
|
|
108
|
+
label="3D Secure Test Cards"
|
|
109
|
+
description="These cards will trigger 3DS authentication redirect. Password: 12345"
|
|
110
|
+
id="testCard-tooltip"
|
|
111
|
+
/>
|
|
112
|
+
}
|
|
106
113
|
>
|
|
107
|
-
<Option value=""
|
|
114
|
+
<Option value="" multi={false}>
|
|
115
|
+
-- Select a test card --
|
|
116
|
+
</Option>
|
|
108
117
|
{TEST_3DS_CARDS.map((card, index) => (
|
|
109
|
-
<Option
|
|
118
|
+
<Option
|
|
119
|
+
key={index}
|
|
120
|
+
value={`${card.cardtype}-${card.cardpan}`}
|
|
121
|
+
multi={false}
|
|
122
|
+
>
|
|
110
123
|
{card.name} - {card.description}
|
|
111
124
|
</Option>
|
|
112
125
|
))}
|
|
@@ -120,16 +133,34 @@ const CardDetailsInput = ({
|
|
|
120
133
|
value={cardtype || ""}
|
|
121
134
|
onChange={(value) => setCardtype(value)}
|
|
122
135
|
required
|
|
123
|
-
hint="Select credit card type"
|
|
124
136
|
className="payment-input"
|
|
125
137
|
style={{ flex: 1, minWidth: "200px" }}
|
|
138
|
+
labelAction={
|
|
139
|
+
<InfoTooltip
|
|
140
|
+
label="Card Type"
|
|
141
|
+
description="Select credit card type"
|
|
142
|
+
id="cardtype-tooltip"
|
|
143
|
+
/>
|
|
144
|
+
}
|
|
126
145
|
>
|
|
127
|
-
<Option value="V">
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
<Option value="
|
|
131
|
-
|
|
132
|
-
|
|
146
|
+
<Option value="V" multi={false}>
|
|
147
|
+
VISA
|
|
148
|
+
</Option>
|
|
149
|
+
<Option value="M" multi={false}>
|
|
150
|
+
Mastercard
|
|
151
|
+
</Option>
|
|
152
|
+
<Option value="A" multi={false}>
|
|
153
|
+
American Express
|
|
154
|
+
</Option>
|
|
155
|
+
<Option value="J" multi={false}>
|
|
156
|
+
JCB
|
|
157
|
+
</Option>
|
|
158
|
+
<Option value="O" multi={false}>
|
|
159
|
+
Maestro International
|
|
160
|
+
</Option>
|
|
161
|
+
<Option value="D" multi={false}>
|
|
162
|
+
Diners Club
|
|
163
|
+
</Option>
|
|
133
164
|
</Select>
|
|
134
165
|
|
|
135
166
|
<TextInput
|
|
@@ -138,10 +169,16 @@ const CardDetailsInput = ({
|
|
|
138
169
|
value={cardpan || ""}
|
|
139
170
|
onChange={(e) => setCardpan(e.target.value)}
|
|
140
171
|
placeholder="Enter card number"
|
|
141
|
-
hint="Credit card number (PAN)"
|
|
142
172
|
required
|
|
143
173
|
className="payment-input"
|
|
144
174
|
style={{ flex: 2, minWidth: "300px" }}
|
|
175
|
+
endAction={
|
|
176
|
+
<InfoTooltip
|
|
177
|
+
label="Card Number"
|
|
178
|
+
description="Credit card number (PAN)"
|
|
179
|
+
id="cardpan-tooltip"
|
|
180
|
+
/>
|
|
181
|
+
}
|
|
145
182
|
/>
|
|
146
183
|
</Flex>
|
|
147
184
|
|
|
@@ -152,11 +189,17 @@ const CardDetailsInput = ({
|
|
|
152
189
|
value={cardexpiredate || ""}
|
|
153
190
|
onChange={(e) => setCardexpiredate(e.target.value)}
|
|
154
191
|
placeholder="YYMM (e.g., 2512)"
|
|
155
|
-
hint="Format: YYMM (e.g., 2512 = December 2025)"
|
|
156
192
|
required
|
|
157
193
|
maxLength={4}
|
|
158
194
|
className="payment-input"
|
|
159
195
|
style={{ flex: 1, minWidth: "150px" }}
|
|
196
|
+
endAction={
|
|
197
|
+
<InfoTooltip
|
|
198
|
+
label="Expiry Date"
|
|
199
|
+
description="Format: YYMM (e.g., 2512 = December 2025)"
|
|
200
|
+
id="cardexpiredate-tooltip"
|
|
201
|
+
/>
|
|
202
|
+
}
|
|
160
203
|
/>
|
|
161
204
|
|
|
162
205
|
<TextInput
|
|
@@ -165,18 +208,37 @@ const CardDetailsInput = ({
|
|
|
165
208
|
value={cardcvc2 || ""}
|
|
166
209
|
onChange={(e) => setCardcvc2(e.target.value)}
|
|
167
210
|
placeholder="123 or 1234"
|
|
168
|
-
hint={cardtype === "A" ? "4 digits for AMEX" : "3 digits for other cards"}
|
|
169
211
|
required
|
|
170
212
|
maxLength={4}
|
|
171
213
|
className="payment-input"
|
|
172
214
|
style={{ flex: 1, minWidth: "150px" }}
|
|
215
|
+
endAction={
|
|
216
|
+
<InfoTooltip
|
|
217
|
+
label="CVC/CVV"
|
|
218
|
+
description={
|
|
219
|
+
cardtype === "A"
|
|
220
|
+
? "4 digits for AMEX"
|
|
221
|
+
: "3 digits for other cards"
|
|
222
|
+
}
|
|
223
|
+
id="cardcvc2-tooltip"
|
|
224
|
+
/>
|
|
225
|
+
}
|
|
173
226
|
/>
|
|
174
227
|
</Flex>
|
|
175
228
|
|
|
176
229
|
<Box paddingTop={2}>
|
|
177
|
-
<Typography
|
|
178
|
-
|
|
179
|
-
|
|
230
|
+
<Typography
|
|
231
|
+
variant="pi"
|
|
232
|
+
textColor="neutral600"
|
|
233
|
+
style={{ textAlign: "left" }}
|
|
234
|
+
>
|
|
235
|
+
For all test card numbers (positive, negative, frictionless 3DS), 3D
|
|
236
|
+
Secure test data, and detailed documentation, please refer to the{" "}
|
|
237
|
+
<Link
|
|
238
|
+
href="https://docs.payone.com/security-risk-management/3d-secure#/"
|
|
239
|
+
target="_blank"
|
|
240
|
+
rel="noopener noreferrer"
|
|
241
|
+
>
|
|
180
242
|
Payone 3D Secure Documentation
|
|
181
243
|
</Link>
|
|
182
244
|
.
|
|
@@ -188,4 +250,3 @@ const CardDetailsInput = ({
|
|
|
188
250
|
};
|
|
189
251
|
|
|
190
252
|
export default CardDetailsInput;
|
|
191
|
-
|