strapi-plugin-payone-provider 5.6.10 → 5.6.11

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 CHANGED
@@ -1631,70 +1631,4 @@ The plugin automatically verifies:
1631
1631
 
1632
1632
  4. **Credentials**: Verifies that `portalid` and `aid` match your configured settings
1633
1633
 
1634
- ### Notification Parameters
1635
-
1636
- Payone sends the following parameters (among others):
1637
-
1638
- - `txaction`: Transaction action (appointed, paid, cancelation, etc.)
1639
- - `txid`: Transaction ID
1640
- - `reference`: Your reference number
1641
- - `sequencenumber`: Sequence number for this transaction
1642
- - `transaction_status`: Current transaction status
1643
- - `price`: Transaction amount
1644
- - `balance`: Current balance
1645
- - `receivable`: Receivable amount
1646
- - `currency`: Currency code
1647
- - `key`: MD5 hash for verification
1648
-
1649
- ### Response Requirements
1650
-
1651
- The endpoint **must** respond with exactly `TSOK` (4 characters, no HTML):
1652
-
1653
- - Response time: Must be within 10 seconds
1654
- - Response format: Plain text `TSOK`
1655
- - No other characters allowed
1656
-
1657
- > ℹ️ **Note**: Even if processing fails, the endpoint must return `TSOK` to prevent Payone from retrying. The plugin handles this automatically.
1658
-
1659
- ### Retry Mechanism
1660
-
1661
- If Payone doesn't receive `TSOK` within 10 seconds:
1662
-
1663
- - Payone will retry up to **12 times**
1664
- - Retries occur over **48 hours**
1665
- - First retry after ~1 hour
1666
- - Retry intervals increase over time
1667
-
1668
- ### Transaction Updates
1669
-
1670
- When a TransactionStatus notification is received:
1671
-
1672
- 1. The plugin finds the transaction in history by `txid`
1673
- 2. Updates the transaction with new status information
1674
- 3. Stores the full notification data for reference
1675
- 4. Updates `balance`, `receivable`, and `sequencenumber` fields
1676
-
1677
- If the transaction is not found in history, a new entry is created.
1678
-
1679
- ### Example Notification Flow
1680
-
1681
- **Scenario**: Customer completes PayPal payment
1682
-
1683
- 1. Customer redirected to PayPal → Completes payment
1684
- 2. Payone sends TransactionStatus: `txaction=appointed`, `transaction_status=completed`
1685
- 3. Plugin receives notification → Verifies and updates transaction
1686
- 4. Plugin responds: `TSOK`
1687
- 5. Customer redirected back to your `successurl`
1688
- 6. Later, Payone sends: `txaction=paid` (payment confirmed)
1689
- 7. Plugin updates transaction status to "paid"
1690
-
1691
- ### Testing
1692
-
1693
- To test TransactionStatus notifications:
1694
-
1695
- 1. Configure the endpoint in PMI
1696
- 2. Make a test payment
1697
- 3. Check your Strapi logs for notification processing
1698
- 4. Verify transaction history is updated correctly
1699
-
1700
1634
  > 📖 **Reference**: For more details, see [Payone TransactionStatus Notification Documentation](https://docs.payone.com/integration/response-handling/transactionstatus-notification)
@@ -137,7 +137,6 @@ const useSettings = () => {
137
137
  setTestResult(null);
138
138
  try {
139
139
  const response = await testConnection();
140
- console.log("response in handleTestConnection:", response.data);
141
140
  if (response.data && response.data.success) {
142
141
  setTestResult(response.data);
143
142
  toggleNotification({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strapi-plugin-payone-provider",
3
- "version": "5.6.10",
3
+ "version": "5.6.11",
4
4
  "description": "Strapi plugin for Payone payment gateway integration",
5
5
  "license": "MIT",
6
6
  "maintainers": [
@@ -22,12 +22,11 @@ module.exports = async ({ strapi }) => {
22
22
  displayName: "",
23
23
  domainName: "",
24
24
  merchantIdentifier: "",
25
- enableCreditCard: true,
26
- enablePayPal: true,
27
- enableGooglePay: true,
28
- enableApplePay: true,
29
- enableSofort: true,
30
- enableSepaDirectDebit: true
25
+ enableCreditCard: false,
26
+ enablePayPal: false,
27
+ enableGooglePay: false,
28
+ enableApplePay: false,
29
+ enableSepaDirectDebit: false
31
30
  }
32
31
  });
33
32
  }
@@ -2,38 +2,7 @@
2
2
 
3
3
  const crypto = require("crypto");
4
4
  const { normalizeCustomerId } = require("./normalize");
5
- const calculateKeyHash = (settings, params) => {
6
- const portalKey = settings.portalKey || settings.key;
7
- const portalid = String(settings.portalid || "");
8
- const aid = String(settings.aid || "");
9
- const mode = String(settings.mode || "test");
10
-
11
- const requestType = params.request || "";
12
-
13
- // For Capture and Refund operations
14
- if (requestType === "capture" || requestType === "refund") {
15
- const txid = String(params.txid || "");
16
- const sequencenumber = String(params.sequencenumber || "");
17
- const amount = String(params.amount || "");
18
- const currency = String(params.currency || "EUR");
19
-
20
- const hashString = `${portalid}${aid}${txid}${sequencenumber}${amount}${currency}${mode}${portalKey}`;
21
- return crypto.createHash("md5").update(hashString).digest("hex");
22
- }
23
-
24
- // For Preauthorization and Authorization operations
25
- if (requestType === "preauthorization" || requestType === "authorization") {
26
- const amount = String(params.amount || "");
27
- const currency = String(params.currency || "EUR");
28
- const reference = String(params.reference || "");
29
5
 
30
- const hashString = `${portalid}${aid}${amount}${currency}${reference}${mode}${portalKey}`;
31
- return crypto.createHash("md5").update(hashString).digest("hex");
32
- }
33
-
34
- const hashString = `${portalid}${aid}${mode}${portalKey}`;
35
- return crypto.createHash("md5").update(hashString).digest("hex");
36
- };
37
6
 
38
7
  const buildClientRequestParams = (settings, params, logger = null) => {
39
8
  const requestParams = {
@@ -51,7 +20,10 @@ const buildClientRequestParams = (settings, params, logger = null) => {
51
20
  logger
52
21
  );
53
22
 
54
- requestParams.key = calculateKeyHash(settings, requestParams);
23
+ requestParams.key = crypto
24
+ .createHash("md5")
25
+ .update(settings.portalKey || settings.key)
26
+ .digest("hex");
55
27
 
56
28
  const isCreditCard = requestParams.clearingtype === "cc";
57
29
  const enable3DSecure = settings.enable3DSecure !== false;