Version Notes
- Portuguese (BR) translation
- Better credentials validation in admin
Download this release
Release Info
Developer | Konduto |
Extension | Konduto |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.2.0
- app/code/{local → community}/Konduto/Score/Block/Adminhtml/Order/Grid.php +0 -0
- app/code/{local → community}/Konduto/Score/Block/Product/View.php +0 -0
- app/code/{local → community}/Konduto/Score/Helper/Data.php +0 -0
- app/code/{local → community}/Konduto/Score/Helper/Order.php +2 -2
- app/code/{local → community}/Konduto/Score/Model/Mysql4/Score.php +0 -0
- app/code/{local → community}/Konduto/Score/Model/Mysql4/Score/Collection.php +0 -0
- app/code/{local → community}/Konduto/Score/Model/Observer.php +0 -0
- app/code/{local → community}/Konduto/Score/Model/Score.php +0 -0
- app/code/{local → community}/Konduto/Score/Model/System/Review.php +0 -2
- app/code/community/Konduto/Score/Model/System/Save.php +61 -0
- app/code/{local → community}/Konduto/Score/Model/System/Select.php +0 -0
- app/code/{local → community}/Konduto/Score/controllers/Adminhtml/ScoreController.php +3 -3
- app/code/{local → community}/Konduto/Score/etc/adminhtml.xml +0 -0
- app/code/{local → community}/Konduto/Score/etc/config.xml +9 -0
- app/code/{local → community}/Konduto/Score/etc/system.xml +14 -17
- app/code/{local → community}/Konduto/Score/sql/score_setup/mysql4-install-0.1.0.php +0 -0
- app/code/local/Konduto/Score/Model/System/Save.php +0 -36
- app/code/local/Konduto/Score/controllers/ScoreController.php +0 -27
- app/design/frontend/default/default/template/score/score.phtml +12 -16
- app/etc/modules/Konduto_Score.xml +1 -1
- app/locale/pt_BR/Konduto_Score.csv +45 -0
- package.xml +6 -5
app/code/{local → community}/Konduto/Score/Block/Adminhtml/Order/Grid.php
RENAMED
File without changes
|
app/code/{local → community}/Konduto/Score/Block/Product/View.php
RENAMED
File without changes
|
app/code/{local → community}/Konduto/Score/Helper/Data.php
RENAMED
File without changes
|
app/code/{local → community}/Konduto/Score/Helper/Order.php
RENAMED
@@ -111,10 +111,10 @@ class Konduto_Score_Helper_Order extends Mage_Core_Helper_Abstract {
|
|
111 |
$resp = 'curlError = ' . curl_error($curl);
|
112 |
}
|
113 |
$save = $this->saveData($data, $resp, $id);
|
114 |
-
if (Mage::getStoreConfig("scoreoptions/messages/debug")) {
|
115 |
Mage::log('request==>' . $data, NULL, 'konduto.log');
|
116 |
Mage::log('response==>' . $resp, null, 'konduto.log');
|
117 |
-
}
|
118 |
return $resp;
|
119 |
}
|
120 |
|
111 |
$resp = 'curlError = ' . curl_error($curl);
|
112 |
}
|
113 |
$save = $this->saveData($data, $resp, $id);
|
114 |
+
/* if (Mage::getStoreConfig("scoreoptions/messages/debug")) {
|
115 |
Mage::log('request==>' . $data, NULL, 'konduto.log');
|
116 |
Mage::log('response==>' . $resp, null, 'konduto.log');
|
117 |
+
}*/
|
118 |
return $resp;
|
119 |
}
|
120 |
|
app/code/{local → community}/Konduto/Score/Model/Mysql4/Score.php
RENAMED
File without changes
|
app/code/{local → community}/Konduto/Score/Model/Mysql4/Score/Collection.php
RENAMED
File without changes
|
app/code/{local → community}/Konduto/Score/Model/Observer.php
RENAMED
File without changes
|
app/code/{local → community}/Konduto/Score/Model/Score.php
RENAMED
File without changes
|
app/code/{local → community}/Konduto/Score/Model/System/Review.php
RENAMED
@@ -3,8 +3,6 @@
|
|
3 |
class Konduto_Score_Model_System_Review extends Mage_Core_Model_Config_Data {
|
4 |
|
5 |
public function toOptionArray() {
|
6 |
-
// $opt[] = array('value' => 0, 'label' => Mage::helper('adminhtml')->__("Mark as Review"));
|
7 |
-
// $opt[] = array('value' => 1, 'label' => Mage::helper('adminhtml')->__("Mark as Approve"));
|
8 |
$opt[] = array('value' => 2, 'label' => Mage::helper('adminhtml')->__("Manual"));
|
9 |
$opt[] = array('value' => 3, 'label' => Mage::helper('adminhtml')->__("Automatic"));
|
10 |
return $opt;
|
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;
|
app/code/community/Konduto/Score/Model/System/Save.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Konduto_Score_Model_System_Save extends Mage_Core_Model_Config_Data {
|
4 |
+
|
5 |
+
public function save() {
|
6 |
+
$group = $this->getData('groups');
|
7 |
+
$fields = $group['messages']['fields'];
|
8 |
+
if ($fields['activate']['value'] == 1) {
|
9 |
+
if ($fields['mode']['value'] == 1) {
|
10 |
+
$productionpublickey = $fields['productionpublickey']['value'];
|
11 |
+
$productionprikey = $fields['productionprikey']['value'];
|
12 |
+
if ($productionpublickey == NULL || $productionpublickey == ' ' || !(isset($productionpublickey))) {
|
13 |
+
Mage::throwException(Mage::helper('core')->__('Production Public key is required'));
|
14 |
+
die;
|
15 |
+
}
|
16 |
+
if ($productionprikey == NULL || $productionprikey == ' ' || !(isset($productionprikey))) {
|
17 |
+
Mage::throwException(Mage::helper('core')->__('Production Private key is required'));
|
18 |
+
die;
|
19 |
+
}
|
20 |
+
if (strlen($productionpublickey)!=11) {
|
21 |
+
Mage::throwException(Mage::helper('core')->__('Public key lenth must be 11 characters'));
|
22 |
+
die;
|
23 |
+
}
|
24 |
+
if (strlen($productionprikey)!=21) {
|
25 |
+
Mage::throwException(Mage::helper('core')->__('Private key length must be 21 characters'));
|
26 |
+
die;
|
27 |
+
}
|
28 |
+
if ((substr($productionprikey,0,1)!="P") || (substr($productionpublickey,0,1)!="P")) {
|
29 |
+
Mage::throwException(Mage::helper('core')->__('Please enter a valid Production key'));
|
30 |
+
die;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
elseif ($fields['mode']['value'] == 0) {
|
34 |
+
$sandboxpublickey = $fields['sandboxpublickey']['value'];
|
35 |
+
$sandboxprikey = $fields['sandboxprikey']['value'];
|
36 |
+
if ($sandboxpublickey == NULL || $sandboxpublickey == ' ' || !(isset($sandboxpublickey))) {
|
37 |
+
Mage::throwException(Mage::helper('core')->__('Sandbox Public key is required'));
|
38 |
+
die;
|
39 |
+
}
|
40 |
+
if ($sandboxprikey == NULL || $sandboxprikey == ' ' || !(isset($sandboxprikey))) {
|
41 |
+
Mage::throwException(Mage::helper('core')->__('Sandbox Private key is required'));
|
42 |
+
die;
|
43 |
+
}
|
44 |
+
if (strlen($sandboxpublickey)!=11) {
|
45 |
+
Mage::throwException(Mage::helper('core')->__('Public key lenth must be 11 characters'));
|
46 |
+
die;
|
47 |
+
}
|
48 |
+
if (strlen($sandboxprikey)!=21) {
|
49 |
+
Mage::throwException(Mage::helper('core')->__('Private key length must be 21 characters'));
|
50 |
+
die;
|
51 |
+
}
|
52 |
+
if ((substr($sandboxprikey,0,1)!="T") || (substr($sandboxpublickey,0,1)!="T")) {
|
53 |
+
Mage::throwException(Mage::helper('core')->__('Please enter a valid Sandbox key'));
|
54 |
+
die;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
58 |
+
return parent::save();
|
59 |
+
}
|
60 |
+
|
61 |
+
}
|
app/code/{local → community}/Konduto/Score/Model/System/Select.php
RENAMED
File without changes
|
app/code/{local → community}/Konduto/Score/controllers/Adminhtml/ScoreController.php
RENAMED
@@ -18,12 +18,12 @@ class Konduto_Score_Adminhtml_ScoreController extends Mage_Adminhtml_Controller_
|
|
18 |
$order = Mage::getModel('sales/order')->load($orderId);
|
19 |
try {
|
20 |
$setScore = Mage::helper('score/order')->getOrderData($order, $visitor);
|
21 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('score')->__('Konduto score
|
22 |
} catch (Exception $e) {
|
23 |
-
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('score')->__('Konduto score
|
24 |
}
|
25 |
} else {
|
26 |
-
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('score')->__('Konduto visitor
|
27 |
}
|
28 |
$this->_redirectReferer();
|
29 |
return;
|
18 |
$order = Mage::getModel('sales/order')->load($orderId);
|
19 |
try {
|
20 |
$setScore = Mage::helper('score/order')->getOrderData($order, $visitor);
|
21 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('score')->__('Konduto score updated'));
|
22 |
} catch (Exception $e) {
|
23 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('score')->__('Konduto score cannot be updated'));
|
24 |
}
|
25 |
} else {
|
26 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('score')->__('Konduto visitor ID missing'));
|
27 |
}
|
28 |
$this->_redirectReferer();
|
29 |
return;
|
app/code/{local → community}/Konduto/Score/etc/adminhtml.xml
RENAMED
File without changes
|
app/code/{local → community}/Konduto/Score/etc/config.xml
RENAMED
@@ -57,6 +57,15 @@
|
|
57 |
</score>
|
58 |
</updates>
|
59 |
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
</adminhtml>
|
61 |
<global>
|
62 |
<models>
|
57 |
</score>
|
58 |
</updates>
|
59 |
</layout>
|
60 |
+
<translate>
|
61 |
+
<modules>
|
62 |
+
<Konduto_Score>
|
63 |
+
<files>
|
64 |
+
<default>Konduto_Score.csv</default>
|
65 |
+
</files>
|
66 |
+
</Konduto_Score>
|
67 |
+
</modules>
|
68 |
+
</translate>
|
69 |
</adminhtml>
|
70 |
<global>
|
71 |
<models>
|
app/code/{local → community}/Konduto/Score/etc/system.xml
RENAMED
@@ -1,14 +1,14 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
<tabs>
|
4 |
-
<scoreconfig
|
5 |
<label>Konduto</label>
|
6 |
<sort_order>9</sort_order>
|
7 |
</scoreconfig>
|
8 |
</tabs>
|
9 |
<sections>
|
10 |
<scoreoptions translate="label" module="score">
|
11 |
-
<label>
|
12 |
<tab>scoreconfig</tab>
|
13 |
<frontend_type>text</frontend_type>
|
14 |
<sort_order>8000</sort_order>
|
@@ -16,8 +16,8 @@
|
|
16 |
<show_in_website>1</show_in_website>
|
17 |
<show_in_store>1</show_in_store>
|
18 |
<groups>
|
19 |
-
<messages translate="label">
|
20 |
-
<label>Konduto Fraud Detection Settings</label>
|
21 |
<frontend_type>text</frontend_type>
|
22 |
<sort_order>1</sort_order>
|
23 |
<show_in_default>1</show_in_default>
|
@@ -37,7 +37,7 @@
|
|
37 |
</activate>
|
38 |
<mode>
|
39 |
<label>Mode</label>
|
40 |
-
<comment>Switch between
|
41 |
<frontend_type>select</frontend_type>
|
42 |
<source_model>score/system_select</source_model>
|
43 |
<sort_order>2</sort_order>
|
@@ -47,7 +47,7 @@
|
|
47 |
</mode>
|
48 |
<sandboxpublickey>
|
49 |
<label>Sandbox Public Key</label>
|
50 |
-
<comment>Enter
|
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
|
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
|
75 |
<frontend_type>text</frontend_type>
|
76 |
<sort_order>5</sort_order>
|
77 |
<show_in_default>1</show_in_default>
|
@@ -95,7 +95,7 @@
|
|
95 |
</productionprikey>
|
96 |
|
97 |
<reviewaction>
|
98 |
-
<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>
|
@@ -105,8 +105,8 @@
|
|
105 |
<show_in_store>1</show_in_store>
|
106 |
</reviewaction>
|
107 |
<reviewupscore>
|
108 |
-
<label>Decline
|
109 |
-
<comment>If score is higher than this, prompt me for approval.</comment>
|
110 |
<frontend_type>text</frontend_type>
|
111 |
<sort_order>8</sort_order>
|
112 |
<show_in_default>1</show_in_default>
|
@@ -136,7 +136,7 @@
|
|
136 |
</messages>
|
137 |
</groups>
|
138 |
</scoreoptions>
|
139 |
-
<scoreinfo translate="label" module="score">
|
140 |
<label>About Us</label>
|
141 |
<tab>scoreconfig</tab>
|
142 |
<sort_order>8001</sort_order>
|
@@ -144,12 +144,9 @@
|
|
144 |
<show_in_website>1</show_in_website>
|
145 |
<show_in_store>1</show_in_store>
|
146 |
<groups>
|
147 |
-
<extensions translate="label">
|
148 |
<label>About Konduto</label>
|
149 |
-
<comment><![CDATA[<p><b>Konduto - Spot fraud with Buying Behavior</b></p><p>Konduto is a fraud detection
|
150 |
-
service that helps e-commerce merchants spot fraud with Buying Behavior. We use browsing patterns to recognize fraudulent behavior on your
|
151 |
-
website, so we can detect fraud even before the user submits the order.</p><br><p>For more information visit <a
|
152 |
-
href="https://www.konduto.com">www.konduto.com</a>.]]></comment>
|
153 |
<sort_order>101</sort_order>
|
154 |
<show_in_default>1</show_in_default>
|
155 |
<show_in_website>1</show_in_website>
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
<tabs>
|
4 |
+
<scoreconfig module="score">
|
5 |
<label>Konduto</label>
|
6 |
<sort_order>9</sort_order>
|
7 |
</scoreconfig>
|
8 |
</tabs>
|
9 |
<sections>
|
10 |
<scoreoptions translate="label" module="score">
|
11 |
+
<label>Fraud Settings</label>
|
12 |
<tab>scoreconfig</tab>
|
13 |
<frontend_type>text</frontend_type>
|
14 |
<sort_order>8000</sort_order>
|
16 |
<show_in_website>1</show_in_website>
|
17 |
<show_in_store>1</show_in_store>
|
18 |
<groups>
|
19 |
+
<messages translate="label comment">
|
20 |
+
<label>Konduto - Fraud Detection Settings</label>
|
21 |
<frontend_type>text</frontend_type>
|
22 |
<sort_order>1</sort_order>
|
23 |
<show_in_default>1</show_in_default>
|
37 |
</activate>
|
38 |
<mode>
|
39 |
<label>Mode</label>
|
40 |
+
<comment>Switch between Sandbox and Production modes</comment>
|
41 |
<frontend_type>select</frontend_type>
|
42 |
<source_model>score/system_select</source_model>
|
43 |
<sort_order>2</sort_order>
|
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 |
</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 |
</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>
|
95 |
</productionprikey>
|
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>
|
105 |
<show_in_store>1</show_in_store>
|
106 |
</reviewaction>
|
107 |
<reviewupscore>
|
108 |
+
<label>Decline recommendation prompt</label>
|
109 |
+
<comment>If score is higher than this, prompt me for approval during invoicing.</comment>
|
110 |
<frontend_type>text</frontend_type>
|
111 |
<sort_order>8</sort_order>
|
112 |
<show_in_default>1</show_in_default>
|
136 |
</messages>
|
137 |
</groups>
|
138 |
</scoreoptions>
|
139 |
+
<scoreinfo translate="label comment" module="score">
|
140 |
<label>About Us</label>
|
141 |
<tab>scoreconfig</tab>
|
142 |
<sort_order>8001</sort_order>
|
144 |
<show_in_website>1</show_in_website>
|
145 |
<show_in_store>1</show_in_store>
|
146 |
<groups>
|
147 |
+
<extensions translate="label comment">
|
148 |
<label>About Konduto</label>
|
149 |
+
<comment><![CDATA[<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>.]]></comment>
|
|
|
|
|
|
|
150 |
<sort_order>101</sort_order>
|
151 |
<show_in_default>1</show_in_default>
|
152 |
<show_in_website>1</show_in_website>
|
app/code/{local → community}/Konduto/Score/sql/score_setup/mysql4-install-0.1.0.php
RENAMED
File without changes
|
app/code/local/Konduto/Score/Model/System/Save.php
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Konduto_Score_Model_System_Save extends Mage_Core_Model_Config_Data {
|
4 |
-
|
5 |
-
public function save() {
|
6 |
-
$group = $this->getData('groups');
|
7 |
-
$fields = $group['messages']['fields'];
|
8 |
-
if ($fields['activate']['value'] == 1) {
|
9 |
-
if ($fields['mode']['value'] == 1) {
|
10 |
-
$productionpublickey = $fields['productionpublickey']['value'];
|
11 |
-
$productionprikey = $fields['productionprikey']['value'];
|
12 |
-
if ($productionprikey == NULL || $productionprikey == ' ' || !(isset($productionprikey))) {
|
13 |
-
Mage::throwException(Mage::helper('core')->__('Production private key is required'));
|
14 |
-
die;
|
15 |
-
}
|
16 |
-
if ($productionpublickey == NULL || $productionpublickey == ' ' || !(isset($productionpublickey))) {
|
17 |
-
Mage::throwException(Mage::helper('core')->__('Production public key is required'));
|
18 |
-
die;
|
19 |
-
}
|
20 |
-
} elseif ($fields['mode']['value'] == 0) {
|
21 |
-
$sandboxpublickey = $fields['sandboxpublickey']['value'];
|
22 |
-
$sandboxprikey = $fields['sandboxprikey']['value'];
|
23 |
-
if ($sandboxprikey == NULL || $sandboxprikey == ' ' || !(isset($sandboxprikey))) {
|
24 |
-
Mage::throwException(Mage::helper('core')->__('Sandbox private key is required'));
|
25 |
-
die;
|
26 |
-
}
|
27 |
-
if ($sandboxpublickey == NULL || $sandboxpublickey == ' ' || !(isset($sandboxpublickey))) {
|
28 |
-
Mage::throwException(Mage::helper('core')->__('Sandbox public key is required'));
|
29 |
-
die;
|
30 |
-
}
|
31 |
-
}
|
32 |
-
}
|
33 |
-
return parent::save();
|
34 |
-
}
|
35 |
-
|
36 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Konduto/Score/controllers/ScoreController.php
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Konduto_Score_ScoreController extends Mage_Core_Controller_Front_Action {
|
4 |
-
|
5 |
-
public function webAction() {
|
6 |
-
$post = json_decode(file_get_contents("php://input"),true);
|
7 |
-
|
8 |
-
define("PRIVATE_KEY", "T01234567890123456789");
|
9 |
-
$request = json_decode($post, true);
|
10 |
-
$hash = $request["hash"];
|
11 |
-
unset($request["hash"]);
|
12 |
-
|
13 |
-
ksort($request);
|
14 |
-
|
15 |
-
$string = http_build_query($request);
|
16 |
-
if (Mage::getStoreConfig("scoreoptions/messages/debug")) {
|
17 |
-
Mage::log('Webhook Post==>' . $request, NULL, 'konduto.log');
|
18 |
-
}
|
19 |
-
print_r($post);
|
20 |
-
if ($hash === hash_hmac("sha256", $string, PRIVATE_KEY)) {
|
21 |
-
http_response_code(200);
|
22 |
-
} else {
|
23 |
-
http_response_code(400);
|
24 |
-
}
|
25 |
-
}
|
26 |
-
|
27 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/template/score/score.phtml
CHANGED
@@ -1,21 +1,17 @@
|
|
1 |
<?php
|
2 |
$mode = Mage::getStoreConfig('scoreoptions/messages/mode');
|
3 |
-
if ($mode == 1) {
|
4 |
-
|
5 |
-
} else {
|
6 |
-
$public = Mage::getStoreConfig('scoreoptions/messages/sandboxpublickey');
|
7 |
-
}
|
8 |
?>
|
|
|
9 |
<script type="text/javascript">
|
10 |
-
var __kdt = __kdt || [];
|
11 |
-
__kdt.push({"public_key": "<?php echo $public ?>"});
|
12 |
-
(function() {
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
s.parentNode.insertBefore(kdt, s);
|
20 |
-
})();
|
21 |
</script>
|
1 |
<?php
|
2 |
$mode = Mage::getStoreConfig('scoreoptions/messages/mode');
|
3 |
+
if ($mode == 1) { $public = Mage::getStoreConfig('scoreoptions/messages/productionpublickey'); }
|
4 |
+
else { $public = Mage::getStoreConfig('scoreoptions/messages/sandboxpublickey'); }
|
|
|
|
|
|
|
5 |
?>
|
6 |
+
|
7 |
<script type="text/javascript">
|
8 |
+
var __kdt = __kdt || [];
|
9 |
+
__kdt.push({"public_key": "<?php echo $public ?>"});
|
10 |
+
(function() {
|
11 |
+
var kdt = document.createElement("script");
|
12 |
+
kdt.id = "kdtjs"; kdt.type = "text/javascript"; kdt.async = true;
|
13 |
+
kdt.src = "https://d46w1m9rlmw15.cloudfront.net/k.js";
|
14 |
+
var s = document.getElementsByTagName("body")[0];
|
15 |
+
s.parentNode.insertBefore(kdt, s);
|
16 |
+
})();
|
|
|
|
|
17 |
</script>
|
app/etc/modules/Konduto_Score.xml
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<modules>
|
4 |
<Konduto_Score>
|
5 |
<active>true</active>
|
6 |
-
<codePool>
|
7 |
</Konduto_Score>
|
8 |
</modules>
|
9 |
</config>
|
3 |
<modules>
|
4 |
<Konduto_Score>
|
5 |
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
</Konduto_Score>
|
8 |
</modules>
|
9 |
</config>
|
app/locale/pt_BR/Konduto_Score.csv
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"About Us", "Sobre"
|
2 |
+
"About Konduto", "Sobre a Konduto"
|
3 |
+
"Enable", "Habilitado"
|
4 |
+
"No","Não"
|
5 |
+
"Yes","Sim"
|
6 |
+
"Mode","Ambiente"
|
7 |
+
"Automatic","Automático"
|
8 |
+
"Manual","Manual"
|
9 |
+
"Score", "Pontuação"
|
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"
|
17 |
+
"Konduto visitor ID missing", "ID do visitante não foi encontrado"
|
18 |
+
"Are you sure you want to Invoice this order? Konduto Recommends to ", "Tem certeza que deseja Faturar este pedido? A Konduto recomenda "
|
19 |
+
"Production Private key is required", "Chave privada de Produção é obrigatória"
|
20 |
+
"Sandbox Public key is required", "Chave pública de Teste é obrigatória"
|
21 |
+
"Production Public key is required", "Chave pública de Produção é obrigatória"
|
22 |
+
"Sandbox Private key is required", "Chave privada de Teste é obrigatória"
|
23 |
+
"Public key lenth must be 11 characters", "Chave pública deve ter 11 caracteres"
|
24 |
+
"Private key length must be 21 characters", "Chave privada dete ter 21 caracteres"
|
25 |
+
"Please enter a valid Production key", "Por favor digite uma chave de Produção válida"
|
26 |
+
"Please enter a valid Sandbox key", "Por favor digite uma chave de Teste válida"
|
27 |
+
"Konduto - Fraud Detection Settings", "Konduto - Configurações de Antifraude"
|
28 |
+
"Enable or Disable Konduto", "Habilitar ou Desabilitar a Konduto"
|
29 |
+
"Switch between Sandbox and Production modes", "Alternar entre os modos de Teste e Produção"
|
30 |
+
"Sandbox Public Key", "Chave Pública de Teste"
|
31 |
+
"Enter Sandbox public key. You get this after creating an account with Konduto", "Digite a chave pública de Teste. Você recebe esta informação ao criar uma conta na Konduto"
|
32 |
+
"Sandbox Private Key", "Chave Privada de Teste"
|
33 |
+
"Enter Sandbox private key. You get this after creating an account with Konduto", "Digite a chave privada de Teste. Você recebe esta informação ao criar uma conta na Konduto"
|
34 |
+
"Production Public Key", "Chave Pública de Produção"
|
35 |
+
"Enter Production public key. You get this after creating an account with Konduto", "Digite a chave pública de Produção. Você recebe esta informação ao criar uma conta na Konduto"
|
36 |
+
"Production Private Key", "Chave Privada de Produção"
|
37 |
+
"Enter Production Private key. You get this after creating an account with Konduto", "Digite a chave privada de Produção. Você recebe esta informação ao criar uma conta na Konduto"
|
38 |
+
"Behaviour", "Tipo de Análise"
|
39 |
+
"Decline recommendation prompt", "Confirmação de pedido negado"
|
40 |
+
"If score is higher than this, prompt me for approval during invoicing.", "Se a pontuação for mais alta que isto, confirmar o faturamento."
|
41 |
+
"Approve recommendation prompt", "Confirmação de pedido aprovado"
|
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>."
|
package.xml
CHANGED
@@ -1,18 +1,19 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Konduto</name>
|
4 |
-
<version>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-
|
14 |
-
<time>
|
15 |
-
<contents><target name="
|
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.2.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>- Portuguese (BR) translation
|
12 |
+
- Better credentials validation in admin</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-03</date>
|
15 |
+
<time>13:52:52</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="038490e3e2b4cee453254992a40774f2"/></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="cd14b64c773b7def67ee66f591c7deaa"/><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>
|
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>
|