Hexasoft_FraudLabsPro - Version 1.2.4

Version Notes

Add new fields for screen/order API

Download this release

Release Info

Developer Hexasoft
Extension Hexasoft_FraudLabsPro
Version 1.2.4
Comparing to
See all releases


Code changes from version 1.2.3 to 1.2.4

app/code/local/Hexasoft/FraudLabsPro/Block/Sales/Order/Fraudlabsproresult.php CHANGED
@@ -141,7 +141,7 @@ class Hexasoft_FraudLabsPro_Block_Sales_Order_Fraudlabsproresult extends Mage_Ad
141
  </tr>
142
  <tr>
143
  <td style="padding:5px;"><span><strong>Link</strong></span></td>
144
- <td colspan="6" style="padding:5px;"><span><a href="http://www.fraudlabspro.com/merchant/transaction-details/' . $data['fraudlabspro_id'] . '" target="_blank">http://www.fraudlabspro.com/merchant/transaction-details/' . $data['fraudlabspro_id'] . '</a></span></td>
145
  </tr>';
146
 
147
  if($data['fraudlabspro_status'] == 'REVIEW'){
@@ -155,8 +155,8 @@ class Hexasoft_FraudLabsPro_Block_Sales_Order_Fraudlabsproresult extends Mage_Ad
155
  <div style="text-align:center;padding:10px">
156
  <input type="submit" name="approve" value="Approve Order" />
157
  <input type="submit" name="reject" value="Reject Order" />
158
- <!--input type="submit" name="reject-blacklist" value="Blacklist Order" /-->
159
- <input type="button" id="reject-blacklist" name="reject-blacklist" value="Blacklist Order" />
160
  </div>
161
  </form>
162
  </td>
141
  </tr>
142
  <tr>
143
  <td style="padding:5px;"><span><strong>Link</strong></span></td>
144
+ <td colspan="6" style="padding:5px;"><span><a href="https://www.fraudlabspro.com/merchant/transaction-details/' . $data['fraudlabspro_id'] . '" target="_blank">https://www.fraudlabspro.com/merchant/transaction-details/' . $data['fraudlabspro_id'] . '</a></span></td>
145
  </tr>';
146
 
147
  if($data['fraudlabspro_status'] == 'REVIEW'){
155
  <div style="text-align:center;padding:10px">
156
  <input type="submit" name="approve" value="Approve Order" />
157
  <input type="submit" name="reject" value="Reject Order" />
158
+ <input type="submit" name="reject-blacklist" value="Blacklist Order" />
159
+ <!--input type="button" id="reject-blacklist" name="reject-blacklist" value="Blacklist Order" /-->
160
  </div>
161
  </form>
162
  </td>
app/code/local/Hexasoft/FraudLabsPro/Controller/Observer.php CHANGED
@@ -57,8 +57,12 @@ class Hexasoft_FraudLabsPro_Controller_Observer{
57
  $ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
58
  }
59
 
60
- if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && filter_var($_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP)){
61
- $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
 
 
 
 
62
  }
63
 
64
  $payment_mode = $order->getPayment()->getMethod();
@@ -95,17 +99,19 @@ class Hexasoft_FraudLabsPro_Controller_Observer{
95
  'payment_mode' => $paymentMode,
96
  'flp_checksum' => Mage::getModel('core/cookie')->get('flp_checksum'),
97
  'source' => 'magento',
98
- 'source_version' => '1.2.3',
99
  );
100
 
101
  $shippingAddress = $order->getShippingAddress();
102
 
103
  if($shippingAddress){
104
- $queries['ship_addr'] = trim($shippingAddress->getStreet(1) . ' ' . $shippingAddress->getStreet(2));
105
- $queries['ship_city'] = $shippingAddress->getCity();
106
- $queries['ship_state'] = $shippingAddress->getRegion();
107
- $queries['ship_zip_code'] = $shippingAddress->getPostcode();
108
- $queries['ship_country'] = $shippingAddress->getCountryId();
 
 
109
  }
110
 
111
  $response = $this->http('https://api.fraudlabspro.com/v1/order/screen?' . http_build_query($queries));
57
  $ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
58
  }
59
 
60
+ if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
61
+ $xip = trim(current(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])));
62
+
63
+ if (filter_var($xip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
64
+ $ip = $xip;
65
+ }
66
  }
67
 
68
  $payment_mode = $order->getPayment()->getMethod();
99
  'payment_mode' => $paymentMode,
100
  'flp_checksum' => Mage::getModel('core/cookie')->get('flp_checksum'),
101
  'source' => 'magento',
102
+ 'source_version' => '1.2.4',
103
  );
104
 
105
  $shippingAddress = $order->getShippingAddress();
106
 
107
  if($shippingAddress){
108
+ $queries['ship_first_name'] = $shippingAddress->getFirstname();
109
+ $queries['ship_last_name'] = $shippingAddress->getLastname();
110
+ $queries['ship_addr'] = trim($shippingAddress->getStreet(1) . ' ' . $shippingAddress->getStreet(2));
111
+ $queries['ship_city'] = $shippingAddress->getCity();
112
+ $queries['ship_state'] = $shippingAddress->getRegion();
113
+ $queries['ship_zip_code'] = $shippingAddress->getPostcode();
114
+ $queries['ship_country'] = $shippingAddress->getCountryId();
115
  }
116
 
117
  $response = $this->http('https://api.fraudlabspro.com/v1/order/screen?' . http_build_query($queries));
app/code/local/Hexasoft/FraudLabsPro/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Hexasoft_FraudLabsPro>
5
- <version>1.2.3</version>
6
  </Hexasoft_FraudLabsPro>
7
  </modules>
8
 
2
  <config>
3
  <modules>
4
  <Hexasoft_FraudLabsPro>
5
+ <version>1.2.4</version>
6
  </Hexasoft_FraudLabsPro>
7
  </modules>
8
 
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Hexasoft_FraudLabsPro</name>
4
- <version>1.2.3</version>
5
  <stability>stable</stability>
6
  <license>GNU Lesser General Public License (LGPL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension screens online transactions for frauds.</summary>
10
  <description>FraudLabs Pro service screens online transactions for frauds. It increases e-commerce merchant profits by reduces chargeback, improves operation efficiency and provides business intelligence.</description>
11
- <notes>Support to PHP 7.1.6</notes>
12
  <authors><author><name>Hexasoft</name><user>hexasoft</user><email>tech@hexasoft.com.my</email></author></authors>
13
- <date>2017-06-13</date>
14
- <time>06:38:24</time>
15
- <contents><target name="magelocal"><dir name="Hexasoft"><dir name="FraudLabsPro"><dir name="Block"><file name="Agent.php" hash="4bdc83087e13d73c5aad938e13514255"/><dir name="Sales"><dir name="Order"><file name="Fraudlabsproresult.php" hash="061d0fd32579150f06f35a1c137113cc"/><file name="Grid.php" hash="154790c49632c35af5e301c33a1e3188"/><dir name="Grid"><dir name="Renderer"><file name="Risk.php" hash="19c8ca6a7656fee2e66b904dc97079a0"/></dir></dir></dir></dir></dir><dir name="Controller"><file name="Observer.php" hash="3434c3e64d36e30599559f16d1fe8069"/></dir><dir name="controllers"><file name="IndexController.php" hash="2bc99063ff21e0a4484e2955e78ccf46"/></dir><dir name="etc"><file name="adminhtml.xml" hash="38ccfabe77e18a8f8d9050359d44d13e"/><file name="config.xml" hash="f0392e96bc3ce2106f14dbfccf2a0df8"/><file name="system.xml" hash="fbed11ab9291bc1f95112559562df9c7"/></dir><dir name="Helper"><file name="Data.php" hash="948a251b0d5415653b1efce1af279b28"/></dir><dir name="sql"><dir name="fraudlabspro_setup"><file name="mysql4-install-1.0.0.php" hash="be13e48218b5120641393e68df201d8b"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="fraudlabspro.xml" hash="43ae7917d3084744031b90d33f515f87"/></dir><dir name="template"><dir name="fraudlabspro"><dir name="sales"><dir name="order"><dir name="view"><dir name="tab"><file name="info.phtml" hash="25a46ae56e812c120f2125ad32f4bb1c"/></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="fraudlabspro_agent.xml" hash="d5a98ac1e05315bc3bc4b5f4aef948d2"/></dir><dir name="template"><dir name="fraudlabspro"><file name="agent.phtml" hash="51c365bd36dcad836a573798d2df14ff"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Hexasoft_FraudLabsPro.xml" hash="e8bb308243797bda5769209a8b360577"/></dir></target></contents>
16
  <compatible/>
17
- <dependencies><required><php><min>5.2.0</min><max>7.1.6</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Hexasoft_FraudLabsPro</name>
4
+ <version>1.2.4</version>
5
  <stability>stable</stability>
6
  <license>GNU Lesser General Public License (LGPL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension screens online transactions for frauds.</summary>
10
  <description>FraudLabs Pro service screens online transactions for frauds. It increases e-commerce merchant profits by reduces chargeback, improves operation efficiency and provides business intelligence.</description>
11
+ <notes>Add new fields for screen/order API</notes>
12
  <authors><author><name>Hexasoft</name><user>hexasoft</user><email>tech@hexasoft.com.my</email></author></authors>
13
+ <date>2017-09-15</date>
14
+ <time>03:13:34</time>
15
+ <contents><target name="magelocal"><dir name="Hexasoft"><dir name="FraudLabsPro"><dir name="Block"><file name="Agent.php" hash="4bdc83087e13d73c5aad938e13514255"/><dir name="Sales"><dir name="Order"><file name="Fraudlabsproresult.php" hash="b2270bf3c0030794b1f5d364c444a0aa"/><file name="Grid.php" hash="154790c49632c35af5e301c33a1e3188"/><dir name="Grid"><dir name="Renderer"><file name="Risk.php" hash="19c8ca6a7656fee2e66b904dc97079a0"/></dir></dir></dir></dir></dir><dir name="Controller"><file name="Observer.php" hash="19e05adb4acac723f7582f58f7f14220"/></dir><dir name="controllers"><file name="IndexController.php" hash="2bc99063ff21e0a4484e2955e78ccf46"/></dir><dir name="etc"><file name="adminhtml.xml" hash="38ccfabe77e18a8f8d9050359d44d13e"/><file name="config.xml" hash="3df5ab7f2328ab2ed3e01c7eb4c58f3c"/><file name="system.xml" hash="fbed11ab9291bc1f95112559562df9c7"/></dir><dir name="Helper"><file name="Data.php" hash="948a251b0d5415653b1efce1af279b28"/></dir><dir name="sql"><dir name="fraudlabspro_setup"><file name="mysql4-install-1.0.0.php" hash="be13e48218b5120641393e68df201d8b"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="fraudlabspro.xml" hash="43ae7917d3084744031b90d33f515f87"/></dir><dir name="template"><dir name="fraudlabspro"><dir name="sales"><dir name="order"><dir name="view"><dir name="tab"><file name="info.phtml" hash="25a46ae56e812c120f2125ad32f4bb1c"/></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="fraudlabspro_agent.xml" hash="d5a98ac1e05315bc3bc4b5f4aef948d2"/></dir><dir name="template"><dir name="fraudlabspro"><file name="agent.phtml" hash="51c365bd36dcad836a573798d2df14ff"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Hexasoft_FraudLabsPro.xml" hash="e8bb308243797bda5769209a8b360577"/></dir></target></contents>
16
  <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>8.0.0</max></php></required></dependencies>
18
  </package>