strapi-plugin-payone-provider 5.7.24 → 5.7.26
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 +1191 -1191
- package/admin/src/components/Initializer/index.jsx +16 -16
- package/admin/src/components/PluginIcon/index.jsx +17 -17
- package/admin/src/index.js +57 -57
- package/admin/src/pages/App/components/AppHeader.jsx +45 -45
- package/admin/src/pages/App/components/AppTabs.jsx +105 -105
- package/admin/src/pages/App/components/ApplePayBtn.jsx +355 -355
- package/admin/src/pages/App/components/ApplePayConfig.jsx +357 -357
- package/admin/src/pages/App/components/DocsPanel.jsx +53 -53
- package/admin/src/pages/App/components/RenderInput.jsx +78 -78
- package/admin/src/pages/App/components/StatusBadge.jsx +87 -87
- package/admin/src/pages/App/components/icons/BankIcon.jsx +10 -10
- package/admin/src/pages/App/components/icons/ChevronDownIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/ChevronUpIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/CreditCardIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/ErrorIcon.jsx +10 -10
- package/admin/src/pages/App/components/icons/InfoIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/MarkCircle.jsx +19 -19
- package/admin/src/pages/App/components/icons/PaymentIcon.jsx +10 -10
- package/admin/src/pages/App/components/icons/PendingIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/PersonIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/SuccessIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/WalletIcon.jsx +9 -9
- package/admin/src/pages/App/components/icons/index.jsx +12 -12
- package/admin/src/pages/App/components/payment-actions/AuthorizationForm.jsx +334 -334
- package/admin/src/pages/App/components/payment-actions/CaptureForm.jsx +120 -120
- package/admin/src/pages/App/components/payment-actions/PaymentActionsPanel.jsx +183 -183
- package/admin/src/pages/App/components/payment-actions/PaymentMethodSelector.jsx +315 -315
- package/admin/src/pages/App/components/payment-actions/PaymentResult.jsx +129 -129
- package/admin/src/pages/App/components/payment-actions/PreauthorizationForm.jsx +273 -273
- package/admin/src/pages/App/components/payment-actions/RefundForm.jsx +114 -114
- package/admin/src/pages/App/components/transaction-history/ImportExportBar.jsx +153 -153
- package/admin/src/pages/App/components/transaction-history/details/TransactionHistoryItem.jsx +526 -526
- package/admin/src/pages/App/index.jsx +96 -96
- package/admin/src/pages/App/styles.css +176 -176
- package/admin/src/pages/constants/paymentConstants.js +71 -71
- package/admin/src/pages/hooks/use-system-theme.js +27 -27
- package/admin/src/pages/hooks/usePaymentActions.js +498 -498
- package/admin/src/pages/hooks/usePluginTranslations.js +12 -12
- package/admin/src/pages/hooks/useSettings.js +183 -183
- package/admin/src/pages/hooks/useTransactionHistory.js +148 -148
- package/admin/src/pages/utils/api.js +97 -97
- package/admin/src/pages/utils/applePayConstants.js +196 -196
- package/admin/src/pages/utils/formatTransactionData.js +15 -15
- package/admin/src/pages/utils/getInputComponent.jsx +200 -200
- package/admin/src/pages/utils/paymentUtils.js +661 -661
- package/admin/src/pages/utils/tooltipHelpers.js +18 -18
- package/admin/src/pages/utils/transactionTableUtils.js +71 -71
- package/admin/src/pluginId.js +9 -9
- package/admin/src/translations/de.json +235 -235
- package/admin/src/translations/en.json +235 -235
- package/admin/src/translations/fr.json +235 -235
- package/admin/src/translations/ru.json +235 -235
- package/admin/src/utils/prefixPluginTranslations.js +13 -13
- package/package.json +45 -45
- package/server/bootstrap.js +107 -107
- package/server/config/index.js +83 -83
- package/server/content-types/index.js +4 -4
- package/server/content-types/transactions/index.js +4 -4
- package/server/content-types/transactions/schema.json +86 -86
- package/server/controllers/index.js +7 -7
- package/server/controllers/payone.js +506 -451
- package/server/destroy.js +5 -5
- package/server/index.js +23 -23
- package/server/policies/index.js +7 -7
- package/server/policies/is-auth.js +29 -29
- package/server/policies/isSuperAdmin.js +20 -20
- package/server/register.js +5 -5
- package/server/routes/index.js +218 -218
- package/server/services/applePayService.js +295 -295
- package/server/services/index.js +9 -9
- package/server/services/paymentService.js +223 -223
- package/server/services/payone.js +78 -78
- package/server/services/settingsService.js +59 -59
- package/server/services/testConnectionService.js +115 -115
- package/server/services/transactionService.js +262 -262
- package/server/utils/csvTransactions.js +82 -82
- package/server/utils/normalize.js +39 -39
- package/server/utils/paymentMethodParams.js +288 -288
- package/server/utils/requestBuilder.js +100 -100
- package/server/utils/responseParser.js +141 -141
- package/strapi-admin.js +4 -4
- package/strapi-server.js +3 -3
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Card, CardBody, Flex, Typography, Alert } from "@strapi/design-system";
|
|
3
|
-
import StatusBadge from "../StatusBadge";
|
|
4
|
-
import { formatTransactionData } from "../../../utils/formatTransactionData";
|
|
5
|
-
import { usePluginTranslations } from "../../../hooks/usePluginTranslations";
|
|
6
|
-
|
|
7
|
-
const PaymentResult = ({ paymentError, paymentResult }) => {
|
|
8
|
-
const { t } = usePluginTranslations();
|
|
9
|
-
if (!paymentError && !paymentResult) {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<>
|
|
15
|
-
{paymentError && (
|
|
16
|
-
<Alert variant="danger" title={t("paymentResult.errorTitle", "Error")} className="payment-alert">
|
|
17
|
-
{paymentError}
|
|
18
|
-
</Alert>
|
|
19
|
-
)}
|
|
20
|
-
|
|
21
|
-
{paymentResult && (
|
|
22
|
-
<Card>
|
|
23
|
-
<CardBody>
|
|
24
|
-
<Flex direction="column" gap={4} alignItems={"stretch"}>
|
|
25
|
-
<Flex direction={"row"} alignItems={"center"} gap={2}>
|
|
26
|
-
<Typography variant="delta" as="h3" className="payment-section-title">
|
|
27
|
-
{t("paymentResult.title", "Payment Result")}
|
|
28
|
-
</Typography>
|
|
29
|
-
{paymentResult?.Status && (
|
|
30
|
-
<StatusBadge status={paymentResult.Status} />
|
|
31
|
-
)}
|
|
32
|
-
</Flex>
|
|
33
|
-
|
|
34
|
-
<Flex direction="column" gap={3} alignItems={"stretch"}>
|
|
35
|
-
{formatTransactionData(paymentResult).map((item, index) => (
|
|
36
|
-
<Flex
|
|
37
|
-
key={index}
|
|
38
|
-
justifyContent="space-between"
|
|
39
|
-
alignItems="start"
|
|
40
|
-
style={{
|
|
41
|
-
padding: "8px 0",
|
|
42
|
-
borderBottom:
|
|
43
|
-
index < formatTransactionData(paymentResult).length - 1
|
|
44
|
-
? "1px solid #e8e8ea"
|
|
45
|
-
: "none",
|
|
46
|
-
}}
|
|
47
|
-
>
|
|
48
|
-
<Typography
|
|
49
|
-
variant="pi"
|
|
50
|
-
textColor="neutral600"
|
|
51
|
-
style={{ minWidth: "200px", fontWeight: "500" }}
|
|
52
|
-
>
|
|
53
|
-
{item.key}:
|
|
54
|
-
</Typography>
|
|
55
|
-
<Typography
|
|
56
|
-
variant="pi"
|
|
57
|
-
style={{
|
|
58
|
-
flex: 1,
|
|
59
|
-
textAlign: "right",
|
|
60
|
-
fontWeight: "400",
|
|
61
|
-
wordBreak: "break-word",
|
|
62
|
-
fontFamily: item.key.toLowerCase().includes("raw")
|
|
63
|
-
? "monospace"
|
|
64
|
-
: "inherit",
|
|
65
|
-
fontSize: item.key.toLowerCase().includes("raw")
|
|
66
|
-
? "11px"
|
|
67
|
-
: "inherit",
|
|
68
|
-
}}
|
|
69
|
-
>
|
|
70
|
-
{item.value}
|
|
71
|
-
</Typography>
|
|
72
|
-
</Flex>
|
|
73
|
-
))}
|
|
74
|
-
</Flex>
|
|
75
|
-
{paymentResult?.is3DSRequired && !paymentResult?.redirectUrl && (
|
|
76
|
-
<Alert
|
|
77
|
-
variant="warning"
|
|
78
|
-
title="3D Secure Authentication Required"
|
|
79
|
-
>
|
|
80
|
-
<Flex direction="column" gap={2}>
|
|
81
|
-
<Typography variant="pi">
|
|
82
|
-
Payone requires 3D Secure authentication, but no redirect
|
|
83
|
-
URL was provided in the response.
|
|
84
|
-
</Typography>
|
|
85
|
-
<Typography variant="pi" fontWeight="semiBold">
|
|
86
|
-
Possible solutions:
|
|
87
|
-
</Typography>
|
|
88
|
-
<Typography
|
|
89
|
-
variant="pi"
|
|
90
|
-
component="ul"
|
|
91
|
-
style={{ marginLeft: "20px" }}
|
|
92
|
-
>
|
|
93
|
-
<li>
|
|
94
|
-
Check Payone portal configuration for 3DS settings
|
|
95
|
-
</li>
|
|
96
|
-
<li>
|
|
97
|
-
Verify that redirect URLs (successurl, errorurl,
|
|
98
|
-
backurl) are properly configured
|
|
99
|
-
</li>
|
|
100
|
-
<li>
|
|
101
|
-
Ensure you're using test mode with proper test
|
|
102
|
-
credentials
|
|
103
|
-
</li>
|
|
104
|
-
<li>
|
|
105
|
-
Check if 3dscheck request is needed before authorization
|
|
106
|
-
</li>
|
|
107
|
-
</Typography>
|
|
108
|
-
<Typography
|
|
109
|
-
variant="pi"
|
|
110
|
-
textColor="neutral600"
|
|
111
|
-
marginTop={2}
|
|
112
|
-
>
|
|
113
|
-
<strong>Error Code:</strong>{" "}
|
|
114
|
-
{paymentResult?.errorCode ||
|
|
115
|
-
paymentResult?.ErrorCode ||
|
|
116
|
-
"4219"}
|
|
117
|
-
</Typography>
|
|
118
|
-
</Flex>
|
|
119
|
-
</Alert>
|
|
120
|
-
)}
|
|
121
|
-
</Flex>
|
|
122
|
-
</CardBody>
|
|
123
|
-
</Card>
|
|
124
|
-
)}
|
|
125
|
-
</>
|
|
126
|
-
);
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
export default PaymentResult;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Card, CardBody, Flex, Typography, Alert } from "@strapi/design-system";
|
|
3
|
+
import StatusBadge from "../StatusBadge";
|
|
4
|
+
import { formatTransactionData } from "../../../utils/formatTransactionData";
|
|
5
|
+
import { usePluginTranslations } from "../../../hooks/usePluginTranslations";
|
|
6
|
+
|
|
7
|
+
const PaymentResult = ({ paymentError, paymentResult }) => {
|
|
8
|
+
const { t } = usePluginTranslations();
|
|
9
|
+
if (!paymentError && !paymentResult) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<>
|
|
15
|
+
{paymentError && (
|
|
16
|
+
<Alert variant="danger" title={t("paymentResult.errorTitle", "Error")} className="payment-alert">
|
|
17
|
+
{paymentError}
|
|
18
|
+
</Alert>
|
|
19
|
+
)}
|
|
20
|
+
|
|
21
|
+
{paymentResult && (
|
|
22
|
+
<Card>
|
|
23
|
+
<CardBody>
|
|
24
|
+
<Flex direction="column" gap={4} alignItems={"stretch"}>
|
|
25
|
+
<Flex direction={"row"} alignItems={"center"} gap={2}>
|
|
26
|
+
<Typography variant="delta" as="h3" className="payment-section-title">
|
|
27
|
+
{t("paymentResult.title", "Payment Result")}
|
|
28
|
+
</Typography>
|
|
29
|
+
{paymentResult?.Status && (
|
|
30
|
+
<StatusBadge status={paymentResult.Status} />
|
|
31
|
+
)}
|
|
32
|
+
</Flex>
|
|
33
|
+
|
|
34
|
+
<Flex direction="column" gap={3} alignItems={"stretch"}>
|
|
35
|
+
{formatTransactionData(paymentResult).map((item, index) => (
|
|
36
|
+
<Flex
|
|
37
|
+
key={index}
|
|
38
|
+
justifyContent="space-between"
|
|
39
|
+
alignItems="start"
|
|
40
|
+
style={{
|
|
41
|
+
padding: "8px 0",
|
|
42
|
+
borderBottom:
|
|
43
|
+
index < formatTransactionData(paymentResult).length - 1
|
|
44
|
+
? "1px solid #e8e8ea"
|
|
45
|
+
: "none",
|
|
46
|
+
}}
|
|
47
|
+
>
|
|
48
|
+
<Typography
|
|
49
|
+
variant="pi"
|
|
50
|
+
textColor="neutral600"
|
|
51
|
+
style={{ minWidth: "200px", fontWeight: "500" }}
|
|
52
|
+
>
|
|
53
|
+
{item.key}:
|
|
54
|
+
</Typography>
|
|
55
|
+
<Typography
|
|
56
|
+
variant="pi"
|
|
57
|
+
style={{
|
|
58
|
+
flex: 1,
|
|
59
|
+
textAlign: "right",
|
|
60
|
+
fontWeight: "400",
|
|
61
|
+
wordBreak: "break-word",
|
|
62
|
+
fontFamily: item.key.toLowerCase().includes("raw")
|
|
63
|
+
? "monospace"
|
|
64
|
+
: "inherit",
|
|
65
|
+
fontSize: item.key.toLowerCase().includes("raw")
|
|
66
|
+
? "11px"
|
|
67
|
+
: "inherit",
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
{item.value}
|
|
71
|
+
</Typography>
|
|
72
|
+
</Flex>
|
|
73
|
+
))}
|
|
74
|
+
</Flex>
|
|
75
|
+
{paymentResult?.is3DSRequired && !paymentResult?.redirectUrl && (
|
|
76
|
+
<Alert
|
|
77
|
+
variant="warning"
|
|
78
|
+
title="3D Secure Authentication Required"
|
|
79
|
+
>
|
|
80
|
+
<Flex direction="column" gap={2}>
|
|
81
|
+
<Typography variant="pi">
|
|
82
|
+
Payone requires 3D Secure authentication, but no redirect
|
|
83
|
+
URL was provided in the response.
|
|
84
|
+
</Typography>
|
|
85
|
+
<Typography variant="pi" fontWeight="semiBold">
|
|
86
|
+
Possible solutions:
|
|
87
|
+
</Typography>
|
|
88
|
+
<Typography
|
|
89
|
+
variant="pi"
|
|
90
|
+
component="ul"
|
|
91
|
+
style={{ marginLeft: "20px" }}
|
|
92
|
+
>
|
|
93
|
+
<li>
|
|
94
|
+
Check Payone portal configuration for 3DS settings
|
|
95
|
+
</li>
|
|
96
|
+
<li>
|
|
97
|
+
Verify that redirect URLs (successurl, errorurl,
|
|
98
|
+
backurl) are properly configured
|
|
99
|
+
</li>
|
|
100
|
+
<li>
|
|
101
|
+
Ensure you're using test mode with proper test
|
|
102
|
+
credentials
|
|
103
|
+
</li>
|
|
104
|
+
<li>
|
|
105
|
+
Check if 3dscheck request is needed before authorization
|
|
106
|
+
</li>
|
|
107
|
+
</Typography>
|
|
108
|
+
<Typography
|
|
109
|
+
variant="pi"
|
|
110
|
+
textColor="neutral600"
|
|
111
|
+
marginTop={2}
|
|
112
|
+
>
|
|
113
|
+
<strong>Error Code:</strong>{" "}
|
|
114
|
+
{paymentResult?.errorCode ||
|
|
115
|
+
paymentResult?.ErrorCode ||
|
|
116
|
+
"4219"}
|
|
117
|
+
</Typography>
|
|
118
|
+
</Flex>
|
|
119
|
+
</Alert>
|
|
120
|
+
)}
|
|
121
|
+
</Flex>
|
|
122
|
+
</CardBody>
|
|
123
|
+
</Card>
|
|
124
|
+
)}
|
|
125
|
+
</>
|
|
126
|
+
);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export default PaymentResult;
|