Skip to content

Commit 4c115ea

Browse files
authored
Merge pull request #152 from AltaPay/trigger-order-update-on-after-adding-missing-data
Trigger order update when missing transaction data saved to the order
2 parents d9b5331 + 14829f8 commit 4c115ea

4 files changed

Lines changed: 14 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ PrestaShop 1.6.x, 1.7.x and 8.x
55

66
# Changelog
77

8+
## [4.0.1]
9+
### Fixed
10+
- Triggered order update when saving missing transaction data.
11+
812
## [4.0.0]
913
### Fixed
1014
- Streamline and simplify management of order lines and amounts.

altapay.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ public function __construct()
3232
{
3333
$this->name = 'altapay';
3434
$this->tab = 'payments_gateways';
35-
$this->version = '4.0.0';
35+
$this->version = '4.0.1';
3636
$this->author = 'AltaPay A/S';
3737
$this->is_eu_compatible = 1;
38-
$this->ps_versions_compliancy = ['min' => '1.6.0.1', 'max' => '8.2.1'];
38+
$this->ps_versions_compliancy = ['min' => '1.6.0.1', 'max' => '8.2.3'];
3939
$this->currencies = true;
4040
$this->currencies_mode = 'checkbox';
4141
$this->bootstrap = true;
@@ -2398,6 +2398,9 @@ public function hookAdminOrder($params)
23982398
PrestaShopLogger::addLog("Could not sync payment info for Order ID: {$params['id_order']}", 3, null, $this->name, $this->id, true);
23992399

24002400
return false;
2401+
} else {
2402+
$orderDetail->date_upd = date('Y-m-d H:i:s');
2403+
$orderDetail->update();
24012404
}
24022405
}
24032406

@@ -3842,6 +3845,9 @@ public function syncOrderDataFromGateway($results, $orderDetail, $params)
38423845
PrestaShopLogger::addLog("Could not sync payment info for Order ID: {$params['id_order']}", 3, null, $this->name, $this->id, true);
38433846

38443847
return false;
3848+
} else {
3849+
$orderDetail->date_upd = date('Y-m-d H:i:s');
3850+
$orderDetail->update();
38453851
}
38463852
} catch (Exception $e) {
38473853
PrestaShopLogger::addLog('Payment API Error: ' . $e->getMessage(), 3, null, $this->name, $this->id, true);

config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<module>
1111
<name>altapay</name>
1212
<displayName><![CDATA[AltaPay for PrestaShop]]></displayName>
13-
<version><![CDATA[4.0.0]]></version>
13+
<version><![CDATA[4.0.1]]></version>
1414
<description><![CDATA[AltaPay: Payments less complicated]]></description>
1515
<author><![CDATA[AltaPay A/S]]></author>
1616
<tab><![CDATA[payments_gateways]]></tab>

helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
function transactionInfo($transactionInfo = [])
2525
{
2626
$pluginName = 'altapay';
27-
$pluginVersion = '4.0.0';
27+
$pluginVersion = '4.0.1';
2828

2929
// Transaction info
3030
$transactionInfo['ecomPlatform'] = 'PrestaShop';

0 commit comments

Comments
 (0)