Version Notes
Avoids sending transactions for analysis for non-credit card payments
Download this release
Release Info
| Developer | Konduto |
| Extension | Konduto |
| Version | 1.1.2 |
| Comparing to | |
| See all releases | |
Code changes from version 1.1.1 to 1.1.2
- app/code/local/Konduto/Score/Helper/Order.php +7 -21
- package.xml +5 -5
app/code/local/Konduto/Score/Helper/Order.php
CHANGED
|
@@ -3,20 +3,14 @@
|
|
| 3 |
class Konduto_Score_Helper_Order extends Mage_Core_Helper_Abstract {
|
| 4 |
|
| 5 |
public function getOrderData($order, $visitor = NULL) {
|
| 6 |
-
if ($visitor == NULL) {
|
| 7 |
-
$visitor = $this->getVisitorId();
|
| 8 |
-
}
|
| 9 |
$billing = $order->getBillingAddress()->getData();
|
| 10 |
$shipping = $order->getShippingAddress()->getData();
|
| 11 |
$od = $order->getId();
|
| 12 |
$odm = Mage::getModel('sales/order')->load($od);
|
| 13 |
|
| 14 |
-
if ($odm->getCustomerId() == '' || $odm->getCustomerId() == NULL) {
|
| 15 |
-
|
| 16 |
-
} else {
|
| 17 |
-
$customer_id = $odm->getCustomerId();
|
| 18 |
-
}
|
| 19 |
-
|
| 20 |
|
| 21 |
$data['id'] = $od;
|
| 22 |
$data['total_amount'] = (float) $odm->getGrandTotal();
|
|
@@ -29,9 +23,7 @@ class Konduto_Score_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 29 |
'id' => $customer_id,
|
| 30 |
'name' => $odm->getCustomerFirstname() . " " . $odm->getCustomerLastname(),
|
| 31 |
'phone1' => $billing['telephone'],
|
| 32 |
-
'email' => $odm->getCustomerEmail()
|
| 33 |
-
'new' => false,
|
| 34 |
-
'vip' => false
|
| 35 |
);
|
| 36 |
if (!($odm->getCustomerTaxvat() == NULL || $odm->getCustomerTaxvat() == " ")) {
|
| 37 |
$data['customer']['tax_id'] = $odm->getCustomerTaxvat();
|
|
@@ -39,7 +31,6 @@ class Konduto_Score_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 39 |
$data['billing'] = array(
|
| 40 |
'name' => $billing['firstname'] . " " . $billing['lastname'],
|
| 41 |
'address1' => $billing['street'],
|
| 42 |
-
// 'address2'=>$billing[''],
|
| 43 |
'city' => $billing['city'],
|
| 44 |
'state' => $billing['region'],
|
| 45 |
'zip' => $billing['postcode'],
|
|
@@ -48,7 +39,6 @@ class Konduto_Score_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 48 |
$data['shipping'] = array(
|
| 49 |
'name' => $shipping['firstname'] . " " . $shipping['lastname'],
|
| 50 |
'address1' => $shipping['street'],
|
| 51 |
-
// 'address2'=>$shipping[''],
|
| 52 |
'city' => $shipping['city'],
|
| 53 |
'state' => $shipping['region'],
|
| 54 |
'zip' => $shipping['postcode'],
|
|
@@ -60,6 +50,7 @@ class Konduto_Score_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 60 |
unset($paymet['include']);
|
| 61 |
$data['payment'][] = $paymet;
|
| 62 |
}
|
|
|
|
| 63 |
|
| 64 |
$items = $order->getAllItems();
|
| 65 |
foreach ($items as $item) {
|
|
@@ -83,7 +74,6 @@ class Konduto_Score_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 83 |
}
|
| 84 |
}
|
| 85 |
|
| 86 |
-
|
| 87 |
$response = $this->fireRequest($data);
|
| 88 |
}
|
| 89 |
|
|
@@ -158,10 +148,8 @@ class Konduto_Score_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 158 |
break;
|
| 159 |
|
| 160 |
default:
|
| 161 |
-
if ($payment->getCcLast4()) {
|
| 162 |
-
$use = true;
|
| 163 |
-
}
|
| 164 |
$last4 = $payment->getCcLast4();
|
|
|
|
| 165 |
$credit_card_company = $payment->getCcType();
|
| 166 |
break;
|
| 167 |
}
|
|
@@ -180,9 +168,7 @@ class Konduto_Score_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
| 180 |
"expiration_date" => $month . $payment->getCcExpYear(),
|
| 181 |
"status" => "pending"
|
| 182 |
);
|
| 183 |
-
if ((is_string($cc_six)) && (strlen($cc_six)==6)) {
|
| 184 |
-
$ret["bin"] = $cc_six;
|
| 185 |
-
}
|
| 186 |
|
| 187 |
return $ret;
|
| 188 |
}
|
| 3 |
class Konduto_Score_Helper_Order extends Mage_Core_Helper_Abstract {
|
| 4 |
|
| 5 |
public function getOrderData($order, $visitor = NULL) {
|
| 6 |
+
if ($visitor == NULL) { $visitor = $this->getVisitorId(); }
|
|
|
|
|
|
|
| 7 |
$billing = $order->getBillingAddress()->getData();
|
| 8 |
$shipping = $order->getShippingAddress()->getData();
|
| 9 |
$od = $order->getId();
|
| 10 |
$odm = Mage::getModel('sales/order')->load($od);
|
| 11 |
|
| 12 |
+
if ($odm->getCustomerId() == '' || $odm->getCustomerId() == NULL) { $customer_id = $odm->getCustomerEmail(); }
|
| 13 |
+
else { $customer_id = $odm->getCustomerId(); }
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
$data['id'] = $od;
|
| 16 |
$data['total_amount'] = (float) $odm->getGrandTotal();
|
| 23 |
'id' => $customer_id,
|
| 24 |
'name' => $odm->getCustomerFirstname() . " " . $odm->getCustomerLastname(),
|
| 25 |
'phone1' => $billing['telephone'],
|
| 26 |
+
'email' => $odm->getCustomerEmail()
|
|
|
|
|
|
|
| 27 |
);
|
| 28 |
if (!($odm->getCustomerTaxvat() == NULL || $odm->getCustomerTaxvat() == " ")) {
|
| 29 |
$data['customer']['tax_id'] = $odm->getCustomerTaxvat();
|
| 31 |
$data['billing'] = array(
|
| 32 |
'name' => $billing['firstname'] . " " . $billing['lastname'],
|
| 33 |
'address1' => $billing['street'],
|
|
|
|
| 34 |
'city' => $billing['city'],
|
| 35 |
'state' => $billing['region'],
|
| 36 |
'zip' => $billing['postcode'],
|
| 39 |
$data['shipping'] = array(
|
| 40 |
'name' => $shipping['firstname'] . " " . $shipping['lastname'],
|
| 41 |
'address1' => $shipping['street'],
|
|
|
|
| 42 |
'city' => $shipping['city'],
|
| 43 |
'state' => $shipping['region'],
|
| 44 |
'zip' => $shipping['postcode'],
|
| 50 |
unset($paymet['include']);
|
| 51 |
$data['payment'][] = $paymet;
|
| 52 |
}
|
| 53 |
+
else { return; }
|
| 54 |
|
| 55 |
$items = $order->getAllItems();
|
| 56 |
foreach ($items as $item) {
|
| 74 |
}
|
| 75 |
}
|
| 76 |
|
|
|
|
| 77 |
$response = $this->fireRequest($data);
|
| 78 |
}
|
| 79 |
|
| 148 |
break;
|
| 149 |
|
| 150 |
default:
|
|
|
|
|
|
|
|
|
|
| 151 |
$last4 = $payment->getCcLast4();
|
| 152 |
+
if ($last4) { $use = true; }
|
| 153 |
$credit_card_company = $payment->getCcType();
|
| 154 |
break;
|
| 155 |
}
|
| 168 |
"expiration_date" => $month . $payment->getCcExpYear(),
|
| 169 |
"status" => "pending"
|
| 170 |
);
|
| 171 |
+
if ((is_string($cc_six)) && (strlen($cc_six)==6)) { $ret["bin"] = $cc_six; }
|
|
|
|
|
|
|
| 172 |
|
| 173 |
return $ret;
|
| 174 |
}
|
package.xml
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Konduto</name>
|
| 4 |
-
<version>1.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>OSLv3.0</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Konduto fraud detection service integration</summary>
|
| 10 |
<description>Konduto is a fraud detection service that helps e-commerce merchants spot fraud with Buying Behavior</description>
|
| 11 |
-
<notes>
|
| 12 |
<authors><author><name>Konduto</name><user>konduto</user><email>magentoconnect@konduto.com</email></author><author><name>Excellence Technologies</name><user>manish</user><email>manish@excellencetechnologies.in</email></author></authors>
|
| 13 |
-
<date>2014-08-
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="magelocal"><dir name="Konduto"><dir name="Score"><dir name="Block"><dir name="Adminhtml"><dir name="Order"><file name="Grid.php" hash="befb067ef6c9badc9879fa3e27b5b690"/></dir></dir><dir name="Product"><file name="View.php" hash="26e9a7dda59bf978431e2cf564c59da1"/></dir></dir><dir name="Helper"><file name="Data.php" hash="4eb1e86fb4c5f3833f5d055d594b6a16"/><file name="Order.php" hash="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.5.1.0</min><max>1.8.1.0</max></package><extension><name>gd</name><min>2.0.28</min><max>3.0</max></extension></required></dependencies>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Konduto</name>
|
| 4 |
+
<version>1.1.2</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>OSLv3.0</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Konduto fraud detection service integration</summary>
|
| 10 |
<description>Konduto is a fraud detection service that helps e-commerce merchants spot fraud with Buying Behavior</description>
|
| 11 |
+
<notes>Avoids sending transactions for analysis for non-credit card payments</notes>
|
| 12 |
<authors><author><name>Konduto</name><user>konduto</user><email>magentoconnect@konduto.com</email></author><author><name>Excellence Technologies</name><user>manish</user><email>manish@excellencetechnologies.in</email></author></authors>
|
| 13 |
+
<date>2014-08-22</date>
|
| 14 |
+
<time>12:40:07</time>
|
| 15 |
+
<contents><target name="magelocal"><dir name="Konduto"><dir name="Score"><dir name="Block"><dir name="Adminhtml"><dir name="Order"><file name="Grid.php" hash="befb067ef6c9badc9879fa3e27b5b690"/></dir></dir><dir name="Product"><file name="View.php" hash="26e9a7dda59bf978431e2cf564c59da1"/></dir></dir><dir name="Helper"><file name="Data.php" hash="4eb1e86fb4c5f3833f5d055d594b6a16"/><file name="Order.php" hash="55a04bc9cdd9225640f9821e06544341"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Score"><file name="Collection.php" hash="2dedf14be82d224d6d8f56fe1a4fa5fc"/></dir><file name="Score.php" hash="938cbb8ae489bc9b0c39e75ca0f180f1"/></dir><file name="Observer.php" hash="1e63bfe563d1e28a4554a17ee2246f7f"/><file name="Score.php" hash="d9f8efdb0b45bbb00c0faf62e23c2b26"/><dir name="System"><file name="Review.php" hash="ba34a6e86750cac3b2ebfa9554c2ceb6"/><file name="Save.php" hash="84fad33f0f1477cebab1ab2c6eb1f8c1"/><file name="Select.php" hash="7af3a6cc2f51f3c503385406d381307a"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ScoreController.php" hash="e9d29876ff47a7acd216589499410d46"/></dir><file name="ScoreController.php" hash="e8b6004c67d4d9f498d74fba1602de0a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="df125e243e6163fcd0a4c1401c0e18c6"/><file name="config.xml" hash="87df8530b6efc8a19e3ecae226f1815a"/><file name="system.xml" hash="8b68877bd02c594276af02b0c681d075"/></dir><dir name="sql"><dir name="score_setup"><file name="mysql4-install-0.1.0.php" hash="81b07a2cfb4bb6910166e1f6cfa9a838"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Konduto_Score.xml" hash="aa8bf0381a4cfb0ef47a47f354eeb1ec"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="score.xml" hash="ce8033fbd64586bbe5ae8c2b2a6c2e3c"/></dir><dir name="template"><dir name="score"><dir name="sales"><dir name="order"><dir name="view"><file name="info.phtml" hash="928ede4ea46893156290655727b862cf"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="score.xml" hash="2c92434bd76a1ccb2023a2db9a122949"/></dir><dir name="template"><dir name="score"><file name="score.phtml" hash="ea756884a98790d698b2356656fd1019"/><file name="getId.phtml" hash="e3df324fdf29fa9c48ed02a799458d51"/></dir></dir></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.5.1.0</min><max>1.8.1.0</max></package><extension><name>gd</name><min>2.0.28</min><max>3.0</max></extension></required></dependencies>
|
| 18 |
</package>
|
