Skip to content

Commit a31be4a

Browse files
committed
Release 2.1.9
1 parent bf0ad04 commit a31be4a

14 files changed

+25
-16
lines changed

Model/Resolver/PlaceOrder.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
9393
$orderId = $this->placeOrder->execute($cart, $maskedCartId, $userId);
9494
$order = $this->orderRepository->get($orderId);
9595

96+
//This is necessary because before this point, the table db.mage_wallee_payment_transaction_info has
97+
//the url of success and fail assigned to a record that does not yet have the order id set.
98+
//This allows the transaction to have the necessary data to make the redirect.
99+
//And it solves the side effect of not having the order id at the first point where the transaction info is saved.
96100
$transaction = $this->getTransaction($order);
97101
$this->setTransactionUrls($transaction, $orderId, $successUrl, $failureUrl);
98102
$transactionOutput = $this->getTransactionSettings($transaction, $order, $integrationType);
@@ -142,7 +146,7 @@ private function getTransactionSettings($transaction, $order, string $integratio
142146
{
143147
/** @var Order $order */
144148
$url = $this->transactionOrderService->getTransactionPaymentUrl($order, $integrationType);
145-
149+
146150
return [
147151
'transaction_id' => $transaction->getId(),
148152
'transaction_state' => $transaction->getState(),

Model/Resolver/UpdateTransactionUrls.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,15 @@ private function setTransactionUrls($cartIdMasked, $successUrl, $failureUrl)
148148

149149
// Gets the ID reserved for the order from the quotation
150150
$orderId = $quote->getReservedOrderId();
151-
151+
152152
// Checks if the quote does not have an ID reserved for the order
153+
// If the quote id is used as an identifier, this will cause the urls to have to be reset
154+
// to the correct order id, otherwise the redirect to the correct transaction will not be possible.
155+
// This means that the user still has a quote and has not paid, the quote only becomes a quote once payment
156+
// has been made, so there is no order id at this point.
157+
// The transaction info id is set, so that there are no other unknown side effects, it's mandatory.
153158
if (!$orderId && !$quote->hasReservedOrderId()) {
154-
$orderId = $quote->getId();
159+
$orderId = $transactionInfo->getId();
155160
}
156161

157162
$this->transactionInfoManagement->setRedirectUrls($transactionInfo, $orderId, $successUrl, $failureUrl);

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.8/docs/en/documentation.html)
15+
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/magento-2/2.1.9/docs/en/documentation.html)
1616

1717

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

3838
## License
3939

40-
Please see the [license file](https://github.com/pfpayments/magento-2/blob/2.1.8/LICENSE) for more information.
40+
Please see the [license file](https://github.com/pfpayments/magento-2/blob/2.1.9/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.8",
19+
"version" : "2.1.9",
2020
"require" : {
2121
"php" : "~7.1.3||~7.2.0||~7.3.0||~7.4.0||~8.0||~8.1",
2222
"magento/framework" : "^102.0.0||^103.0.0",

docs/en/documentation.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h2>Documentation</h2> </div>
2222
</a>
2323
</li>
2424
<li>
25-
<a href="https://github.com/pfpayments/magento-2/releases/tag/2.1.8/">
25+
<a href="https://github.com/pfpayments/magento-2/releases/tag/2.1.9/">
2626
Source
2727
</a>
2828
</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.8/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.9/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.8</version>
18+
<version>2.1.9</version>
1919
<sdk_version>4.0.2</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.8">
15+
<module name="PostFinanceCheckout_Payment" setup_version="2.1.9">
1616
<sequence>
1717
<module name="Magento_Sales"/>
1818
<module name="Magento_Payment"/>

i18n/de_DE.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"Gift Wrap","Geschenkverpackung"
5151
"Hold Delivery","Lieferung halten"
5252
"ID required","ID erforderlich"
53-
"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.8/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.8/docs/en/documentation.html"" target=""_blank"">Dokumentation</a> an."
53+
"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.9/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.9/docs/en/documentation.html"" target=""_blank"">Dokumentation</a> an."
5454
"Inactive","Inaktiv"
5555
"Information","Informationen"
5656
"Invoice","Rechnung"

i18n/en_US.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"Gift Wrap","Gift Wrap"
5151
"Hold Delivery","Hold Delivery"
5252
"ID required","ID required"
53-
"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.8/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.8/docs/en/documentation.html"" target=""_blank"">documentation</a>."
53+
"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.9/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.9/docs/en/documentation.html"" target=""_blank"">documentation</a>."
5454
"Inactive","Inactive"
5555
"Information","Information"
5656
"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.8/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.8/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.9/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.9/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
@@ -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.8/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.8/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.9/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.9/docs/en/documentation.html"" target=""_blank"">documentation</a> an."
5454
"Inactive","Inactif"
5555
"Information","Information"
5656
"Invoice","Facture"

i18n/it_CH.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"Gift Wrap","Confezione regalo"
5151
"Hold Delivery","Sospendi la consegna"
5252
"ID required","ID richiesto"
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.8/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.8/docs/en/documentation.html"" target=""_blank"">documentazione</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.9/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.9/docs/en/documentation.html"" target=""_blank"">documentazione</a> an."
5454
"Inactive","Inattivo"
5555
"Information","Informazione"
5656
"Invoice","Fattura"

i18n/it_IT.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"Gift Wrap","Confezione regalo"
5151
"Hold Delivery","Sospendi la consegna"
5252
"ID required","ID richiesto"
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.8/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.8/docs/en/documentation.html"" target=""_blank"">documentazione</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.9/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.9/docs/en/documentation.html"" target=""_blank"">documentazione</a> an."
5454
"Inactive","Inattivo"
5555
"Information","Informazione"
5656
"Invoice","Fattura"

0 commit comments

Comments
 (0)