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.
Files changed (83) hide show
  1. package/README.md +1191 -1191
  2. package/admin/src/components/Initializer/index.jsx +16 -16
  3. package/admin/src/components/PluginIcon/index.jsx +17 -17
  4. package/admin/src/index.js +57 -57
  5. package/admin/src/pages/App/components/AppHeader.jsx +45 -45
  6. package/admin/src/pages/App/components/AppTabs.jsx +105 -105
  7. package/admin/src/pages/App/components/ApplePayBtn.jsx +355 -355
  8. package/admin/src/pages/App/components/ApplePayConfig.jsx +357 -357
  9. package/admin/src/pages/App/components/DocsPanel.jsx +53 -53
  10. package/admin/src/pages/App/components/RenderInput.jsx +78 -78
  11. package/admin/src/pages/App/components/StatusBadge.jsx +87 -87
  12. package/admin/src/pages/App/components/icons/BankIcon.jsx +10 -10
  13. package/admin/src/pages/App/components/icons/ChevronDownIcon.jsx +9 -9
  14. package/admin/src/pages/App/components/icons/ChevronUpIcon.jsx +9 -9
  15. package/admin/src/pages/App/components/icons/CreditCardIcon.jsx +9 -9
  16. package/admin/src/pages/App/components/icons/ErrorIcon.jsx +10 -10
  17. package/admin/src/pages/App/components/icons/InfoIcon.jsx +9 -9
  18. package/admin/src/pages/App/components/icons/MarkCircle.jsx +19 -19
  19. package/admin/src/pages/App/components/icons/PaymentIcon.jsx +10 -10
  20. package/admin/src/pages/App/components/icons/PendingIcon.jsx +9 -9
  21. package/admin/src/pages/App/components/icons/PersonIcon.jsx +9 -9
  22. package/admin/src/pages/App/components/icons/SuccessIcon.jsx +9 -9
  23. package/admin/src/pages/App/components/icons/WalletIcon.jsx +9 -9
  24. package/admin/src/pages/App/components/icons/index.jsx +12 -12
  25. package/admin/src/pages/App/components/payment-actions/AuthorizationForm.jsx +334 -334
  26. package/admin/src/pages/App/components/payment-actions/CaptureForm.jsx +120 -120
  27. package/admin/src/pages/App/components/payment-actions/PaymentActionsPanel.jsx +183 -183
  28. package/admin/src/pages/App/components/payment-actions/PaymentMethodSelector.jsx +315 -315
  29. package/admin/src/pages/App/components/payment-actions/PaymentResult.jsx +129 -129
  30. package/admin/src/pages/App/components/payment-actions/PreauthorizationForm.jsx +273 -273
  31. package/admin/src/pages/App/components/payment-actions/RefundForm.jsx +114 -114
  32. package/admin/src/pages/App/components/transaction-history/ImportExportBar.jsx +153 -153
  33. package/admin/src/pages/App/components/transaction-history/details/TransactionHistoryItem.jsx +526 -526
  34. package/admin/src/pages/App/index.jsx +96 -96
  35. package/admin/src/pages/App/styles.css +176 -176
  36. package/admin/src/pages/constants/paymentConstants.js +71 -71
  37. package/admin/src/pages/hooks/use-system-theme.js +27 -27
  38. package/admin/src/pages/hooks/usePaymentActions.js +498 -498
  39. package/admin/src/pages/hooks/usePluginTranslations.js +12 -12
  40. package/admin/src/pages/hooks/useSettings.js +183 -183
  41. package/admin/src/pages/hooks/useTransactionHistory.js +148 -148
  42. package/admin/src/pages/utils/api.js +97 -97
  43. package/admin/src/pages/utils/applePayConstants.js +196 -196
  44. package/admin/src/pages/utils/formatTransactionData.js +15 -15
  45. package/admin/src/pages/utils/getInputComponent.jsx +200 -200
  46. package/admin/src/pages/utils/paymentUtils.js +661 -661
  47. package/admin/src/pages/utils/tooltipHelpers.js +18 -18
  48. package/admin/src/pages/utils/transactionTableUtils.js +71 -71
  49. package/admin/src/pluginId.js +9 -9
  50. package/admin/src/translations/de.json +235 -235
  51. package/admin/src/translations/en.json +235 -235
  52. package/admin/src/translations/fr.json +235 -235
  53. package/admin/src/translations/ru.json +235 -235
  54. package/admin/src/utils/prefixPluginTranslations.js +13 -13
  55. package/package.json +45 -45
  56. package/server/bootstrap.js +107 -107
  57. package/server/config/index.js +83 -83
  58. package/server/content-types/index.js +4 -4
  59. package/server/content-types/transactions/index.js +4 -4
  60. package/server/content-types/transactions/schema.json +86 -86
  61. package/server/controllers/index.js +7 -7
  62. package/server/controllers/payone.js +506 -451
  63. package/server/destroy.js +5 -5
  64. package/server/index.js +23 -23
  65. package/server/policies/index.js +7 -7
  66. package/server/policies/is-auth.js +29 -29
  67. package/server/policies/isSuperAdmin.js +20 -20
  68. package/server/register.js +5 -5
  69. package/server/routes/index.js +218 -218
  70. package/server/services/applePayService.js +295 -295
  71. package/server/services/index.js +9 -9
  72. package/server/services/paymentService.js +223 -223
  73. package/server/services/payone.js +78 -78
  74. package/server/services/settingsService.js +59 -59
  75. package/server/services/testConnectionService.js +115 -115
  76. package/server/services/transactionService.js +262 -262
  77. package/server/utils/csvTransactions.js +82 -82
  78. package/server/utils/normalize.js +39 -39
  79. package/server/utils/paymentMethodParams.js +288 -288
  80. package/server/utils/requestBuilder.js +100 -100
  81. package/server/utils/responseParser.js +141 -141
  82. package/strapi-admin.js +4 -4
  83. 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;