Konduto - Version 1.3.0

Version Notes

- Added PayPal compatibility
- Deprecated Manual mode

Download this release

Release Info

Developer Konduto
Extension Konduto
Version 1.3.0
Comparing to
See all releases


Code changes from version 1.2.1 to 1.3.0

app/code/community/Konduto/Score/.DS_Store ADDED
Binary file
app/code/community/Konduto/Score/Helper/Order.php CHANGED
@@ -122,54 +122,58 @@ class Konduto_Score_Helper_Order extends Mage_Core_Helper_Abstract {
122
  $payment = $model->getPayment();
123
  $instance = $payment->getMethodInstance();
124
  $ccNumber = $instance->getInfoInstance()->getCcNumber();
125
- $use = false;
126
  $cc_six = substr($ccNumber, 0, 6);
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  switch ($payment->getMethod()) {
129
  case 'authorizenet':
130
- $use = true;
131
  $cards_data = array_values($payment->getAdditionalInformation('authorize_cards'));
132
  $card_data = $cards_data[0];
133
- $last4 = $card_data['cc_last4'];
134
  $credit_card_company = $card_data['cc_type'];
135
  break;
136
 
137
  case 'paypal_direct':
138
- $use = true;
139
- $last4 = $payment->getCcLast4();
140
  $credit_card_company = $payment->getCcType();
141
  break;
142
 
143
  case 'sagepaydirectpro':
144
- $use = true;
145
  $sage = $model->getSagepayInfo();
146
- $last4 = $sage->getData('last_four_digits');
147
  $credit_card_company = $sage->getData('card_type');
148
  break;
149
 
 
 
 
 
 
 
150
  default:
151
- $last4 = $payment->getCcLast4();
152
- if ($last4) { $use = true; }
153
  $credit_card_company = $payment->getCcType();
154
  break;
155
  }
156
 
157
- if (strlen($payment->getCcExpMonth()) < 2) {
158
- $month = "0" . $payment->getCcExpMonth();
159
- } else {
160
- $month = $payment->getCcExpMonth();
161
- }
162
-
163
-
164
- $ret = array(
165
- "include" => $use,
166
- "type" => 'credit',
167
- "last4" => $last4,
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
  }
175
 
122
  $payment = $model->getPayment();
123
  $instance = $payment->getMethodInstance();
124
  $ccNumber = $instance->getInfoInstance()->getCcNumber();
 
125
  $cc_six = substr($ccNumber, 0, 6);
126
 
127
+ if ((strlen($payment->getCcExpMonth()) == 1) && ($payment->getCcExpYear())) {
128
+ $expiration_date = "0" . $payment->getCcExpMonth() . $payment->getCcExpYear();
129
+ }
130
+ else if ((strlen($payment->getCcExpMonth()) == 2) && ($payment->getCcExpYear())) {
131
+ $expiration_date = $payment->getCcExpMonth() . $payment->getCcExpYear();
132
+ }
133
+ else { $expiration_date = null; }
134
+
135
+ $ret = array(
136
+ "type" => "credit",
137
+ "status" => "pending",
138
+ "expiration_date" => $expiration_date
139
+ );
140
+
141
  switch ($payment->getMethod()) {
142
  case 'authorizenet':
143
+ $ret["include"] = true;
144
  $cards_data = array_values($payment->getAdditionalInformation('authorize_cards'));
145
  $card_data = $cards_data[0];
146
+ $ret['last4'] = $card_data['cc_last4'];
147
  $credit_card_company = $card_data['cc_type'];
148
  break;
149
 
150
  case 'paypal_direct':
151
+ $ret["include"] = true;
152
+ $ret['last4'] = $payment->getCcLast4();
153
  $credit_card_company = $payment->getCcType();
154
  break;
155
 
156
  case 'sagepaydirectpro':
157
+ $ret["include"] = true;
158
  $sage = $model->getSagepayInfo();
159
+ $ret['last4'] = $sage->getData('last_four_digits');
160
  $credit_card_company = $sage->getData('card_type');
161
  break;
162
 
163
+ case 'paypal_express':
164
+ case 'paypal_standard':
165
+ $ret["include"] = true;
166
+ $last4 = null;
167
+ break;
168
+
169
  default:
170
+ $ret["last4"] = $payment->getCcLast4();
171
+ if (($ret["last4"]) && (strlen($ret["last4"]) > 0)) { $ret["include"] = true; }
172
  $credit_card_company = $payment->getCcType();
173
  break;
174
  }
175
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  if ((is_string($cc_six)) && (strlen($cc_six)==6)) { $ret["bin"] = $cc_six; }
 
177
  return $ret;
178
  }
179
 
app/code/community/Konduto/Score/Model/System/Review.php CHANGED
@@ -3,7 +3,6 @@
3
  class Konduto_Score_Model_System_Review extends Mage_Core_Model_Config_Data {
4
 
5
  public function toOptionArray() {
6
- $opt[] = array('value' => 2, 'label' => Mage::helper('adminhtml')->__("Manual"));
7
  $opt[] = array('value' => 3, 'label' => Mage::helper('adminhtml')->__("Automatic"));
8
  return $opt;
9
  }
3
  class Konduto_Score_Model_System_Review extends Mage_Core_Model_Config_Data {
4
 
5
  public function toOptionArray() {
 
6
  $opt[] = array('value' => 3, 'label' => Mage::helper('adminhtml')->__("Automatic"));
7
  return $opt;
8
  }
app/code/community/Konduto/Score/etc/system.xml CHANGED
@@ -47,7 +47,7 @@
47
  </mode>
48
  <sandboxpublickey>
49
  <label>Sandbox Public Key</label>
50
- <comment>Enter Sandbox public key. You get this after creating an account with Konduto</comment>
51
  <frontend_type>text</frontend_type>
52
  <sort_order>3</sort_order>
53
  <show_in_default>1</show_in_default>
@@ -59,7 +59,7 @@
59
  </sandboxpublickey>
60
  <sandboxprikey>
61
  <label>Sandbox Private Key</label>
62
- <comment>Enter Sandbox private key. You get this after creating an account with Konduto</comment>
63
  <frontend_type>text</frontend_type>
64
  <sort_order>4</sort_order>
65
  <show_in_default>1</show_in_default>
@@ -71,7 +71,7 @@
71
  </sandboxprikey>
72
  <productionpublickey>
73
  <label>Production Public Key</label>
74
- <comment>Enter Production public key. You get this after creating an account with Konduto</comment>
75
  <frontend_type>text</frontend_type>
76
  <sort_order>5</sort_order>
77
  <show_in_default>1</show_in_default>
@@ -83,7 +83,7 @@
83
  </productionpublickey>
84
  <productionprikey>
85
  <label>Production Private Key</label>
86
- <comment>Enter Production Private key. You get this after creating an account with Konduto</comment>
87
  <frontend_type>text</frontend_type>
88
  <sort_order>6</sort_order>
89
  <show_in_default>1</show_in_default>
@@ -96,7 +96,6 @@
96
 
97
  <reviewaction>
98
  <label>Analysis Mode</label>
99
- <comment><![CDATA[Automatic:- Analyse every order. RECOMMENDED.<br> Manual:- Orders will be analysed manually from order datail page.]]></comment>
100
  <frontend_type>select</frontend_type>
101
  <source_model>score/system_review</source_model>
102
  <sort_order>7</sort_order>
@@ -114,7 +113,7 @@
114
  <show_in_store>1</show_in_store>
115
  </reviewupscore>
116
  <reviewloscore>
117
- <label>Approve invoice prompt</label>
118
  <comment>If the score is lower than this, do not prompt me for approval.</comment>
119
  <frontend_type>text</frontend_type>
120
  <sort_order>9</sort_order>
47
  </mode>
48
  <sandboxpublickey>
49
  <label>Sandbox Public Key</label>
50
+ <comment>TXXXXXXXXXX (11 characters)</comment>
51
  <frontend_type>text</frontend_type>
52
  <sort_order>3</sort_order>
53
  <show_in_default>1</show_in_default>
59
  </sandboxpublickey>
60
  <sandboxprikey>
61
  <label>Sandbox Private Key</label>
62
+ <comment>TXXXXXXXXXXXXXXXXXXXX (21 characters)</comment>
63
  <frontend_type>text</frontend_type>
64
  <sort_order>4</sort_order>
65
  <show_in_default>1</show_in_default>
71
  </sandboxprikey>
72
  <productionpublickey>
73
  <label>Production Public Key</label>
74
+ <comment>PXXXXXXXXXX (11 characters)</comment>
75
  <frontend_type>text</frontend_type>
76
  <sort_order>5</sort_order>
77
  <show_in_default>1</show_in_default>
83
  </productionpublickey>
84
  <productionprikey>
85
  <label>Production Private Key</label>
86
+ <comment>PXXXXXXXXXXXXXXXXXXXX (21 characters)</comment>
87
  <frontend_type>text</frontend_type>
88
  <sort_order>6</sort_order>
89
  <show_in_default>1</show_in_default>
96
 
97
  <reviewaction>
98
  <label>Analysis Mode</label>
 
99
  <frontend_type>select</frontend_type>
100
  <source_model>score/system_review</source_model>
101
  <sort_order>7</sort_order>
113
  <show_in_store>1</show_in_store>
114
  </reviewupscore>
115
  <reviewloscore>
116
+ <label>Approve recommendation prompt</label>
117
  <comment>If the score is lower than this, do not prompt me for approval.</comment>
118
  <frontend_type>text</frontend_type>
119
  <sort_order>9</sort_order>
app/locale/pt_BR/Konduto_Score.csv CHANGED
@@ -10,7 +10,8 @@
10
  "Recommendation", "Recomendação"
11
  "Konduto Analyze", "Analisar pela Konduto"
12
  "Sandbox", "Teste"
13
- "Production", "Produção"
 
14
  "Fraud Settings", "Configurações de Fraude"
15
  "Konduto score updated", "Configurações da Konduto atualizadas"
16
  "Konduto score cannot be updated", "Houve um erro ao atualizar as configurações"
@@ -42,4 +43,8 @@
42
  "If the score is lower than this, do not prompt me for approval.", "Se a pontuação for mais baixa que isto, não pedir confirmação de faturamento."
43
  "Automatic:- Analyse every order. RECOMMENDED.<br> Manual:- Orders will be analysed manually from order datail page.", "Automática: Analisa todos os pedidos. RECOMENDADO.<br> Manual: Pedidos serão analisados manualmente através da tela de detalhe de pedidos."
44
  "konduto.log file is created in var/log where you can see details of of request and response.<br> You also need to enable logging from Advance-> Developer-> Log Settings", "O arquivo konduto.log é criado em var/log e lá você poderá ver os detalhes das requisições e respostas.<br> Você também precisa habilitar o log do Magento em Advance-> Developer-> Log Settings"
45
- "<p><b>Konduto - Spot fraud with Buying Behavior</b></p><p>Konduto is a fraud detection service that helps e-commerce merchants spot fraud with Buying Behavior. We use browsing patterns to recognize fraudulent behavior on your website, so we can detect fraud even before the user submits the order.</p><br><p>For more information visit <a href='https://www.konduto.com'>www.konduto.com</a>.", "<p><b>Konduto - Detecte fraudes com Comportamento de Compra</b></p><p>A Konduto é um serviço antifraude que utiliza o comportamento de compra para detectar as fraudes. Usamos padrões de navegação para reconhecer comportamentos fraudulentos em seu site.</p><br><p>Para mais informações visite <a href='https://www.konduto.com'>www.konduto.com</a>."
 
 
 
 
10
  "Recommendation", "Recomendação"
11
  "Konduto Analyze", "Analisar pela Konduto"
12
  "Sandbox", "Teste"
13
+ "Production", "Produção",
14
+ "Analysis Mode", "Modo de Análise"
15
  "Fraud Settings", "Configurações de Fraude"
16
  "Konduto score updated", "Configurações da Konduto atualizadas"
17
  "Konduto score cannot be updated", "Houve um erro ao atualizar as configurações"
43
  "If the score is lower than this, do not prompt me for approval.", "Se a pontuação for mais baixa que isto, não pedir confirmação de faturamento."
44
  "Automatic:- Analyse every order. RECOMMENDED.<br> Manual:- Orders will be analysed manually from order datail page.", "Automática: Analisa todos os pedidos. RECOMENDADO.<br> Manual: Pedidos serão analisados manualmente através da tela de detalhe de pedidos."
45
  "konduto.log file is created in var/log where you can see details of of request and response.<br> You also need to enable logging from Advance-> Developer-> Log Settings", "O arquivo konduto.log é criado em var/log e lá você poderá ver os detalhes das requisições e respostas.<br> Você também precisa habilitar o log do Magento em Advance-> Developer-> Log Settings"
46
+ "<p><b>Konduto - Spot fraud with Buying Behavior</b></p><p>Konduto is a fraud detection service that helps e-commerce merchants spot fraud with Buying Behavior. We use browsing patterns to recognize fraudulent behavior on your website, so we can detect fraud even before the user submits the order.</p><br><p>For more information visit <a href='https://www.konduto.com'>www.konduto.com</a>.", "<p><b>Konduto - Detecte fraudes com Comportamento de Compra</b></p><p>A Konduto é um serviço antifraude que utiliza o comportamento de compra para detectar as fraudes. Usamos padrões de navegação para reconhecer comportamentos fraudulentos em seu site.</p><br><p>Para mais informações visite <a href='https://www.konduto.com'>www.konduto.com</a>."
47
+ "TXXXXXXXXXXXXXXXXXXXX (21 characters)","TXXXXXXXXXXXXXXXXXXXX (21 caracteres)"
48
+ "PXXXXXXXXXXXXXXXXXXXX (21 characters)","PXXXXXXXXXXXXXXXXXXXX (21 caracteres)"
49
+ "TXXXXXXXXXX (11 characters)","TXXXXXXXXXX (11 caracteres)"
50
+ "PXXXXXXXXXX (11 characters)","PXXXXXXXXXX (11 caracteres)"
package.xml CHANGED
@@ -1,18 +1,19 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Konduto</name>
4
- <version>1.2.1</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>- Added compatibility to some BR gateway modules</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-09-04</date>
14
- <time>19:58:11</time>
15
- <contents><target name="magecommunity"><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="9e6fa142a86c533acfdba0bb0b9af891"/><file name="Save.php" hash="bf9ea71ab97abc105b5b31577d128e4b"/><file name="Select.php" hash="7af3a6cc2f51f3c503385406d381307a"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ScoreController.php" hash="7d4fbada790473cd7a5a896ef15c0795"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="df125e243e6163fcd0a4c1401c0e18c6"/><file name="config.xml" hash="57701175b205f3a621f28b77b800f695"/><file name="system.xml" hash="3b2e6d8e5f0a675a7e26e6d8a4532513"/></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="c549e42d553ccdeeb1e1ff8e7af82194"/></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="7a031dbc59e542264fc3c7386b0e1a06"/><file name="getId.phtml" hash="e3df324fdf29fa9c48ed02a799458d51"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="pt_BR"><file name="Konduto_Score.csv" hash="d1c6be3bbd9373139526ca1897288c37"/></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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Konduto</name>
4
+ <version>1.3.0</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>- Added PayPal compatibility&#xD;
12
+ - Deprecated Manual mode</notes>
13
  <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>
14
+ <date>2014-09-15</date>
15
+ <time>16:09:05</time>
16
+ <contents><target name="magecommunity"><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="6181c3bd0488e0364c042768e17c784f"/></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="141b400a28bf7f280f2bddf582eb4949"/><file name="Save.php" hash="bf9ea71ab97abc105b5b31577d128e4b"/><file name="Select.php" hash="7af3a6cc2f51f3c503385406d381307a"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ScoreController.php" hash="7d4fbada790473cd7a5a896ef15c0795"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="df125e243e6163fcd0a4c1401c0e18c6"/><file name="config.xml" hash="57701175b205f3a621f28b77b800f695"/><file name="system.xml" hash="9946ce3210bb4b8a3cbe9761ad2604e1"/></dir><dir name="sql"><dir name="score_setup"><file name="mysql4-install-0.1.0.php" hash="81b07a2cfb4bb6910166e1f6cfa9a838"/></dir></dir><file name=".DS_Store" hash="ed5404ee4fca157855a4d89ccbfb01d6"/></dir></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="getId.phtml" hash="e3df324fdf29fa9c48ed02a799458d51"/><file name="score.phtml" hash="7a031dbc59e542264fc3c7386b0e1a06"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Konduto_Score.xml" hash="c549e42d553ccdeeb1e1ff8e7af82194"/></dir></target><target name="magelocale"><dir name="pt_BR"><file name="Konduto_Score.csv" hash="bcaaffafb83622e99489afb39c688a50"/></dir></target></contents>
17
  <compatible/>
18
  <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>
19
  </package>