strapi-plugin-payone-provider 5.7.26 → 5.8.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 +503 -506
- 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 +264 -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 +115 -100
- package/server/utils/responseParser.js +141 -141
- package/strapi-admin.js +4 -4
- package/strapi-server.js +3 -3
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
export const shouldShowTooltip = (inputType, tooltipContent) => {
|
|
3
|
-
if (!tooltipContent) {
|
|
4
|
-
return false;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
const inputTypesWithTooltip = ["switch", "toggle", "checkbox", "textarea"];
|
|
8
|
-
|
|
9
|
-
return inputTypesWithTooltip.includes(inputType);
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const getTooltipProps = (tooltipContent) => {
|
|
14
|
-
return {
|
|
15
|
-
label: tooltipContent,
|
|
16
|
-
position: "top",
|
|
17
|
-
};
|
|
18
|
-
};
|
|
1
|
+
|
|
2
|
+
export const shouldShowTooltip = (inputType, tooltipContent) => {
|
|
3
|
+
if (!tooltipContent) {
|
|
4
|
+
return false;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const inputTypesWithTooltip = ["switch", "toggle", "checkbox", "textarea"];
|
|
8
|
+
|
|
9
|
+
return inputTypesWithTooltip.includes(inputType);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export const getTooltipProps = (tooltipContent) => {
|
|
14
|
+
return {
|
|
15
|
+
label: tooltipContent,
|
|
16
|
+
position: "top",
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
export const getStatusColor = (status) => {
|
|
2
|
-
switch (status) {
|
|
3
|
-
case "APPROVED":
|
|
4
|
-
return "success200";
|
|
5
|
-
case "ERROR":
|
|
6
|
-
return "danger200";
|
|
7
|
-
case "PENDING":
|
|
8
|
-
return "warning200";
|
|
9
|
-
case "REDIRECT":
|
|
10
|
-
return "success100";
|
|
11
|
-
default:
|
|
12
|
-
return "success100";
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const formatAmount = (amount, currency) => {
|
|
17
|
-
if (!amount) return "N/A";
|
|
18
|
-
return `${(amount / 100).toFixed(2)} ${currency || "EUR"}`;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const formatDate = (dateString) => {
|
|
22
|
-
if (!dateString) return "N/A";
|
|
23
|
-
return new Date(dateString).toLocaleString("en-US", {
|
|
24
|
-
year: "numeric",
|
|
25
|
-
month: "2-digit",
|
|
26
|
-
day: "2-digit",
|
|
27
|
-
hour: "2-digit",
|
|
28
|
-
minute: "2-digit"
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const getPaymentMethodName = (clearingtype, wallettype) => {
|
|
33
|
-
switch (clearingtype) {
|
|
34
|
-
case "cc" || "card" | "c":
|
|
35
|
-
return "Credit Card";
|
|
36
|
-
case "sb":
|
|
37
|
-
return "Online Banking";
|
|
38
|
-
case "wlt":
|
|
39
|
-
return wallettype === "PPE" ? "PayPal" : "Wallet";
|
|
40
|
-
case "elv":
|
|
41
|
-
return "Direct Debit (SEPA)";
|
|
42
|
-
default:
|
|
43
|
-
return clearingtype || "Unknown";
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const isCreditCard = (transaction) => {
|
|
48
|
-
const clearingtype =
|
|
49
|
-
transaction.raw_request?.clearingtype ||
|
|
50
|
-
transaction.body?.raw_request?.clearingtype;
|
|
51
|
-
return clearingtype === "cc";
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export const getCardTypeName = (transaction) => {
|
|
55
|
-
if (!isCreditCard(transaction)) return null;
|
|
56
|
-
|
|
57
|
-
const cardtype =
|
|
58
|
-
transaction.raw_request?.cardtype ||
|
|
59
|
-
transaction.body?.raw_request?.cardtype;
|
|
60
|
-
|
|
61
|
-
switch (cardtype) {
|
|
62
|
-
case "V":
|
|
63
|
-
return "Visa";
|
|
64
|
-
case "M":
|
|
65
|
-
return "Mastercard";
|
|
66
|
-
case "A":
|
|
67
|
-
return "American Express";
|
|
68
|
-
default:
|
|
69
|
-
return cardtype || "Unknown";
|
|
70
|
-
}
|
|
71
|
-
};
|
|
1
|
+
export const getStatusColor = (status) => {
|
|
2
|
+
switch (status) {
|
|
3
|
+
case "APPROVED":
|
|
4
|
+
return "success200";
|
|
5
|
+
case "ERROR":
|
|
6
|
+
return "danger200";
|
|
7
|
+
case "PENDING":
|
|
8
|
+
return "warning200";
|
|
9
|
+
case "REDIRECT":
|
|
10
|
+
return "success100";
|
|
11
|
+
default:
|
|
12
|
+
return "success100";
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const formatAmount = (amount, currency) => {
|
|
17
|
+
if (!amount) return "N/A";
|
|
18
|
+
return `${(amount / 100).toFixed(2)} ${currency || "EUR"}`;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const formatDate = (dateString) => {
|
|
22
|
+
if (!dateString) return "N/A";
|
|
23
|
+
return new Date(dateString).toLocaleString("en-US", {
|
|
24
|
+
year: "numeric",
|
|
25
|
+
month: "2-digit",
|
|
26
|
+
day: "2-digit",
|
|
27
|
+
hour: "2-digit",
|
|
28
|
+
minute: "2-digit"
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const getPaymentMethodName = (clearingtype, wallettype) => {
|
|
33
|
+
switch (clearingtype) {
|
|
34
|
+
case "cc" || "card" | "c":
|
|
35
|
+
return "Credit Card";
|
|
36
|
+
case "sb":
|
|
37
|
+
return "Online Banking";
|
|
38
|
+
case "wlt":
|
|
39
|
+
return wallettype === "PPE" ? "PayPal" : "Wallet";
|
|
40
|
+
case "elv":
|
|
41
|
+
return "Direct Debit (SEPA)";
|
|
42
|
+
default:
|
|
43
|
+
return clearingtype || "Unknown";
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const isCreditCard = (transaction) => {
|
|
48
|
+
const clearingtype =
|
|
49
|
+
transaction.raw_request?.clearingtype ||
|
|
50
|
+
transaction.body?.raw_request?.clearingtype;
|
|
51
|
+
return clearingtype === "cc";
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const getCardTypeName = (transaction) => {
|
|
55
|
+
if (!isCreditCard(transaction)) return null;
|
|
56
|
+
|
|
57
|
+
const cardtype =
|
|
58
|
+
transaction.raw_request?.cardtype ||
|
|
59
|
+
transaction.body?.raw_request?.cardtype;
|
|
60
|
+
|
|
61
|
+
switch (cardtype) {
|
|
62
|
+
case "V":
|
|
63
|
+
return "Visa";
|
|
64
|
+
case "M":
|
|
65
|
+
return "Mastercard";
|
|
66
|
+
case "A":
|
|
67
|
+
return "American Express";
|
|
68
|
+
default:
|
|
69
|
+
return cardtype || "Unknown";
|
|
70
|
+
}
|
|
71
|
+
};
|
package/admin/src/pluginId.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import pluginPkg from "../../package.json";
|
|
2
|
-
|
|
3
|
-
// Extract plugin ID from package name
|
|
4
|
-
// Package name: 'strapi-plugin-payone-provider'
|
|
5
|
-
// Plugin ID should be: 'strapi-plugin-payone-provider' (matches package name)
|
|
6
|
-
const pluginId = pluginPkg.name.replace(/^(@[^-,.][\w,-]+\/|strapi-)plugin-/i, '');
|
|
7
|
-
|
|
8
|
-
// Keep the full name including -provider suffix
|
|
9
|
-
export default `strapi-plugin-${pluginId}`;
|
|
1
|
+
import pluginPkg from "../../package.json";
|
|
2
|
+
|
|
3
|
+
// Extract plugin ID from package name
|
|
4
|
+
// Package name: 'strapi-plugin-payone-provider'
|
|
5
|
+
// Plugin ID should be: 'strapi-plugin-payone-provider' (matches package name)
|
|
6
|
+
const pluginId = pluginPkg.name.replace(/^(@[^-,.][\w,-]+\/|strapi-)plugin-/i, '');
|
|
7
|
+
|
|
8
|
+
// Keep the full name including -provider suffix
|
|
9
|
+
export default `strapi-plugin-${pluginId}`;
|