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
package/README.md
CHANGED
|
@@ -1553,3 +1553,67 @@ For wallet payments (PayPal, Google Pay, Apple Pay), you can specify:
|
|
|
1553
1553
|
|
|
1554
1554
|
- `capturemode: "full"`: Capture the entire preauthorized amount
|
|
1555
1555
|
- `capturemode: "partial"`: Capture less than the preauthorized amount
|
|
1556
|
+
|
|
1557
|
+
## 📢 TransactionStatus Notifications
|
|
1558
|
+
|
|
1559
|
+
The Payone platform provides an asynchronous way of notifying your system of changes to a transaction. These notifications are called "TransactionStatus" and are automatically handled by this plugin.
|
|
1560
|
+
|
|
1561
|
+
### What are TransactionStatus Notifications?
|
|
1562
|
+
|
|
1563
|
+
TransactionStatus notifications are POST requests sent from Payone's servers to your endpoint when transaction status changes occur. This is especially important for:
|
|
1564
|
+
|
|
1565
|
+
- **Redirect Payment Methods**: Verifying that payments were actually completed (prevents fraud)
|
|
1566
|
+
- **Chargeback Processes**: Being notified when customers initiate chargebacks
|
|
1567
|
+
- **Real-time Tracking**: Keeping your system updated with the latest transaction status
|
|
1568
|
+
|
|
1569
|
+
### How It Works
|
|
1570
|
+
|
|
1571
|
+
1. **Payone sends notification** → Your Strapi endpoint receives POST request
|
|
1572
|
+
2. **Plugin verifies request** → Checks IP address, User-Agent, and hash signature
|
|
1573
|
+
3. **Plugin processes notification** → Updates transaction history automatically
|
|
1574
|
+
4. **Plugin responds** → Returns `TSOK` to confirm receipt
|
|
1575
|
+
|
|
1576
|
+
### Endpoint Configuration
|
|
1577
|
+
|
|
1578
|
+
The plugin automatically provides the TransactionStatus endpoint at:
|
|
1579
|
+
|
|
1580
|
+
**URL**: `POST /api/strapi-plugin-payone-provider/transaction-status`
|
|
1581
|
+
|
|
1582
|
+
**No authentication required** - The endpoint is secured by:
|
|
1583
|
+
|
|
1584
|
+
- IP address verification (only Payone IPs allowed)
|
|
1585
|
+
- User-Agent verification (must be "PAYONE FinanceGate")
|
|
1586
|
+
- Hash signature verification (MD5 hash of transaction data)
|
|
1587
|
+
|
|
1588
|
+
### PMI Configuration
|
|
1589
|
+
|
|
1590
|
+
You need to configure this endpoint in your Payone Merchant Interface (PMI):
|
|
1591
|
+
|
|
1592
|
+
1. Log into your Payone Merchant Interface (PMI)
|
|
1593
|
+
2. Navigate to **Configuration** → **Payment Portals** → **[Your Portal]**
|
|
1594
|
+
3. Find the **TransactionStatus Endpoint** setting
|
|
1595
|
+
4. Enter your endpoint URL: `https://yourdomain.com/api/strapi-plugin-payone-provider/transaction-status`
|
|
1596
|
+
5. Save the configuration
|
|
1597
|
+
|
|
1598
|
+
> ⚠️ **Important**: The endpoint must be accessible via HTTPS. Payone will not send notifications to HTTP endpoints.
|
|
1599
|
+
|
|
1600
|
+
### Security Features
|
|
1601
|
+
|
|
1602
|
+
The plugin automatically verifies:
|
|
1603
|
+
|
|
1604
|
+
1. **IP Address**: Only accepts requests from Payone's IP ranges:
|
|
1605
|
+
|
|
1606
|
+
- `185.60.20.0/24`
|
|
1607
|
+
- `54.246.203.105`
|
|
1608
|
+
|
|
1609
|
+
2. **User-Agent**: Must be exactly `"PAYONE FinanceGate"`
|
|
1610
|
+
|
|
1611
|
+
3. **Hash Signature**: Verifies MD5 hash using your Portal Key:
|
|
1612
|
+
|
|
1613
|
+
```
|
|
1614
|
+
MD5(portalid + aid + txid + sequencenumber + price + currency + mode + key)
|
|
1615
|
+
```
|
|
1616
|
+
|
|
1617
|
+
4. **Credentials**: Verifies that `portalid` and `aid` match your configured settings
|
|
1618
|
+
|
|
1619
|
+
> 📖 **Reference**: For more details, see [Payone TransactionStatus Notification Documentation](https://docs.payone.com/integration/response-handling/transactionstatus-notification)
|
|
@@ -8,7 +8,8 @@ const AppHeader = ({ activeTab, isSaving, onSave }) => {
|
|
|
8
8
|
const history = useHistory();
|
|
9
9
|
const location = useLocation();
|
|
10
10
|
const isApplePayConfigPage = location.pathname.includes("/apple-pay-config");
|
|
11
|
-
const isGooglePayConfigPage =
|
|
11
|
+
const isGooglePayConfigPage =
|
|
12
|
+
location.pathname.includes("/google-pay-config");
|
|
12
13
|
|
|
13
14
|
return (
|
|
14
15
|
<HeaderLayout
|
|
@@ -41,7 +42,7 @@ const AppHeader = ({ activeTab, isSaving, onSave }) => {
|
|
|
41
42
|
>
|
|
42
43
|
Back to Main
|
|
43
44
|
</Button>
|
|
44
|
-
) : activeTab ===
|
|
45
|
+
) : activeTab === 1 ? (
|
|
45
46
|
<Button
|
|
46
47
|
loading={isSaving}
|
|
47
48
|
onClick={onSave}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import {
|
|
3
2
|
Tabs,
|
|
4
3
|
Tab,
|
|
@@ -7,9 +6,9 @@ import {
|
|
|
7
6
|
TabPanel,
|
|
8
7
|
} from "@strapi/design-system";
|
|
9
8
|
import pluginId from "../../../pluginId";
|
|
10
|
-
import ConfigurationPanel from "
|
|
11
|
-
import HistoryPanel from "
|
|
12
|
-
import PaymentActionsPanel from "./PaymentActionsPanel";
|
|
9
|
+
import ConfigurationPanel from "../components/configuration/ConfigurationPanel";
|
|
10
|
+
import HistoryPanel from "../components/transaction-history/HistoryPanel";
|
|
11
|
+
import PaymentActionsPanel from "./paymentActions/PaymentActionsPanel";
|
|
13
12
|
import DocsPanel from "./DocsPanel";
|
|
14
13
|
|
|
15
14
|
const AppTabs = ({
|
|
@@ -17,30 +16,11 @@ const AppTabs = ({
|
|
|
17
16
|
setActiveTab,
|
|
18
17
|
// Settings props
|
|
19
18
|
settings,
|
|
20
|
-
isSaving,
|
|
21
19
|
isTesting,
|
|
22
20
|
testResult,
|
|
23
|
-
onSave,
|
|
24
21
|
onTestConnection,
|
|
25
22
|
onInputChange,
|
|
26
23
|
onPaymentMethodToggle,
|
|
27
|
-
// Transaction history props
|
|
28
|
-
filters,
|
|
29
|
-
onFilterChange,
|
|
30
|
-
onFilterApply,
|
|
31
|
-
sorting,
|
|
32
|
-
onSort,
|
|
33
|
-
isLoadingHistory,
|
|
34
|
-
transactionHistory,
|
|
35
|
-
paginatedTransactions,
|
|
36
|
-
currentPage,
|
|
37
|
-
totalPages,
|
|
38
|
-
pageSize,
|
|
39
|
-
onRefresh,
|
|
40
|
-
onPageChange,
|
|
41
|
-
onPageSizeChange,
|
|
42
|
-
selectedTransaction,
|
|
43
|
-
onTransactionSelect,
|
|
44
24
|
// Payment actions props
|
|
45
25
|
paymentActions,
|
|
46
26
|
history,
|
|
@@ -54,6 +34,7 @@ const AppTabs = ({
|
|
|
54
34
|
}
|
|
55
35
|
}
|
|
56
36
|
};
|
|
37
|
+
|
|
57
38
|
return (
|
|
58
39
|
<TabGroup
|
|
59
40
|
label="Payone Provider Tabs"
|
|
@@ -61,114 +42,79 @@ const AppTabs = ({
|
|
|
61
42
|
>
|
|
62
43
|
<Tabs style={{ borderBottom: "2px solid #e8e8ea" }}>
|
|
63
44
|
<Tab
|
|
45
|
+
id="transaction-history"
|
|
64
46
|
className={`payment-tab ${
|
|
65
47
|
activeTab === 0 ? "payment-tab-active" : ""
|
|
66
48
|
}`}
|
|
49
|
+
variant="default"
|
|
50
|
+
index={0}
|
|
51
|
+
selectedTabIndex={activeTab}
|
|
52
|
+
onTabClick={(index) => setActiveTab(index)}
|
|
67
53
|
>
|
|
68
|
-
|
|
54
|
+
Transaction History
|
|
69
55
|
</Tab>
|
|
70
56
|
<Tab
|
|
57
|
+
variant="default"
|
|
58
|
+
index={1}
|
|
59
|
+
selectedTabIndex={activeTab}
|
|
60
|
+
onTabClick={(index) => setActiveTab(index)}
|
|
61
|
+
id="configuration"
|
|
71
62
|
className={`payment-tab ${
|
|
72
63
|
activeTab === 1 ? "payment-tab-active" : ""
|
|
73
64
|
}`}
|
|
74
65
|
>
|
|
75
|
-
|
|
66
|
+
Configuration
|
|
76
67
|
</Tab>
|
|
77
68
|
<Tab
|
|
69
|
+
id="payment-actions"
|
|
78
70
|
className={`payment-tab ${
|
|
79
71
|
activeTab === 2 ? "payment-tab-active" : ""
|
|
80
72
|
}`}
|
|
73
|
+
variant="default"
|
|
74
|
+
index={2}
|
|
75
|
+
selectedTabIndex={activeTab}
|
|
76
|
+
onTabClick={(index) => setActiveTab(index)}
|
|
81
77
|
>
|
|
82
78
|
Payment Actions
|
|
83
79
|
</Tab>
|
|
84
80
|
<Tab
|
|
81
|
+
id="documentation"
|
|
85
82
|
className={`payment-tab ${
|
|
86
83
|
activeTab === 3 ? "payment-tab-active" : ""
|
|
87
84
|
}`}
|
|
85
|
+
variant="default"
|
|
86
|
+
index={3}
|
|
87
|
+
selectedTabIndex={activeTab}
|
|
88
|
+
onTabClick={(index) => setActiveTab(index)}
|
|
88
89
|
>
|
|
89
90
|
Documentation
|
|
90
91
|
</Tab>
|
|
91
92
|
</Tabs>
|
|
92
93
|
<TabPanels>
|
|
93
|
-
<TabPanel>
|
|
94
|
+
<TabPanel id="transaction-history">
|
|
95
|
+
<HistoryPanel />
|
|
96
|
+
</TabPanel>
|
|
97
|
+
|
|
98
|
+
<TabPanel id="configuration">
|
|
94
99
|
<ConfigurationPanel
|
|
95
100
|
settings={settings}
|
|
96
|
-
isSaving={isSaving}
|
|
97
101
|
isTesting={isTesting}
|
|
98
102
|
testResult={testResult}
|
|
99
|
-
onSave={onSave}
|
|
100
103
|
onTestConnection={onTestConnection}
|
|
101
104
|
onInputChange={onInputChange}
|
|
102
105
|
onPaymentMethodToggle={onPaymentMethodToggle}
|
|
103
106
|
/>
|
|
104
107
|
</TabPanel>
|
|
105
108
|
|
|
106
|
-
<TabPanel>
|
|
107
|
-
<HistoryPanel
|
|
108
|
-
filters={filters}
|
|
109
|
-
onFilterChange={onFilterChange}
|
|
110
|
-
onFilterApply={onFilterApply}
|
|
111
|
-
sorting={sorting}
|
|
112
|
-
onSort={onSort}
|
|
113
|
-
isLoadingHistory={isLoadingHistory}
|
|
114
|
-
transactionHistory={transactionHistory}
|
|
115
|
-
paginatedTransactions={paginatedTransactions}
|
|
116
|
-
currentPage={currentPage}
|
|
117
|
-
totalPages={totalPages}
|
|
118
|
-
pageSize={pageSize}
|
|
119
|
-
onRefresh={onRefresh}
|
|
120
|
-
onPageChange={onPageChange}
|
|
121
|
-
onPageSizeChange={onPageSizeChange}
|
|
122
|
-
selectedTransaction={selectedTransaction}
|
|
123
|
-
onTransactionSelect={onTransactionSelect}
|
|
124
|
-
/>
|
|
125
|
-
</TabPanel>
|
|
126
|
-
|
|
127
|
-
<TabPanel>
|
|
109
|
+
<TabPanel id="payment-actions">
|
|
128
110
|
<PaymentActionsPanel
|
|
129
|
-
paymentAmount={paymentActions.paymentAmount}
|
|
130
|
-
setPaymentAmount={paymentActions.setPaymentAmount}
|
|
131
|
-
preauthReference={paymentActions.preauthReference}
|
|
132
|
-
setPreauthReference={paymentActions.setPreauthReference}
|
|
133
|
-
authReference={paymentActions.authReference}
|
|
134
|
-
setAuthReference={paymentActions.setAuthReference}
|
|
135
|
-
captureTxid={paymentActions.captureTxid}
|
|
136
|
-
setCaptureTxid={paymentActions.setCaptureTxid}
|
|
137
|
-
refundTxid={paymentActions.refundTxid}
|
|
138
|
-
setRefundTxid={paymentActions.setRefundTxid}
|
|
139
|
-
refundSequenceNumber={paymentActions.refundSequenceNumber}
|
|
140
|
-
setRefundSequenceNumber={paymentActions.setRefundSequenceNumber}
|
|
141
|
-
refundReference={paymentActions.refundReference}
|
|
142
|
-
setRefundReference={paymentActions.setRefundReference}
|
|
143
|
-
paymentMethod={paymentActions.paymentMethod}
|
|
144
|
-
setPaymentMethod={paymentActions.setPaymentMethod}
|
|
145
|
-
captureMode={paymentActions.captureMode}
|
|
146
|
-
setCaptureMode={paymentActions.setCaptureMode}
|
|
147
|
-
isProcessingPayment={paymentActions.isProcessingPayment}
|
|
148
|
-
paymentError={paymentActions.paymentError}
|
|
149
|
-
paymentResult={paymentActions.paymentResult}
|
|
150
|
-
onPreauthorization={paymentActions.handlePreauthorization}
|
|
151
|
-
onAuthorization={paymentActions.handleAuthorization}
|
|
152
|
-
onCapture={paymentActions.handleCapture}
|
|
153
|
-
onRefund={paymentActions.handleRefund}
|
|
154
111
|
settings={settings}
|
|
155
|
-
googlePayToken={paymentActions.googlePayToken}
|
|
156
|
-
setGooglePayToken={paymentActions.setGooglePayToken}
|
|
157
|
-
applePayToken={paymentActions.applePayToken}
|
|
158
|
-
setApplePayToken={paymentActions.setApplePayToken}
|
|
159
|
-
cardtype={paymentActions.cardtype}
|
|
160
|
-
setCardtype={paymentActions.setCardtype}
|
|
161
|
-
cardpan={paymentActions.cardpan}
|
|
162
|
-
setCardpan={paymentActions.setCardpan}
|
|
163
|
-
cardexpiredate={paymentActions.cardexpiredate}
|
|
164
|
-
setCardexpiredate={paymentActions.setCardexpiredate}
|
|
165
|
-
cardcvc2={paymentActions.cardcvc2}
|
|
166
|
-
setCardcvc2={paymentActions.setCardcvc2}
|
|
167
112
|
onNavigateToConfig={handleNavigateToConfig}
|
|
113
|
+
paymentActions={paymentActions}
|
|
168
114
|
/>
|
|
169
115
|
</TabPanel>
|
|
170
116
|
|
|
171
|
-
<TabPanel>
|
|
117
|
+
<TabPanel id="documentation">
|
|
172
118
|
<DocsPanel />
|
|
173
119
|
</TabPanel>
|
|
174
120
|
</TabPanels>
|