From 7df1caa3ba2213fd8b608e8deed605f878108708 Mon Sep 17 00:00:00 2001 From: FraudLabs Pro Date: Fri, 8 May 2020 16:25:36 +0800 Subject: [PATCH] Updated IP address detection method. --- composer.json | 2 +- config.xml | 2 +- fraudlabspro.php | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 9865e10..0586776 100644 --- a/composer.json +++ b/composer.json @@ -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": [ diff --git a/config.xml b/config.xml index e71ae9e..c835d5e 100644 --- a/config.xml +++ b/config.xml @@ -2,7 +2,7 @@ fraudlabspro - + diff --git a/fraudlabspro.php b/fraudlabspro.php index 6194bd3..6e6cb45 100644 --- a/fraudlabspro.php +++ b/fraudlabspro.php @@ -1,6 +1,6 @@ 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'; @@ -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 = '';