strapi-plugin-payone-provider 5.6.15 → 5.6.17
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/package.json
CHANGED
|
@@ -379,14 +379,11 @@ module.exports = ({ strapi }) => ({
|
|
|
379
379
|
|
|
380
380
|
async handleTransactionStatus(ctx) {
|
|
381
381
|
try {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
ip: ctx.request.ip,
|
|
388
|
-
});
|
|
389
|
-
}
|
|
382
|
+
const notificationData = ctx.request.body || {};
|
|
383
|
+
await getPayoneService(strapi).processTransactionStatus(notificationData);
|
|
384
|
+
console.warn("[Payone] Notification Status", {
|
|
385
|
+
ip: ctx.request.ip,
|
|
386
|
+
});
|
|
390
387
|
} catch (error) {
|
|
391
388
|
strapi.log.error("[Payone TransactionStatus] Error:", error);
|
|
392
389
|
}
|
|
@@ -395,5 +392,4 @@ module.exports = ({ strapi }) => ({
|
|
|
395
392
|
ctx.body = "TSOK";
|
|
396
393
|
ctx.type = "text/plain";
|
|
397
394
|
}
|
|
398
|
-
|
|
399
395
|
});
|
package/server/routes/index.js
CHANGED
|
@@ -184,7 +184,7 @@ module.exports = {
|
|
|
184
184
|
path: "/transaction-status",
|
|
185
185
|
handler: "payone.handleTransactionStatus",
|
|
186
186
|
config: {
|
|
187
|
-
policies: ["plugin::strapi-plugin-payone-provider.is-payone-notification"],
|
|
187
|
+
// policies: ["plugin::strapi-plugin-payone-provider.is-payone-notification"],
|
|
188
188
|
auth: false
|
|
189
189
|
}
|
|
190
190
|
},
|
|
@@ -52,7 +52,7 @@ const processTransactionStatus = async (strapi, notificationData) => {
|
|
|
52
52
|
try {
|
|
53
53
|
const settings = await getSettings(strapi);
|
|
54
54
|
if (!validateData(notificationData, settings)) {
|
|
55
|
-
|
|
55
|
+
console.log("[Payone TransactionStatus] Validation failed for incoming notification. Notification ignored.");
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
const txid = notificationData.txid;
|
|
@@ -60,7 +60,6 @@ const processTransactionStatus = async (strapi, notificationData) => {
|
|
|
60
60
|
|
|
61
61
|
if (!existing) {
|
|
62
62
|
console.log(`[Payone TransactionStatus] Transaction ${txid} not found. Notification ignored.`);
|
|
63
|
-
return;
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
const safeNotification = sanitizeSensitive({ ...notificationData });
|