strapi-plugin-payone-provider 4.6.10 → 4.6.12
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 +199 -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 +121 -85
- 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 +2 -2
- package/server/bootstrap.js +6 -6
- package/server/content-types/index.js +5 -0
- package/server/content-types/transactions/index.js +5 -0
- package/server/content-types/transactions/schema.json +87 -0
- package/server/controllers/payone.js +29 -3
- package/server/index.js +2 -1
- 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/applePayService.js +0 -2
- package/server/services/payone.js +16 -4
- package/server/services/settingsService.js +8 -2
- package/server/services/testConnectionService.js +11 -72
- package/server/services/transactionService.js +147 -154
- package/server/services/transactionStatusService.js +63 -0
- package/server/utils/sanitize.js +41 -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,142 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
Box,
|
|
4
|
-
Flex,
|
|
5
|
-
Typography,
|
|
6
|
-
TextInput,
|
|
7
|
-
Button,
|
|
8
|
-
} from "@strapi/design-system";
|
|
9
|
-
import { Play } from "@strapi/icons";
|
|
10
|
-
import GooglePayButton from "../GooglePaybutton";
|
|
11
|
-
import CardDetailsInput from "./CardDetailsInput";
|
|
12
|
-
|
|
13
|
-
const PreauthorizationForm = ({
|
|
14
|
-
paymentAmount,
|
|
15
|
-
setPaymentAmount,
|
|
16
|
-
preauthReference,
|
|
17
|
-
setPreauthReference,
|
|
18
|
-
isProcessingPayment,
|
|
19
|
-
onPreauthorization,
|
|
20
|
-
paymentMethod,
|
|
21
|
-
settings,
|
|
22
|
-
setGooglePayToken,
|
|
23
|
-
cardtype,
|
|
24
|
-
setCardtype,
|
|
25
|
-
cardpan,
|
|
26
|
-
setCardpan,
|
|
27
|
-
cardexpiredate,
|
|
28
|
-
setCardexpiredate,
|
|
29
|
-
cardcvc2,
|
|
30
|
-
setCardcvc2,
|
|
31
|
-
isLiveMode = false,
|
|
32
|
-
}) => {
|
|
33
|
-
const handleGooglePayToken = (token, paymentData) => {
|
|
34
|
-
if (!token) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
setGooglePayToken(token);
|
|
38
|
-
onPreauthorization(token);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const handleGooglePayError = (error) => {
|
|
42
|
-
console.error("Google Pay error:", error);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<Flex direction="column" alignItems="stretch" gap={4}>
|
|
47
|
-
<Flex direction="row" gap={2}>
|
|
48
|
-
<Typography
|
|
49
|
-
variant="omega"
|
|
50
|
-
fontWeight="semiBold"
|
|
51
|
-
textColor="neutral800"
|
|
52
|
-
className="payment-form-title"
|
|
53
|
-
>
|
|
54
|
-
Preauthorization
|
|
55
|
-
</Typography>
|
|
56
|
-
<Typography
|
|
57
|
-
variant="pi"
|
|
58
|
-
textColor="neutral600"
|
|
59
|
-
className="payment-form-description"
|
|
60
|
-
>
|
|
61
|
-
Reserve an amount on a credit card without capturing it immediately.
|
|
62
|
-
</Typography>
|
|
63
|
-
</Flex>
|
|
64
|
-
|
|
65
|
-
<Flex gap={4} wrap="wrap">
|
|
66
|
-
<TextInput
|
|
67
|
-
label="Amount (in cents) *"
|
|
68
|
-
name="paymentAmount"
|
|
69
|
-
value={paymentAmount}
|
|
70
|
-
onChange={(e) => setPaymentAmount(e.target.value)}
|
|
71
|
-
placeholder="Enter amount (e.g., 1000 for €10.00)"
|
|
72
|
-
hint="Amount in cents (e.g., 1000 = €10.00)"
|
|
73
|
-
required
|
|
74
|
-
className="payment-input"
|
|
75
|
-
style={{ flex: 1, minWidth: "250px" }}
|
|
76
|
-
/>
|
|
77
|
-
|
|
78
|
-
<TextInput
|
|
79
|
-
label="Reference *"
|
|
80
|
-
name="preauthReference"
|
|
81
|
-
value={preauthReference}
|
|
82
|
-
onChange={(e) => setPreauthReference(e.target.value)}
|
|
83
|
-
placeholder="Auto-generated if empty"
|
|
84
|
-
hint="Reference will be auto-generated if left empty"
|
|
85
|
-
className="payment-input"
|
|
86
|
-
style={{ flex: 1, minWidth: "250px" }}
|
|
87
|
-
/>
|
|
88
|
-
</Flex>
|
|
89
|
-
|
|
90
|
-
{paymentMethod === "cc" && settings?.enable3DSecure && (
|
|
91
|
-
<Box marginTop={4}>
|
|
92
|
-
<CardDetailsInput
|
|
93
|
-
cardtype={cardtype}
|
|
94
|
-
setCardtype={setCardtype}
|
|
95
|
-
cardpan={cardpan}
|
|
96
|
-
setCardpan={setCardpan}
|
|
97
|
-
cardexpiredate={cardexpiredate}
|
|
98
|
-
setCardexpiredate={setCardexpiredate}
|
|
99
|
-
cardcvc2={cardcvc2}
|
|
100
|
-
setCardcvc2={setCardcvc2}
|
|
101
|
-
/>
|
|
102
|
-
</Box>
|
|
103
|
-
)}
|
|
104
|
-
|
|
105
|
-
{paymentMethod === "gpp" ? (
|
|
106
|
-
<GooglePayButton
|
|
107
|
-
amount={paymentAmount}
|
|
108
|
-
currency="EUR"
|
|
109
|
-
onTokenReceived={handleGooglePayToken}
|
|
110
|
-
onError={handleGooglePayError}
|
|
111
|
-
settings={settings}
|
|
112
|
-
/>
|
|
113
|
-
) : paymentMethod === "apl" ? (
|
|
114
|
-
<Box>
|
|
115
|
-
<Typography variant="pi" textColor="neutral600">
|
|
116
|
-
Apple Pay is only supported for Authorization, not Preauthorization.
|
|
117
|
-
</Typography>
|
|
118
|
-
</Box>
|
|
119
|
-
) : (
|
|
120
|
-
<Button
|
|
121
|
-
variant="default"
|
|
122
|
-
onClick={onPreauthorization}
|
|
123
|
-
loading={isProcessingPayment}
|
|
124
|
-
startIcon={<Play />}
|
|
125
|
-
style={{ maxWidth: "200px" }}
|
|
126
|
-
className="payment-button payment-button-primary"
|
|
127
|
-
disabled={
|
|
128
|
-
!paymentAmount.trim() ||
|
|
129
|
-
(paymentMethod === "cc" &&
|
|
130
|
-
settings?.enable3DSecure !== false &&
|
|
131
|
-
(!cardtype || !cardpan || !cardexpiredate || !cardcvc2)) ||
|
|
132
|
-
isLiveMode
|
|
133
|
-
}
|
|
134
|
-
>
|
|
135
|
-
Process Preauthorization
|
|
136
|
-
</Button>
|
|
137
|
-
)}
|
|
138
|
-
</Flex>
|
|
139
|
-
);
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
export default PreauthorizationForm;
|