strapi-plugin-payone-provider 1.1.3 → 1.3.0
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 +1156 -380
- package/admin/src/index.js +4 -1
- package/admin/src/pages/App/components/AppHeader.js +37 -0
- package/admin/src/pages/App/components/AppTabs.js +134 -0
- package/admin/src/pages/App/components/ConfigurationPanel.js +34 -35
- package/admin/src/pages/App/components/GooglePaybutton.js +300 -0
- package/admin/src/pages/App/components/HistoryPanel.js +25 -38
- package/admin/src/pages/App/components/PaymentActionsPanel.js +119 -280
- package/admin/src/pages/App/components/StatusBadge.js +3 -1
- package/admin/src/pages/App/components/TransactionHistoryItem.js +4 -1
- package/admin/src/pages/App/components/paymentActions/AuthorizationForm.js +122 -0
- package/admin/src/pages/App/components/paymentActions/CaptureForm.js +64 -0
- package/admin/src/pages/App/components/paymentActions/CardDetailsInput.js +189 -0
- package/admin/src/pages/App/components/paymentActions/PaymentMethodSelector.js +52 -0
- package/admin/src/pages/App/components/paymentActions/PaymentResult.js +148 -0
- package/admin/src/pages/App/components/paymentActions/PreauthorizationForm.js +122 -0
- package/admin/src/pages/App/components/paymentActions/RefundForm.js +89 -0
- package/admin/src/pages/App/index.js +41 -465
- package/admin/src/pages/App/styles.css +294 -0
- package/admin/src/pages/constants/paymentConstants.js +37 -0
- package/admin/src/pages/hooks/usePaymentActions.js +456 -0
- package/admin/src/pages/hooks/useSettings.js +111 -0
- package/admin/src/pages/hooks/useTransactionHistory.js +87 -0
- package/admin/src/pages/utils/api.js +10 -0
- package/admin/src/pages/utils/injectGooglePayScript.js +31 -0
- package/admin/src/pages/utils/paymentUtils.js +119 -15
- package/package.json +1 -1
- package/server/controllers/payone.js +71 -64
- package/server/routes/index.js +17 -0
- package/server/services/paymentService.js +271 -0
- package/server/services/payone.js +25 -648
- package/server/services/settingsService.js +59 -0
- package/server/services/testConnectionService.js +190 -0
- package/server/services/transactionService.js +114 -0
- package/server/utils/normalize.js +51 -0
- package/server/utils/paymentMethodParams.js +126 -0
- package/server/utils/requestBuilder.js +121 -0
- package/server/utils/responseParser.js +134 -0
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
/* Payment System UI - Minimalistic & Professional Styles */
|
|
2
|
+
|
|
3
|
+
/* ===== Global Animations ===== */
|
|
4
|
+
@keyframes fadeIn {
|
|
5
|
+
from {
|
|
6
|
+
opacity: 0;
|
|
7
|
+
transform: translateY(8px);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
to {
|
|
11
|
+
opacity: 1;
|
|
12
|
+
transform: translateY(0);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@keyframes slideIn {
|
|
17
|
+
from {
|
|
18
|
+
opacity: 0;
|
|
19
|
+
transform: translateX(-12px);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
to {
|
|
23
|
+
opacity: 1;
|
|
24
|
+
transform: translateX(0);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@keyframes pulse {
|
|
29
|
+
|
|
30
|
+
0%,
|
|
31
|
+
100% {
|
|
32
|
+
opacity: 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
50% {
|
|
36
|
+
opacity: 0.7;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@keyframes shimmer {
|
|
41
|
+
0% {
|
|
42
|
+
background-position: -1000px 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
100% {
|
|
46
|
+
background-position: 1000px 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* ===== Container Styles ===== */
|
|
51
|
+
|
|
52
|
+
/* ===== Card Styles ===== */
|
|
53
|
+
.payment-card {
|
|
54
|
+
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/* ===== Button Styles ===== */
|
|
59
|
+
.payment-button {
|
|
60
|
+
border-radius: 8px;
|
|
61
|
+
font-weight: 500;
|
|
62
|
+
letter-spacing: 0.01em;
|
|
63
|
+
border: none !important;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.payment-button-primary {
|
|
67
|
+
background: linear-gradient(135deg, #4945ff 0%, #7b3af4 100%);
|
|
68
|
+
color: white;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
.payment-button-success {
|
|
73
|
+
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
|
|
74
|
+
color: white;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.payment-button-primary:hover {
|
|
78
|
+
background: linear-gradient(135deg, #4945ff 0%, #7b3af4 100%);
|
|
79
|
+
color: white;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
.payment-button-success:hover {
|
|
84
|
+
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
|
|
85
|
+
color: white;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
/* ===== Input Styles ===== */
|
|
90
|
+
.payment-input {
|
|
91
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
92
|
+
border-radius: 8px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.payment-input:focus-within {
|
|
96
|
+
border-color: #4945ff;
|
|
97
|
+
box-shadow: 0 0 0 3px rgba(73, 69, 255, 0.1);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* ===== Tab Styles ===== */
|
|
101
|
+
.payment-tab {
|
|
102
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
103
|
+
position: relative;
|
|
104
|
+
padding: 12px 20px;
|
|
105
|
+
font-weight: 500;
|
|
106
|
+
color: #6b7280;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.payment-tab:hover {
|
|
110
|
+
color: #4945ff;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.payment-tab-active {
|
|
114
|
+
color: #4945ff;
|
|
115
|
+
font-weight: 600;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.payment-tab-active::after {
|
|
119
|
+
content: '';
|
|
120
|
+
position: absolute;
|
|
121
|
+
bottom: -2px;
|
|
122
|
+
left: 0;
|
|
123
|
+
right: 0;
|
|
124
|
+
height: 2px;
|
|
125
|
+
background: linear-gradient(90deg, #4945ff 0%, #7b3af4 100%);
|
|
126
|
+
animation: slideIn 0.3s ease-out;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* ===== Form Section Styles ===== */
|
|
130
|
+
.payment-form-section {
|
|
131
|
+
animation: fadeIn 0.5s ease-out;
|
|
132
|
+
padding: 24px;
|
|
133
|
+
margin-bottom: 20px;
|
|
134
|
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.payment-form-section:hover {
|
|
138
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.payment-form-title {
|
|
142
|
+
font-size: 14px;
|
|
143
|
+
font-weight: 600;
|
|
144
|
+
margin-bottom: 8px;
|
|
145
|
+
letter-spacing: -0.01em;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.payment-form-description {
|
|
149
|
+
font-size: 13px;
|
|
150
|
+
line-height: 1.5;
|
|
151
|
+
margin-top: 8px;
|
|
152
|
+
margin-bottom: 20px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* ===== Divider Styles ===== */
|
|
156
|
+
.payment-divider {
|
|
157
|
+
border: none;
|
|
158
|
+
height: 1px;
|
|
159
|
+
background: linear-gradient(90deg, transparent 0%, #e8e8ea 20%, #e8e8ea 80%, transparent 100%);
|
|
160
|
+
margin: 32px 0;
|
|
161
|
+
animation: fadeIn 0.4s ease-out;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* ===== Status Badge Styles ===== */
|
|
165
|
+
.payment-status-badge {
|
|
166
|
+
display: inline-flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
padding: 6px 12px;
|
|
169
|
+
border-radius: 6px;
|
|
170
|
+
font-size: 12px;
|
|
171
|
+
font-weight: 500;
|
|
172
|
+
letter-spacing: 0.02em;
|
|
173
|
+
animation: fadeIn 0.3s ease-out;
|
|
174
|
+
transition: all 0.2s ease;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.payment-status-badge:hover {
|
|
178
|
+
transform: scale(1.05);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* ===== Loading States ===== */
|
|
182
|
+
.payment-loading {
|
|
183
|
+
position: relative;
|
|
184
|
+
overflow: hidden;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.payment-loading::after {
|
|
188
|
+
content: '';
|
|
189
|
+
position: absolute;
|
|
190
|
+
top: 0;
|
|
191
|
+
left: -100%;
|
|
192
|
+
width: 100%;
|
|
193
|
+
height: 100%;
|
|
194
|
+
background: linear-gradient(90deg,
|
|
195
|
+
transparent,
|
|
196
|
+
rgba(255, 255, 255, 0.4),
|
|
197
|
+
transparent);
|
|
198
|
+
animation: shimmer 1.5s infinite;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* ===== Alert/Notification Styles ===== */
|
|
202
|
+
.payment-alert {
|
|
203
|
+
animation: slideIn 0.3s ease-out;
|
|
204
|
+
transition: all 0.2s ease;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.payment-alert:hover {
|
|
208
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* ===== Result Card Styles ===== */
|
|
212
|
+
.payment-result-card {
|
|
213
|
+
animation: fadeIn 0.5s ease-out;
|
|
214
|
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.payment-result-card:hover {
|
|
218
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
|
219
|
+
transform: translateY(-2px);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* ===== Transaction Item Styles ===== */
|
|
223
|
+
.payment-transaction-item {
|
|
224
|
+
margin-bottom: 12px;
|
|
225
|
+
animation: fadeIn 0.4s ease-out;
|
|
226
|
+
cursor: pointer;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.payment-transaction-item:hover {
|
|
230
|
+
box-shadow: 0 4px 12px rgba(73, 69, 255, 0.1);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* ===== Typography Styles ===== */
|
|
234
|
+
.payment-title {
|
|
235
|
+
font-size: 24px;
|
|
236
|
+
font-weight: 700;
|
|
237
|
+
letter-spacing: -0.02em;
|
|
238
|
+
margin-bottom: 8px;
|
|
239
|
+
animation: fadeIn 0.4s ease-out;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.payment-subtitle {
|
|
243
|
+
font-size: 15px;
|
|
244
|
+
line-height: 1.6;
|
|
245
|
+
animation: fadeIn 0.5s ease-out;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.payment-section-title {
|
|
249
|
+
font-size: 16px;
|
|
250
|
+
font-weight: 600;
|
|
251
|
+
margin-bottom: 4px;
|
|
252
|
+
letter-spacing: -0.01em;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* ===== Grid & Layout ===== */
|
|
256
|
+
.payment-grid {
|
|
257
|
+
display: grid;
|
|
258
|
+
gap: 20px;
|
|
259
|
+
animation: fadeIn 0.5s ease-out;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.payment-grid-2 {
|
|
263
|
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.payment-grid-3 {
|
|
267
|
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* ===== Smooth Transitions ===== */
|
|
271
|
+
|
|
272
|
+
/* ===== Focus States ===== */
|
|
273
|
+
.payment-focus:focus-visible {
|
|
274
|
+
outline: 2px solid #4945ff;
|
|
275
|
+
outline-offset: 2px;
|
|
276
|
+
border-radius: 6px;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/* ===== Responsive ===== */
|
|
280
|
+
@media (max-width: 768px) {
|
|
281
|
+
.payment-container {
|
|
282
|
+
border-radius: 12px;
|
|
283
|
+
padding: 16px;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.payment-form-section {
|
|
287
|
+
padding: 16px;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.payment-grid-2,
|
|
291
|
+
.payment-grid-3 {
|
|
292
|
+
grid-template-columns: 1fr;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default payment data for testing
|
|
3
|
+
* Used across all payment operations
|
|
4
|
+
*
|
|
5
|
+
* Note: successurl, errorurl, and backurl are only required for:
|
|
6
|
+
* - 3D Secure enabled credit card payments
|
|
7
|
+
* - Redirect-based payment methods (PayPal, Google Pay, Apple Pay, Sofort)
|
|
8
|
+
*
|
|
9
|
+
* For non-redirect payments (3DS disabled credit card, SEPA), these URLs are optional
|
|
10
|
+
*/
|
|
11
|
+
export const DEFAULT_PAYMENT_DATA = {
|
|
12
|
+
firstname: "John",
|
|
13
|
+
lastname: "Doe",
|
|
14
|
+
street: "Test Street 123",
|
|
15
|
+
zip: "12345",
|
|
16
|
+
city: "Test City",
|
|
17
|
+
country: "DE",
|
|
18
|
+
email: "test@example.com",
|
|
19
|
+
salutation: "Herr",
|
|
20
|
+
gender: "m",
|
|
21
|
+
telephonenumber: "01752345678",
|
|
22
|
+
ip: "127.0.0.1",
|
|
23
|
+
customer_is_present: "yes",
|
|
24
|
+
language: "de"
|
|
25
|
+
// Note: successurl, errorurl, backurl are added conditionally based on 3DS setting
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Default currency
|
|
30
|
+
*/
|
|
31
|
+
export const DEFAULT_CURRENCY = "EUR";
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Default page size for pagination
|
|
35
|
+
*/
|
|
36
|
+
export const DEFAULT_PAGE_SIZE = 10;
|
|
37
|
+
|