Skip to content

Commit

Permalink
Updated IP address detection method.
Browse files Browse the repository at this point in the history
  • Loading branch information
fraudlabspro committed May 8, 2020
1 parent 5914fe9 commit 7df1caa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fraudlabspro/prestashop",
"version": "v1.13.1",
"version": "v1.13.2",
"description": "Enable FraudLabs Pro fraud prevention in PrestaShop.",
"type": "prestashop-module",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>fraudlabspro</name>
<displayName><![CDATA[FraudLabs Pro Fraud Prevention]]></displayName>
<version><![CDATA[1.13.1]]></version>
<version><![CDATA[1.13.2]]></version>
<description><![CDATA[FraudLabs Pro screens transaction for online frauds to protect your store from fraud attempts.]]></description>
<author><![CDATA[FraudLabs Pro]]></author>
<tab><![CDATA[payment_security]]></tab>
Expand Down
8 changes: 3 additions & 5 deletions fraudlabspro.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2012-2019 FraudLabs Pro.
* 2012-2020 FraudLabs Pro.
*
* NOTICE OF LICENSE
*
Expand All @@ -18,12 +18,10 @@
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author FraudLabs Pro
* @copyright FraudLabs Pro
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of FraudLabs Pro
*/

if (!defined('_PS_VERSION_')) {
exit;
}
Expand All @@ -37,7 +35,7 @@ public function __construct()
{
$this->name = 'fraudlabspro';
$this->tab = 'payment_security';
$this->version = '1.13.0';
$this->version = '1.13.2';
$this->author = 'FraudLabs Pro';
$this->controllers = ['payment', 'validation'];
$this->module_key = 'cdb22a61c7ec8d1f900f6c162ad96caa';
Expand Down Expand Up @@ -171,7 +169,7 @@ public function hookNewOrder($params)
$quantity += $p['product_quantity'];
}

$ip = Db::getInstance()->getValue('SELECT `ip` FROM `' . _DB_PREFIX_ . 'flp_order_ip` WHERE `id_cart` = "' . ((int) $params['order']->id_cart) . '"');
$ip = Db::getInstance()->getValue('SELECT `ip` FROM `' . _DB_PREFIX_ . 'flp_order_ip` WHERE `id_cart` = "' . ((int) $params['cart']->id) . '"');
$ip = (!$ip) ? $this->getIP() : $ip;

$bill_state = '';
Expand Down

0 comments on commit 7df1caa

Please sign in to comment.