Skip to content

Commit eb2433e

Browse files
2022-06-30: v2.5.0
- Remove layout="1column" from frontend. - BREAKING CHANGE: Add the ability to set Successful Order State in addition to Successful Order Status. Please ensure this config option is set after updating.
1 parent 40c509a commit eb2433e

File tree

9 files changed

+29
-8
lines changed

9 files changed

+29
-8
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# PayWeb_Magento_2
2-
## PayGate Magento plugin v2.4.9 for Magento v2.4.3
2+
## PayGate Magento plugin v2.5.0 for Magento v2.4.4
33

44
This is the PayGate PayWeb3 plugin for Magento 2. Please feel free to contact the PayGate support team at support@paygate.co.za should you require any assistance.
55

66
## Installation
77
[![How To Setup PayGate PayWeb for Magento 2](https://appinlet.com/wp-content/uploads/2021/01/How-To-Setup-PayGate-PayWeb-for-Magento-2.jpg)](https://www.youtube.com/watch?v=JtDTm49cWmU "How To Setup PayGate PayWeb for Magento 2")
88

9-
Please navigate to the [releases page](https://github.com/PayGate/PayWeb_Magento_2/releases), download the latest release (v2.4.9) and unzip. You will then be able to follow the integration guide PDF which is included in the zip.
9+
Please navigate to the [releases page](https://github.com/PayGate/PayWeb_Magento_2/releases), download the latest release (v2.5.0) and unzip. You will then be able to follow the integration guide PDF which is included in the zip.
1010

1111
## Collaboration
1212

paygate/paygate-payweb-gateway/Controller/Notify/Indexm220.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,16 @@ public function execute()
179179
$orderState = $order->getState();
180180
if ($orderState != Order::STATE_COMPLETE && $orderState != Order::STATE_PROCESSING) {
181181
$status = Order::STATE_PROCESSING;
182+
$state = Order::STATE_PROCESSING;
183+
182184
if ($this->getConfigData('Successful_Order_status') != "") {
183185
$status = $this->getConfigData('Successful_Order_status');
184186
}
185187

188+
if ($this->getConfigData('Successful_Order_state') != '') {
189+
$state = $this->getConfigData('Successful_Order_state');
190+
}
191+
186192
$model = $this->_paymentMethod;
187193
$order_successful_email = $model->getConfigData('order_email');
188194

@@ -216,7 +222,7 @@ public function execute()
216222

217223
// Save Transaction Response
218224
$this->createTransaction($order, $paygate_data);
219-
$order->setState($status)->setStatus($status)->save();
225+
$order->setState($state)->setStatus($status)->save();
220226
}
221227

222228
exit;

paygate/paygate-payweb-gateway/Controller/Redirect/Success.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,15 @@ public function execute()
175175
if ($canProcessThisOrder) {
176176
$order->setPaywebPaymentProcessed(1)->save();
177177
$status = Order::STATE_PROCESSING;
178+
$state = Order::STATE_PROCESSING;
178179
if ($this->getConfigData('Successful_Order_status') != "") {
179180
$status = $this->getConfigData('Successful_Order_status');
180181
}
181182

183+
if ($this->getConfigData('Successful_Order_state') != "") {
184+
$state = $this->getConfigData('Successful_Order_state');
185+
}
186+
182187
$model = $this->_paymentMethod;
183188
$order_successful_email = $model->getConfigData('order_email');
184189

@@ -212,7 +217,7 @@ public function execute()
212217

213218
// Save Transaction Response
214219
$this->createTransaction($order, $data);
215-
$order->setState($status)->setStatus($status)->save();
220+
$order->setState($state)->setStatus($status)->save();
216221
}
217222

218223
// Invoice capture code completed

paygate/paygate-payweb-gateway/Model/PayGate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ public function prepareFields($order, $api = null)
516516
'paygate/notify',
517517
array('_secure' => true)
518518
) . '?eid=' . $entityOrderId;
519-
$fields['USER3'] = 'magento2-v2.4.9';
519+
$fields['USER3'] = 'magento2-v2.5.0';
520520

521521
return $fields;
522522
}

paygate/paygate-payweb-gateway/changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Date Version Description
33
=========================================================================
44

5+
2022-06-30: v2.5.0 : Remove layout="1column" from frontend.
6+
BREAKING CHANGE: Add the ability to set Successful Order State
7+
in addition to Successful Order Status. Please ensure this config
8+
option is set after updating.
9+
510
2022-01-05: v2.4.9 : Improve store scope handling.
611
Update Masterpass to Scan to Pay.
712

paygate/paygate-payweb-gateway/etc/adminhtml/system.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@
109109
<label>Successful Order Status</label>
110110
<source_model>Magento\Sales\Model\Config\Source\Order\Status</source_model>
111111
</field>
112+
<field id="Successful_Order_state" translate="label" type="select" sortOrder="17" showInDefault="1"
113+
showInWebsite="1" showInStore="1">
114+
<label>Successful Order State</label>
115+
<source_model>Magento\Sales\Model\Config\Source\Order\Status</source_model>
116+
</field>
112117
</group>
113118
</section>
114119
</system>

paygate/paygate-payweb-gateway/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
-->
1111
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1212
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
13-
<module name="PayGate_PayWeb" setup_version="2.4.9">
13+
<module name="PayGate_PayWeb" setup_version="2.5.0">
1414
<sequence>
1515
<module name="Magento_Checkout"/>
1616
<module name="Magento_Sales"/>

paygate/paygate-payweb-gateway/view/frontend/layout/checkout_index_index.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Released under the GNU General Public License
99
*/
1010
-->
11-
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column"
11+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1212
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
1313
<head>
1414
<css src="PayGate_PayWeb::css/paygate_checkout.css"/>

paygate/paygate-payweb-gateway/view/frontend/layout/default.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Released under the GNU General Public License
99
*/
1010
-->
11-
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column"
11+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1212
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
1313
<head>
1414
<css src="PayGate_PayWeb::css/paygate_checkout.css"/>

0 commit comments

Comments
 (0)