Skip to content

Commit 2f23b6d

Browse files
Release 2.1.22
1 parent 626e562 commit 2f23b6d

14 files changed

+29
-27
lines changed

Model/Webhook/Listener/AbstractOrderRelatedListener.php

+15-13
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,23 @@ public function __construct(
101101
public function execute(Request $request)
102102
{
103103
$entity = $this->loadEntity($request);
104-
$connection = $this->beginTransaction();
104+
$order = $this->loadOrder($this->getOrderId($entity));
105+
106+
if (!($order instanceof Order)) {
107+
return;
108+
}
109+
$transactionId = $order->getPostfinancecheckoutTransactionId();
105110
try {
106-
$order = $this->loadOrder($this->getOrderId($entity));
107-
$transactionId = $order->getPostfinancecheckoutTransactionId();
108-
if ($order instanceof Order) {
109-
if ($order->getPostfinancecheckoutTransactionId() != $this->getTransactionId($entity)) {
110-
$this->logger->warning(
111-
'PostFinance Checkout webhook: The transaction ID on the order ' . $order->getId() .
112-
' does not match the webhook\'s: ' . $this->getTransactionId($entity));
113-
$connection->commit();
114-
return;
115-
}
116-
$this->lock($transactionId);
117-
$this->process($this->loadEntity($request), $this->loadOrder($order->getId()));
111+
$connection = $this->beginTransaction();
112+
if ($transactionId != $this->getTransactionId($entity)) {
113+
$this->logger->warning(
114+
'PostFinance Checkout webhook: The transaction ID on the order ' . $order->getId() .
115+
' does not match the webhook\'s: ' . $this->getTransactionId($entity));
116+
$connection->commit();
117+
return;
118118
}
119+
$this->lock($transactionId);
120+
$this->process($this->loadEntity($request), $this->loadOrder($order->getId()));
119121
$this->unlock($transactionId);
120122
$connection->commit();
121123
} catch (\Exception $e) {

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This repository contains the Magento 2 extension that enables to process payment
1212

1313
## Documentation
1414

15-
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html)
15+
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html)
1616

1717

1818
## Support
@@ -39,4 +39,4 @@ We do provide special integrations for the following one step checkouts:
3939

4040
## License
4141

42-
Please see the [license file](https://github.com/pfpayments/magento-2/blob/2.1.21/LICENSE) for more information.
42+
Please see the [license file](https://github.com/pfpayments/magento-2/blob/2.1.22/LICENSE) for more information.

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"type" : "magento2-module",
19-
"version" : "2.1.21",
19+
"version" : "2.1.22",
2020
"require" : {
2121
"php" : "~7.1.3||~7.2.0||~7.3.0||~7.4.0||~8.0||~8.1||~8.2",
2222
"magento/framework" : "^102.0.0||^103.0.0",

docs/en/documentation.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h2>Documentation</h2> </div>
2323
</a>
2424
</li>
2525
<li>
26-
<a href="https://github.com/pfpayments/magento-2/releases/tag/2.1.21/">
26+
<a href="https://github.com/pfpayments/magento-2/releases/tag/2.1.22/">
2727
Source
2828
</a>
2929
</li>

etc/adminhtml/system.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<resource>PostFinanceCheckout_Payment::config</resource>
2020
<group id="information" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
2121
<label>Information</label>
22-
<comment><![CDATA[If you need help setting up the PostFinance Checkout extension, check out the <a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html" target="_blank">documentation</a>.]]></comment>
22+
<comment><![CDATA[If you need help setting up the PostFinance Checkout extension, check out the <a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html" target="_blank">documentation</a>.]]></comment>
2323
<field id="version" translate="label" type="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
2424
<label>Module Version</label>
2525
</field>

etc/config.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<default>
1616
<postfinancecheckout_payment>
1717
<information>
18-
<version>2.1.21</version>
18+
<version>2.1.22</version>
1919
<sdk_version>4.6.0</sdk_version>
2020
</information>
2121
<general>

etc/module.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313
-->
1414
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
15-
<module name="PostFinanceCheckout_Payment" setup_version="2.1.21">
15+
<module name="PostFinanceCheckout_Payment" setup_version="2.1.22">
1616
<sequence>
1717
<module name="Magento_Sales"/>
1818
<module name="Magento_Payment"/>

i18n/de_CH.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"Hold Delivery","Lieferung halten"
5252
"ID required","ID erforderlich"
5353
"When a refund request is in a pending state, update its status to successful", "Wenn die Rückerstattung aussteht, markieren Sie sie als erfolgreich"
54-
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Falls Sie Hilfe benötigen beim Einrichten der PostFinance Checkout-Erweiterung, sehen Sie sich die <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html"" target=""_blank"">Dokumentation</a> an."
54+
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Falls Sie Hilfe benötigen beim Einrichten der PostFinance Checkout-Erweiterung, sehen Sie sich die <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html"" target=""_blank"">Dokumentation</a> an."
5555
"Inactive","Inaktiv"
5656
"Information","Informationen"
5757
"Invoice","Rechnung"

i18n/de_DE.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"Hold Delivery","Lieferung halten"
5252
"ID required","ID erforderlich"
5353
"When a refund request is in a pending state, update its status to successful", "Wenn die Rückerstattung aussteht, markieren Sie sie als erfolgreich"
54-
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Falls Sie Hilfe benötigen beim Einrichten der PostFinance Checkout-Erweiterung, sehen Sie sich die <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html"" target=""_blank"">Dokumentation</a> an."
54+
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Falls Sie Hilfe benötigen beim Einrichten der PostFinance Checkout-Erweiterung, sehen Sie sich die <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html"" target=""_blank"">Dokumentation</a> an."
5555
"Inactive","Inaktiv"
5656
"Information","Informationen"
5757
"Invoice","Rechnung"

i18n/en_US.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"Hold Delivery","Hold Delivery"
5252
"ID required","ID required"
5353
"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"
54-
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html"" target=""_blank"">documentation</a>.","If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html"" target=""_blank"">documentation</a>."
54+
"If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html"" target=""_blank"">documentation</a>.","If you need help setting up the PostFinance Checkout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html"" target=""_blank"">documentation</a>."
5555
"Inactive","Inactive"
5656
"Information","Information"
5757
"Invoice","Invoice"

i18n/fr_CH.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"Gift Wrap","Papier cadeau"
5151
"Hold Delivery","Suspendre la livraison"
5252
"ID required","Pièce d'identité requise"
53-
"If you need help setting up the postfinancecheckout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Si vous avez besoin d'aide pour configurer l'extension postfinancecheckout, consultez la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html"" target=""_blank"">documentation</a> an."
53+
"If you need help setting up the postfinancecheckout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Si vous avez besoin d'aide pour configurer l'extension postfinancecheckout, consultez la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html"" target=""_blank"">documentation</a> an."
5454
"Inactive","Inactif"
5555
"Information","Information"
5656
"Invoice","Facture"

i18n/fr_FR.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"Hold Delivery","Suspendre la livraison"
5252
"ID required","Pièce d'identité requise"
5353
"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"
54-
"If you need help setting up the postfinancecheckout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Si vous avez besoin d'aide pour configurer l'extension postfinancecheckout, consultez la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html"" target=""_blank"">documentation</a> an."
54+
"If you need help setting up the postfinancecheckout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Si vous avez besoin d'aide pour configurer l'extension postfinancecheckout, consultez la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html"" target=""_blank"">documentation</a> an."
5555
"Inactive","Inactif"
5656
"Information","Information"
5757
"Invoice","Facture"

i18n/it_CH.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"Hold Delivery","Sospendi la consegna"
5252
"ID required","ID richiesto"
5353
"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."
54-
"If you need help setting up the postfinancecheckout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Se hai bisogno di aiuto per configurare l'estensione postfinancecheckout, consulta la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html"" target=""_blank"">documentazione</a> an."
54+
"If you need help setting up the postfinancecheckout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Se hai bisogno di aiuto per configurare l'estensione postfinancecheckout, consulta la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html"" target=""_blank"">documentazione</a> an."
5555
"Inactive","Inattivo"
5656
"Information","Informazione"
5757
"Invoice","Fattura"

i18n/it_IT.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"Hold Delivery","Sospendi la consegna"
5252
"ID required","ID richiesto"
5353
"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."
54-
"If you need help setting up the postfinancecheckout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Se hai bisogno di aiuto per configurare l'estensione postfinancecheckout, consulta la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.21/docs/en/documentation.html"" target=""_blank"">documentazione</a> an."
54+
"If you need help setting up the postfinancecheckout extension, check out the <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Se hai bisogno di aiuto per configurare l'estensione postfinancecheckout, consulta la <a href=""https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.22/docs/en/documentation.html"" target=""_blank"">documentazione</a> an."
5555
"Inactive","Inattivo"
5656
"Information","Informazione"
5757
"Invoice","Fattura"

0 commit comments

Comments
 (0)