From 2f23b6db087b53c8e23ae164677fab61172da0c1 Mon Sep 17 00:00:00 2001 From: Drew Rowan Date: Thu, 16 Jan 2025 14:41:19 +0100 Subject: [PATCH] Release 2.1.22 --- .../Listener/AbstractOrderRelatedListener.php | 28 ++++++++++--------- README.md | 4 +-- composer.json | 2 +- docs/en/documentation.html | 2 +- etc/adminhtml/system.xml | 2 +- etc/config.xml | 2 +- etc/module.xml | 2 +- i18n/de_CH.csv | 2 +- i18n/de_DE.csv | 2 +- i18n/en_US.csv | 2 +- i18n/fr_CH.csv | 2 +- i18n/fr_FR.csv | 2 +- i18n/it_CH.csv | 2 +- i18n/it_IT.csv | 2 +- 14 files changed, 29 insertions(+), 27 deletions(-) diff --git a/Model/Webhook/Listener/AbstractOrderRelatedListener.php b/Model/Webhook/Listener/AbstractOrderRelatedListener.php index 2f999ea..b627e93 100644 --- a/Model/Webhook/Listener/AbstractOrderRelatedListener.php +++ b/Model/Webhook/Listener/AbstractOrderRelatedListener.php @@ -101,21 +101,23 @@ public function __construct( public function execute(Request $request) { $entity = $this->loadEntity($request); - $connection = $this->beginTransaction(); + $order = $this->loadOrder($this->getOrderId($entity)); + + if (!($order instanceof Order)) { + return; + } + $transactionId = $order->getPostfinancecheckoutTransactionId(); try { - $order = $this->loadOrder($this->getOrderId($entity)); - $transactionId = $order->getPostfinancecheckoutTransactionId(); - if ($order instanceof Order) { - if ($order->getPostfinancecheckoutTransactionId() != $this->getTransactionId($entity)) { - $this->logger->warning( - 'PostFinance Checkout webhook: The transaction ID on the order ' . $order->getId() . - ' does not match the webhook\'s: ' . $this->getTransactionId($entity)); - $connection->commit(); - return; - } - $this->lock($transactionId); - $this->process($this->loadEntity($request), $this->loadOrder($order->getId())); + $connection = $this->beginTransaction(); + if ($transactionId != $this->getTransactionId($entity)) { + $this->logger->warning( + 'PostFinance Checkout webhook: The transaction ID on the order ' . $order->getId() . + ' does not match the webhook\'s: ' . $this->getTransactionId($entity)); + $connection->commit(); + return; } + $this->lock($transactionId); + $this->process($this->loadEntity($request), $this->loadOrder($order->getId())); $this->unlock($transactionId); $connection->commit(); } catch (\Exception $e) { diff --git a/README.md b/README.md index f9962cb..4d64f5f 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This repository contains the Magento 2 extension that enables to process payment ## Documentation -* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html) +* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html) ## Support @@ -39,4 +39,4 @@ We do provide special integrations for the following one step checkouts: ## License -Please see the [license file](https://github.com/pfpayments/magento-2/blob/2.1.21/LICENSE) for more information. +Please see the [license file](https://github.com/pfpayments/magento-2/blob/2.1.22/LICENSE) for more information. diff --git a/composer.json b/composer.json index b6dd6ea..a08668f 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "type" : "magento2-module", - "version" : "2.1.21", + "version" : "2.1.22", "require" : { "php" : "~7.1.3||~7.2.0||~7.3.0||~7.4.0||~8.0||~8.1||~8.2", "magento/framework" : "^102.0.0||^103.0.0", diff --git a/docs/en/documentation.html b/docs/en/documentation.html index c51f125..4dbae47 100644 --- a/docs/en/documentation.html +++ b/docs/en/documentation.html @@ -23,7 +23,7 @@

Documentation

  • - + Source
  • diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index f666400..acbcc68 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -19,7 +19,7 @@ PostFinanceCheckout_Payment::config - documentation.]]> + documentation.]]> diff --git a/etc/config.xml b/etc/config.xml index 72d59bc..e7a9deb 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -15,7 +15,7 @@ - 2.1.21 + 2.1.22 4.6.0 diff --git a/etc/module.xml b/etc/module.xml index bddf7ce..034a21b 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -12,7 +12,7 @@ */ --> - + diff --git a/i18n/de_CH.csv b/i18n/de_CH.csv index 4460fe6..77620d7 100644 --- a/i18n/de_CH.csv +++ b/i18n/de_CH.csv @@ -51,7 +51,7 @@ "Hold Delivery","Lieferung halten" "ID required","ID erforderlich" "When a refund request is in a pending state, update its status to successful", "Wenn die Rückerstattung aussteht, markieren Sie sie als erfolgreich" -"If you need help setting up the PostFinance Checkout extension, check out the documentation.","Falls Sie Hilfe benötigen beim Einrichten der PostFinance Checkout-Erweiterung, sehen Sie sich die Dokumentation an." +"If you need help setting up the PostFinance Checkout extension, check out the documentation.","Falls Sie Hilfe benötigen beim Einrichten der PostFinance Checkout-Erweiterung, sehen Sie sich die Dokumentation an." "Inactive","Inaktiv" "Information","Informationen" "Invoice","Rechnung" diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv index 4460fe6..77620d7 100644 --- a/i18n/de_DE.csv +++ b/i18n/de_DE.csv @@ -51,7 +51,7 @@ "Hold Delivery","Lieferung halten" "ID required","ID erforderlich" "When a refund request is in a pending state, update its status to successful", "Wenn die Rückerstattung aussteht, markieren Sie sie als erfolgreich" -"If you need help setting up the PostFinance Checkout extension, check out the documentation.","Falls Sie Hilfe benötigen beim Einrichten der PostFinance Checkout-Erweiterung, sehen Sie sich die Dokumentation an." +"If you need help setting up the PostFinance Checkout extension, check out the documentation.","Falls Sie Hilfe benötigen beim Einrichten der PostFinance Checkout-Erweiterung, sehen Sie sich die Dokumentation an." "Inactive","Inaktiv" "Information","Informationen" "Invoice","Rechnung" diff --git a/i18n/en_US.csv b/i18n/en_US.csv index 44cd795..ed03e40 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -51,7 +51,7 @@ "Hold Delivery","Hold Delivery" "ID required","ID required" "When a refund request is in a pending state, update its status to successful", "When a refund request is in a pending state, update its status to successful" -"If you need help setting up the PostFinance Checkout extension, check out the documentation.","If you need help setting up the PostFinance Checkout extension, check out the documentation." +"If you need help setting up the PostFinance Checkout extension, check out the documentation.","If you need help setting up the PostFinance Checkout extension, check out the documentation." "Inactive","Inactive" "Information","Information" "Invoice","Invoice" diff --git a/i18n/fr_CH.csv b/i18n/fr_CH.csv index 84348ee..afe0ceb 100644 --- a/i18n/fr_CH.csv +++ b/i18n/fr_CH.csv @@ -50,7 +50,7 @@ "Gift Wrap","Papier cadeau" "Hold Delivery","Suspendre la livraison" "ID required","Pièce d'identité requise" -"If you need help setting up the postfinancecheckout extension, check out the documentation.","Si vous avez besoin d'aide pour configurer l'extension postfinancecheckout, consultez la documentation an." +"If you need help setting up the postfinancecheckout extension, check out the documentation.","Si vous avez besoin d'aide pour configurer l'extension postfinancecheckout, consultez la documentation an." "Inactive","Inactif" "Information","Information" "Invoice","Facture" diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index 39c063b..b6212a4 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -51,7 +51,7 @@ "Hold Delivery","Suspendre la livraison" "ID required","Pièce d'identité requise" "When a refund request is in a pending state, update its status to successful", "Lorsqu'une demande de remboursement est en état d'attente, mettre à jour son statut pour le marquer comme réussi" -"If you need help setting up the postfinancecheckout extension, check out the documentation.","Si vous avez besoin d'aide pour configurer l'extension postfinancecheckout, consultez la documentation an." +"If you need help setting up the postfinancecheckout extension, check out the documentation.","Si vous avez besoin d'aide pour configurer l'extension postfinancecheckout, consultez la documentation an." "Inactive","Inactif" "Information","Information" "Invoice","Facture" diff --git a/i18n/it_CH.csv b/i18n/it_CH.csv index c5e0c4e..3dac764 100644 --- a/i18n/it_CH.csv +++ b/i18n/it_CH.csv @@ -51,7 +51,7 @@ "Hold Delivery","Sospendi la consegna" "ID required","ID richiesto" "When a refund request is in a pending state, update its status to successful", "Quando una richiesta di rimborso è in stato di attesa, contrassegnalo come eseguito con successo." -"If you need help setting up the postfinancecheckout extension, check out the documentation.","Se hai bisogno di aiuto per configurare l'estensione postfinancecheckout, consulta la documentazione an." +"If you need help setting up the postfinancecheckout extension, check out the documentation.","Se hai bisogno di aiuto per configurare l'estensione postfinancecheckout, consulta la documentazione an." "Inactive","Inattivo" "Information","Informazione" "Invoice","Fattura" diff --git a/i18n/it_IT.csv b/i18n/it_IT.csv index c5e0c4e..3dac764 100644 --- a/i18n/it_IT.csv +++ b/i18n/it_IT.csv @@ -51,7 +51,7 @@ "Hold Delivery","Sospendi la consegna" "ID required","ID richiesto" "When a refund request is in a pending state, update its status to successful", "Quando una richiesta di rimborso è in stato di attesa, contrassegnalo come eseguito con successo." -"If you need help setting up the postfinancecheckout extension, check out the documentation.","Se hai bisogno di aiuto per configurare l'estensione postfinancecheckout, consulta la documentazione an." +"If you need help setting up the postfinancecheckout extension, check out the documentation.","Se hai bisogno di aiuto per configurare l'estensione postfinancecheckout, consulta la documentazione an." "Inactive","Inattivo" "Information","Informazione" "Invoice","Fattura"