Eye4Fraud_Connector_integration - Version 1.2.6

Version Notes

- Implemented support for the payment method "Saved CC".
- New setting "Cancel Order" added to extension configuration. It allow to cancel not completed order if fraud status received
- Log file rotation implemented

Download this release

Release Info

Developer Shloimy Stauber
Extension Eye4Fraud_Connector_integration
Version 1.2.6
Comparing to
See all releases


Code changes from version 1.2.5 to 1.2.6

app/code/local/Eye4Fraud/Connector/Helper/Data.php CHANGED
@@ -20,21 +20,32 @@ class Eye4Fraud_Connector_Helper_Data
20
  const PAYMENT_METHOD_USAEPAY = 'usaepay';
21
  const MAGENTO_VERSION_1_7 = '1.7'; //This is run through version_compare()
22
 
 
 
 
 
 
 
23
  /**
24
  * List of statuses allowed to save in DB
25
  * @var array
26
  */
27
  protected $finalStatuses = array('A','D','I','C','F','M','INV','ALW', 'Q');
28
 
 
 
 
 
 
29
  /**
30
  * Returns store config item
31
- * @param string $str
32
  * @param null $store_id
33
  * @return string
34
  */
35
- public function getConfig($str='', $store_id=null)
36
  {
37
- if($str) return Mage::getStoreConfig('eye4fraud_connector/'.$str, $store_id);
38
  if (empty($this->_config)){
39
  $this->_config = Mage::getStoreConfig('eye4fraud_connector', $store_id);
40
  }
@@ -70,6 +81,10 @@ class Eye4Fraud_Connector_Helper_Data
70
  return $this->fileSizeConvert(filesize($log_file_path));
71
  }
72
 
 
 
 
 
73
  public function getLogFilePath(){
74
  return Mage::getBaseDir('log').'/'.$this->_logFile;
75
  }
@@ -81,7 +96,7 @@ class Eye4Fraud_Connector_Helper_Data
81
  public function isEnabled(){
82
  // Check if soap client exists - if not, we cannot enable the module
83
  if (!$this->hasSoapClient()) return false;
84
- if (!Mage::helper('core/data')->isModuleOutputEnabled('Eye4Fraud_Connector')) return false;
85
  return (bool)$this->getConfig('general/enabled');
86
  }
87
 
@@ -596,7 +611,7 @@ class Eye4Fraud_Connector_Helper_Data
596
  * @return string human readable file size (2,87 Мб)
597
  * @author Mogilev Arseny
598
  */
599
- protected function fileSizeConvert($bytes){
600
  $bytes = floatval($bytes);
601
  $arBytes = array(
602
  0 => array(
@@ -633,4 +648,109 @@ class Eye4Fraud_Connector_Helper_Data
633
  return $result;
634
  }
635
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
636
  }
20
  const PAYMENT_METHOD_USAEPAY = 'usaepay';
21
  const MAGENTO_VERSION_1_7 = '1.7'; //This is run through version_compare()
22
 
23
+ /**
24
+ * Cancelled status equal to cancelled state
25
+ * @var string
26
+ */
27
+ protected $cancelledStatus;
28
+
29
  /**
30
  * List of statuses allowed to save in DB
31
  * @var array
32
  */
33
  protected $finalStatuses = array('A','D','I','C','F','M','INV','ALW', 'Q');
34
 
35
+ public function __construct() {
36
+ $sales_config = Mage::getSingleton('sales/order_config');
37
+ $this->cancelledStatus = $sales_config->getStateDefaultStatus(Mage_Sales_Model_Order::STATE_CANCELED);
38
+ }
39
+
40
  /**
41
  * Returns store config item
42
+ * @param string $config_path
43
  * @param null $store_id
44
  * @return string
45
  */
46
+ public function getConfig($config_path='', $store_id=null)
47
  {
48
+ if($config_path) return Mage::getStoreConfig('eye4fraud_connector/'.$config_path, $store_id);
49
  if (empty($this->_config)){
50
  $this->_config = Mage::getStoreConfig('eye4fraud_connector', $store_id);
51
  }
81
  return $this->fileSizeConvert(filesize($log_file_path));
82
  }
83
 
84
+ /**
85
+ * Get path to log file
86
+ * @return string
87
+ */
88
  public function getLogFilePath(){
89
  return Mage::getBaseDir('log').'/'.$this->_logFile;
90
  }
96
  public function isEnabled(){
97
  // Check if soap client exists - if not, we cannot enable the module
98
  if (!$this->hasSoapClient()) return false;
99
+ if (!$this->isModuleOutputEnabled('Eye4Fraud_Connector')) return false;
100
  return (bool)$this->getConfig('general/enabled');
101
  }
102
 
611
  * @return string human readable file size (2,87 Мб)
612
  * @author Mogilev Arseny
613
  */
614
+ public function fileSizeConvert($bytes){
615
  $bytes = floatval($bytes);
616
  $arBytes = array(
617
  0 => array(
648
  return $result;
649
  }
650
 
651
+ /**
652
+ * Try to cancel order if fraud is detected
653
+ * @param Eye4Fraud_Connector_Model_Status $status_item
654
+ * @param Mage_Sales_Model_Order $order
655
+ */
656
+ public function cancelOrder($status_item, $order = null){
657
+ if($this->getConfig("general/cancel_order")!='1') return;
658
+
659
+ if(!is_null($order) and $order->getStatus()==$this->cancelledStatus) return;
660
+
661
+ if($status_item->getData('status')=='F'){
662
+ $this->log('Fraud status detected, cancelling order');
663
+ if(is_null($order)){
664
+ $order = Mage::getModel('sales/order');
665
+ $order->loadByIncrementId($status_item->getData('order_id'));
666
+ }
667
+
668
+ if($order->getStatus()==$this->cancelledStatus) return;
669
+
670
+ if(!$order->isEmpty()){
671
+ if($order->canCancel()){
672
+ $order->cancel();
673
+ $this->log('Order cancelled, state '.$order->getState().' status '.$order->getStatus());
674
+ $order->save();
675
+ }
676
+ else{
677
+ $this->log('Order was not cancelled, state '.$order->getState().' status '.$order->getStatus());
678
+ }
679
+ }
680
+ else{
681
+ $this->log('Error while loading order #'.$status_item->getData('order_id').' Order was not cancelled');
682
+ }
683
+ }
684
+ }
685
+
686
+ /**
687
+ * Compress file
688
+ * @param string $source Source file
689
+ * @param string $dest Destination file
690
+ * @param bool $level Compression level and method
691
+ * @return bool|string
692
+ */
693
+ protected function gzCompressFile($source, $dest, $level=false){
694
+ $mode='wb'.$level;
695
+ $error=false;
696
+ if($fp_out=gzopen($dest,$mode)){
697
+ if($fp_in=fopen($source,'rb')){
698
+ while(!feof($fp_in))
699
+ gzwrite($fp_out,fread($fp_in,1024*512));
700
+ fclose($fp_in);
701
+ }
702
+ else $error=true;
703
+ gzclose($fp_out);
704
+ }
705
+ else $error=true;
706
+ if($error) return false;
707
+ else return $dest;
708
+ }
709
+
710
+ /**
711
+ * Rotate current Log File
712
+ */
713
+ public function rotateLogFile(){
714
+ $log_files_count = intval($this->getConfig('general/debug_file_count'));
715
+ // If log files should rotate
716
+ if($log_files_count>0){
717
+ // Remove old log file
718
+ $old_file = $this->getLogFilePath().$log_files_count.'.gz';
719
+ if(file_exists($old_file)){
720
+ unlink($old_file);
721
+ if(file_exists($old_file)){
722
+ $this->log("Can't remove old log file: ".$old_file);
723
+ $this->log("Log file rotation stopped");
724
+ return;
725
+ }
726
+ }
727
+ }
728
+ else{
729
+ $log_files_count = 1;
730
+ while(file_exists($this->getLogFilePath().$log_files_count.'.gz')){
731
+ $log_files_count++;
732
+ }
733
+ }
734
+ // Rotate other compressed log files
735
+ for($i=$log_files_count-1; $i > 0; $i--){
736
+ if(file_exists($this->getLogFilePath().$i.'.gz')) {
737
+ rename($this->getLogFilePath().$i.'.gz', $this->getLogFilePath().($i+1).'.gz');
738
+ }
739
+ }
740
+ // Compress current log file
741
+ $this->gzCompressFile($this->getLogFilePath(), $this->getLogFilePath().'1.gz', 5);
742
+ if(file_exists($this->getLogFilePath().'1.gz')){
743
+ try{
744
+ unlink($this->getLogFilePath());
745
+ }
746
+ catch (Exception $exception){
747
+ $this->log("Error while delete log file: ".$exception->getMessage());
748
+ }
749
+ $this->log("Log File reached a max size and was compressed");
750
+ }
751
+ else{
752
+ $this->log("Can't compress current log file");
753
+ }
754
+
755
+ }
756
  }
app/code/local/Eye4Fraud/Connector/Model/Config/Frontend/Logfile.php CHANGED
@@ -19,9 +19,31 @@ class Eye4Fraud_Connector_Model_Config_Frontend_Logfile extends Mage_Adminhtml_B
19
  if(!$logfile_size) return $this->__('Log file not exists or empty');
20
  $element->setData('value', '[dummy]');
21
  $html = parent::render($element);
22
- $value = '<a href="'.$this->getUrl('*/eye4fraud/logfile').'" target="_blank">Download</a>&nbsp;<input type="hidden" value="0" id="eye4fraud_connector_general_debug_file"><span>Log file size: '.$logfile_size.'</span>';
 
 
 
 
 
23
  $html = str_replace('[dummy]',$value, $html);
24
  return $html;
25
  }
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  }
19
  if(!$logfile_size) return $this->__('Log file not exists or empty');
20
  $element->setData('value', '[dummy]');
21
  $html = parent::render($element);
22
+ $value = '<a href="'.$this->getUrl('*/eye4fraud/logfile').'" target="_blank">Download Log File</a>&nbsp;<input type="hidden" value="0" id="eye4fraud_connector_general_debug_file"><span>Log file size: '.$logfile_size.'</span>';
23
+
24
+ if($helper->getConfig('general/debug_file_rotate')=='1'){
25
+ $value .= $this->generateLogFiles();
26
+ }
27
+
28
  $html = str_replace('[dummy]',$value, $html);
29
  return $html;
30
  }
31
 
32
+ /**
33
+ * Generate links to compressed old log files
34
+ */
35
+ protected function generateLogFiles(){
36
+ $helper = Mage::helper('eye4fraud_connector');
37
+ $links = array('');
38
+ $log_files_count = intval($helper->getConfig('general/debug_file_count'));
39
+ $i = 1;
40
+ while(file_exists($helper->getLogFilePath().$i.'.gz') and ($log_files_count==0 or $i<=$log_files_count)){
41
+ $logfile_size = $helper->fileSizeConvert(filesize($helper->getLogFilePath().$i.'.gz'));
42
+ $date = Mage::getModel('core/date')->date('Y-m-d H:i:s', filemtime($helper->getLogFilePath().$i.'.gz'));
43
+ $links[] = '<a href="'.$this->getUrl('*/eye4fraud/logfile/idx/'.$i).'" target="_blank">Old Log #'.$i.'</a><br><span>File size: '.$logfile_size.' Date: '.$date.'</span>';
44
+ $i ++;
45
+ }
46
+ return implode('<br>',$links);
47
+ }
48
+
49
  }
app/code/local/Eye4Fraud/Connector/Model/Observer.php CHANGED
@@ -17,6 +17,8 @@ class Eye4Fraud_Connector_Model_Observer
17
  */
18
  protected $ordersStatuses = array();
19
 
 
 
20
  /**
21
  * Magento class constructor
22
  * @return void
@@ -90,6 +92,7 @@ class Eye4Fraud_Connector_Model_Observer
90
  $helper->log("Payment method name: ".$payment_method);
91
 
92
  if(!in_array($payment_method,array(
 
93
  $helper::PAYMENT_METHOD_USAEPAY,
94
  Mage_Paypal_Model_Config::METHOD_PAYFLOWPRO,
95
  Mage_Paypal_Model_Config::METHOD_WPP_DIRECT,
@@ -330,7 +333,7 @@ class Eye4Fraud_Connector_Model_Observer
330
  'SiteName' => $config["api_settings"]['api_site_name'],
331
  'ApiLogin' => $config["api_settings"]['api_login'],
332
  'ApiKey' => $config["api_settings"]['api_key'],
333
- 'TransactionId' => $transId,
334
  'OrderDate' => $order->getCreatedAt(),
335
  'OrderNumber' => $order->getIncrementId(),
336
  'IPAddress' => !empty($remoteIp) ? $remoteIp : $_SERVER['REMOTE_ADDR'],
@@ -367,8 +370,8 @@ class Eye4Fraud_Connector_Model_Observer
367
  'RawCCType' => $card_type,
368
  'CCFirst6' => substr($cc_number, 0, 6),
369
  'CCLast4' => substr($cc_number, -4),
370
- 'CIDResponse' => $payment->cc_cid_status, //'M',
371
- 'AVSCode' => $payment->cc_avs_status, //'Y',
372
  'LineItems' => $line_items,
373
 
374
  'ShippingMethod' => $helper->mapShippingMethod($shippingMethod),
@@ -547,7 +550,8 @@ class Eye4Fraud_Connector_Model_Observer
547
  * @param array $event
548
  */
549
  public function prepareFraudStatuses($event){
550
- if (!$this->_getHelper()->isEnabled()) return;
 
551
 
552
  /** @var Mage_Sales_Model_Resource_Order_Grid_Collection $ordersCollection */
553
  $ordersCollection = $event['order_grid_collection'];
@@ -558,7 +562,9 @@ class Eye4Fraud_Connector_Model_Observer
558
  // Update statuses in the currently loaded orders grid collection
559
  /** @var Mage_Sales_Model_Order $order */
560
  if($ordersCollection) foreach($ordersCollection as $order){
 
561
  $item = $statusesCollection->getItemById($order->getIncrementId());
 
562
  $status_text = $this->_getHelper()->__('status:'.$item->getData('status'));
563
  if($order->getData('eye4fraud_status') != $status_text) {
564
  $order->setData('eye4fraud_status', $status_text);
@@ -570,11 +576,18 @@ class Eye4Fraud_Connector_Model_Observer
570
  * Refresh fraud status in cron job
571
  */
572
  public function cronRefreshStatus(){
573
- if (!$this->_getHelper()->isEnabled()) return;
 
574
 
575
  if(!count(Mage::app()->getTranslator()->getData())) Mage::app()->getTranslator()->init('adminhtml');
576
 
577
- $helper = Mage::helper('eye4fraud_connector');
 
 
 
 
 
 
578
  $helper->log("Start cron job ".date("d-m-Y H:i"));
579
 
580
  $helper->sendRequests();
@@ -587,6 +600,10 @@ class Eye4Fraud_Connector_Model_Observer
587
  $helper->log("Processed records: ".json_encode($records_count));
588
  //$helper->log("Query: ".$statusesCollection->getSelect()->assemble());
589
 
 
 
 
 
590
  $helper->log("Cron job finished ".date("d-m-Y H:i"));
591
  }
592
 
17
  */
18
  protected $ordersStatuses = array();
19
 
20
+ protected $card_save_method_code = 'ccsave';
21
+
22
  /**
23
  * Magento class constructor
24
  * @return void
92
  $helper->log("Payment method name: ".$payment_method);
93
 
94
  if(!in_array($payment_method,array(
95
+ $this->card_save_method_code,
96
  $helper::PAYMENT_METHOD_USAEPAY,
97
  Mage_Paypal_Model_Config::METHOD_PAYFLOWPRO,
98
  Mage_Paypal_Model_Config::METHOD_WPP_DIRECT,
333
  'SiteName' => $config["api_settings"]['api_site_name'],
334
  'ApiLogin' => $config["api_settings"]['api_login'],
335
  'ApiKey' => $config["api_settings"]['api_key'],
336
+ 'TransactionId' => is_null($transId)?0:$transId,
337
  'OrderDate' => $order->getCreatedAt(),
338
  'OrderNumber' => $order->getIncrementId(),
339
  'IPAddress' => !empty($remoteIp) ? $remoteIp : $_SERVER['REMOTE_ADDR'],
370
  'RawCCType' => $card_type,
371
  'CCFirst6' => substr($cc_number, 0, 6),
372
  'CCLast4' => substr($cc_number, -4),
373
+ 'CIDResponse' => is_null($payment->cc_cid_status)?'P':$payment->cc_cid_status, //'M',
374
+ 'AVSCode' => is_null($payment->cc_avs_status)?'P':$payment->cc_avs_status, //'Y',
375
  'LineItems' => $line_items,
376
 
377
  'ShippingMethod' => $helper->mapShippingMethod($shippingMethod),
550
  * @param array $event
551
  */
552
  public function prepareFraudStatuses($event){
553
+ $helper = $this->_getHelper();
554
+ if (!$helper->isEnabled()) return;
555
 
556
  /** @var Mage_Sales_Model_Resource_Order_Grid_Collection $ordersCollection */
557
  $ordersCollection = $event['order_grid_collection'];
562
  // Update statuses in the currently loaded orders grid collection
563
  /** @var Mage_Sales_Model_Order $order */
564
  if($ordersCollection) foreach($ordersCollection as $order){
565
+ /** @var Eye4Fraud_Connector_Model_Status $item */
566
  $item = $statusesCollection->getItemById($order->getIncrementId());
567
+ $helper->cancelOrder($item, $order);
568
  $status_text = $this->_getHelper()->__('status:'.$item->getData('status'));
569
  if($order->getData('eye4fraud_status') != $status_text) {
570
  $order->setData('eye4fraud_status', $status_text);
576
  * Refresh fraud status in cron job
577
  */
578
  public function cronRefreshStatus(){
579
+ $helper = $this->_getHelper();
580
+ if (!$helper->isEnabled()) return;
581
 
582
  if(!count(Mage::app()->getTranslator()->getData())) Mage::app()->getTranslator()->init('adminhtml');
583
 
584
+ if($helper->getConfig('general/debug_mode')=='1' and
585
+ $helper->getConfig('general/debug_file_rotate')=='1'
586
+ and floatval($helper->getLogSize())>floatval($helper->getConfig('general/debug_file_max_size'))
587
+ ){
588
+ $helper->rotateLogFile();
589
+ }
590
+
591
  $helper->log("Start cron job ".date("d-m-Y H:i"));
592
 
593
  $helper->sendRequests();
600
  $helper->log("Processed records: ".json_encode($records_count));
601
  //$helper->log("Query: ".$statusesCollection->getSelect()->assemble());
602
 
603
+ if($helper->getConfig("general/cancel_order")=='1') foreach($statusesCollection as $status){
604
+ $helper->cancelOrder($status);
605
+ };
606
+
607
  $helper->log("Cron job finished ".date("d-m-Y H:i"));
608
  }
609
 
app/code/local/Eye4Fraud/Connector/Model/Status.php CHANGED
@@ -30,7 +30,8 @@ class Eye4Fraud_Connector_Model_Status extends Mage_Core_Model_Abstract
30
  * @return $this
31
  */
32
  public function retrieveStatus(){
33
- $fraudData = Mage::helper('eye4fraud_connector')->getOrderStatus($this->getData('order_id'));
 
34
  if(empty($fraudData)) {
35
  $this->setData('status', 'RER');
36
  $this->setData('description', 'Connection Error');
30
  * @return $this
31
  */
32
  public function retrieveStatus(){
33
+ $helper = Mage::helper('eye4fraud_connector');
34
+ $fraudData = $helper->getOrderStatus($this->getData('order_id'));
35
  if(empty($fraudData)) {
36
  $this->setData('status', 'RER');
37
  $this->setData('description', 'Connection Error');
app/code/local/Eye4Fraud/Connector/changes.txt CHANGED
@@ -2,6 +2,11 @@
2
 
3
  Changes list:
4
 
 
 
 
 
 
5
  1.2.5:
6
  - Order grid rewrite removed
7
  - Fraud status added to order and orders grid and can be used by other extensions
2
 
3
  Changes list:
4
 
5
+ 1.2.6
6
+ - Added payment method "Saved CC"
7
+ - New setting "Cancel Order" added to extension configuration. It allow to cancel not completed order if fraud status received
8
+ - Log file rotation
9
+
10
  1.2.5:
11
  - Order grid rewrite removed
12
  - Fraud status added to order and orders grid and can be used by other extensions
app/code/local/Eye4Fraud/Connector/controllers/Eye4fraudController.php CHANGED
@@ -23,13 +23,23 @@ class Eye4Fraud_Connector_Eye4fraudController extends Mage_Adminhtml_Controller_
23
  * Remove saved card
24
  */
25
  public function logfileAction(){
26
- header("Content-type: text/plain");
27
- header("Content-Disposition: attachment; filename=eye4fraud_debug.log");
28
 
29
  $helper = Mage::helper("eye4fraud_connector");
30
  if(!$helper->getLogSize()) return;
31
 
32
- $file_path = $helper->getLogFilePath();
 
 
 
 
 
 
 
 
 
 
 
 
33
  if(!file_exists($file_path)) return;
34
 
35
  $f = fopen($file_path, 'r');
23
  * Remove saved card
24
  */
25
  public function logfileAction(){
 
 
26
 
27
  $helper = Mage::helper("eye4fraud_connector");
28
  if(!$helper->getLogSize()) return;
29
 
30
+
31
+ $idx = $this->getRequest()->getParam('idx');
32
+ if(!is_null($idx)){
33
+ header("Content-type: application/gzip");
34
+ header("Content-Disposition: attachment; filename=eye4fraud_debug".$idx.'.log.gz');
35
+ $file_path = $helper->getLogFilePath().$idx.'.gz';
36
+ }
37
+ else{
38
+ header("Content-type: text/plain");
39
+ header("Content-Disposition: attachment; filename=eye4fraud_debug.log");
40
+ $file_path = $helper->getLogFilePath();
41
+ }
42
+
43
  if(!file_exists($file_path)) return;
44
 
45
  $f = fopen($file_path, 'r');
app/code/local/Eye4Fraud/Connector/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
  <config>
11
  <modules>
12
  <Eye4Fraud_Connector>
13
- <version>1.2.5</version>
14
  </Eye4Fraud_Connector>
15
  </modules>
16
  <global>
@@ -120,6 +120,11 @@
120
  <enabled>1</enabled>
121
  <update_limit>7</update_limit>
122
  <update_limit_no_order>2</update_limit_no_order>
 
 
 
 
 
123
  </general>
124
  <cron_settings>
125
  <enabled>1</enabled>
10
  <config>
11
  <modules>
12
  <Eye4Fraud_Connector>
13
+ <version>1.2.6</version>
14
  </Eye4Fraud_Connector>
15
  </modules>
16
  <global>
120
  <enabled>1</enabled>
121
  <update_limit>7</update_limit>
122
  <update_limit_no_order>2</update_limit_no_order>
123
+ <cancel_order>0</cancel_order>
124
+ <debug_mode>0</debug_mode>
125
+ <debug_file_rotate>1</debug_file_rotate>
126
+ <debug_file_max_size>8</debug_file_max_size>
127
+ <debug_file_count>3</debug_file_count>
128
  </general>
129
  <cron_settings>
130
  <enabled>1</enabled>
app/code/local/Eye4Fraud/Connector/etc/system.xml CHANGED
@@ -62,6 +62,16 @@
62
  <depends><enabled>1</enabled></depends>
63
  <comment>Stop to update not found in Eye4Fraud service orders</comment>
64
  </update_limit_no_order>
 
 
 
 
 
 
 
 
 
 
65
  <debug_mode translate="label">
66
  <label>Debug Mode</label>
67
  <frontend_type>select</frontend_type>
@@ -71,6 +81,42 @@
71
  <show_in_website>1</show_in_website>
72
  <show_in_store>0</show_in_store>
73
  </debug_mode>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  <debug_file translate="label">
75
  <label>Debug Log File</label>
76
  <frontend_type>label</frontend_type>
62
  <depends><enabled>1</enabled></depends>
63
  <comment>Stop to update not found in Eye4Fraud service orders</comment>
64
  </update_limit_no_order>
65
+ <cancel_order translate="label,comment">
66
+ <label>Cancel Order</label>
67
+ <frontend_type>select</frontend_type>
68
+ <source_model>adminhtml/system_config_source_yesno</source_model>
69
+ <sort_order>30</sort_order>
70
+ <show_in_default>1</show_in_default>
71
+ <show_in_website>1</show_in_website>
72
+ <show_in_store>0</show_in_store>
73
+ <comment>Cancel order if fraud is detected. Completed order cannot be cancelled</comment>
74
+ </cancel_order>
75
  <debug_mode translate="label">
76
  <label>Debug Mode</label>
77
  <frontend_type>select</frontend_type>
81
  <show_in_website>1</show_in_website>
82
  <show_in_store>0</show_in_store>
83
  </debug_mode>
84
+ <debug_file_rotate translate="label,comment">
85
+ <label>Rotate Log File</label>
86
+ <frontend_type>select</frontend_type>
87
+ <source_model>adminhtml/system_config_source_yesno</source_model>
88
+ <sort_order>42</sort_order>
89
+ <depends><debug_mode>1</debug_mode></depends>
90
+ <show_in_default>1</show_in_default>
91
+ <show_in_website>0</show_in_website>
92
+ <show_in_store>0</show_in_store>
93
+ <comment>The Log file will be compressed upon reaching a size specified below</comment>
94
+ </debug_file_rotate>
95
+ <debug_file_max_size translate="label">
96
+ <label>Log File Size to Compress, Mb</label>
97
+ <frontend_type>text</frontend_type>
98
+ <sort_order>44</sort_order>
99
+ <depends>
100
+ <debug_mode>1</debug_mode>
101
+ <debug_file_rotate>1</debug_file_rotate>
102
+ </depends>
103
+ <show_in_default>1</show_in_default>
104
+ <show_in_website>0</show_in_website>
105
+ <show_in_store>0</show_in_store>
106
+ </debug_file_max_size>
107
+ <debug_file_count translate="label,comment">
108
+ <label>Count of Compressed Log Files</label>
109
+ <frontend_type>text</frontend_type>
110
+ <sort_order>46</sort_order>
111
+ <depends>
112
+ <debug_mode>1</debug_mode>
113
+ <debug_file_rotate>1</debug_file_rotate>
114
+ </depends>
115
+ <show_in_default>1</show_in_default>
116
+ <show_in_website>0</show_in_website>
117
+ <show_in_store>0</show_in_store>
118
+ <comment>Count of compressed log files to keep. Old file will be deleted when new file created. Set 0 to keep all files</comment>
119
+ </debug_file_count>
120
  <debug_file translate="label">
121
  <label>Debug Log File</label>
122
  <frontend_type>label</frontend_type>
app/locale/en_US/Eye4Fraud_Connector.csv CHANGED
@@ -27,4 +27,11 @@
27
  "Order Grid Status","Order Grid Status"
28
  "Payflow Method Status","Payflow Method Status"
29
  "Authorize.net Method Status","Authorize.net Method Status"
30
- "Cron Task Status","Cron Task Status"
 
 
 
 
 
 
 
27
  "Order Grid Status","Order Grid Status"
28
  "Payflow Method Status","Payflow Method Status"
29
  "Authorize.net Method Status","Authorize.net Method Status"
30
+ "Cron Task Status","Cron Task Status"
31
+ "Cancel Order","Cancel Order"
32
+ "Cancel order if fraud is detected. Completed order cannot be cancelled","Cancel order if fraud is detected. Completed order cannot be cancelled"
33
+ "Rotate Log File","Rotate Log File"
34
+ "The Log file will be compressed upon reaching a size specified below","The Log file will be compressed upon reaching a size specified below"
35
+ "Log File Size to Compress, Mb","Log File Size to Compress, Mb"
36
+ "Count of Compressed Log Files","Count of Compressed Log Files"
37
+ "Count of compressed log files to keep. Old file will be deleted when new file created. Set 0 to keep all files","Count of compressed log files to keep. Old file will be deleted when new file created. Set 0 to keep all files"
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Eye4Fraud_Connector_integration</name>
4
- <version>1.2.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
@@ -12,14 +12,13 @@ money-back guarantee on chargebacks.&#xD;
12
  &#xD;
13
  The Best Weapon Against Your Worst Nightmare&#xD;
14
  Nothing worries you more than to see your money disappear on the heels of online thievery. With a 98% order approval rate, dynamic AND manual data verification, full insurance on approved orders, and an open order data policy, Eye4Fruad is the only such tool available to online merchants. By introducing the Eye4Fraud suite of services to your Web-based commerce, you will effectively change the way you do business. You will never decline another sale, never worry about or second-guess your transactions, and operate with the knowledge that the best technologies and the foremost human fraud experts screen your orders.</description>
15
- <notes>- Order grid rewrite removed&#xD;
16
- - Fraud status added to order and orders grid and can be used by other extensions&#xD;
17
- - Behavior of "Disable Extension Output" setting improved&#xD;
18
- - Get IP address from forwarding list</notes>
19
  <authors><author><name>Shloimy Stauber</name><user>Eye4Fraud</user><email>info@eye4fraud.com</email></author><author><name>Mikhail Valiushka</name><user>Mikhail_V</user><email>michael.valushko@gmail.com</email></author></authors>
20
- <date>2017-02-08</date>
21
- <time>17:59:32</time>
22
- <contents><target name="magelocal"><dir name="Eye4Fraud"><dir name="Connector"><dir name="Block"><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="f7328876a6c632bc94fb41245f405255"/></dir></dir></dir><dir name="Helper"><file name="Curl.php" hash="208efcd91bebc5baee5ca3ed3d72fdec"/><file name="Data.php" hash="eca483c59308bb997f7e2b0768ff9472"/><dir name="Order"><file name="Grid.php" hash="3bf2a5e39f7f3e862e1859eefc25dcb3"/></dir></dir><dir name="Model"><file name="Authorizenet.php" hash="857460c0b6162045aee7b1f8bc17bbc6"/><dir name="Config"><dir name="Frontend"><file name="Authorizenet.php" hash="4ca4061907fb50c422f41c5df93ed9a5"/><file name="Cron.php" hash="0bec389d165cda547370500962d80295"/><file name="Grid.php" hash="cfdeea39ffa3416fa499f99e1d62f82b"/><file name="Logfile.php" hash="682017713aa1ce38e299d5a1d023a533"/><file name="Payflowpro.php" hash="b9bad651e0af45b8b70085679a7861cb"/><file name="Paypaluk.php" hash="0584bd4253de063f4c51f3437b71e9cc"/><file name="Version.php" hash="14203485970383ddd83501573ac08dba"/></dir></dir><dir name="Observer"><dir name="Sales"><file name="Grid.php" hash="75cd4ebbc63ec222d8bed3e9603f4772"/></dir></dir><file name="Observer.php" hash="0b13a5c07792455df524727052cbf8dd"/><file name="Payflowpro.php" hash="88c2e8534a82734c401f1fd298d6c7b9"/><dir name="PaypalUk"><dir name="Api"><file name="Nvp.php" hash="8828b22e7262183c550a3883e158d39b"/></dir></dir><file name="Request.php" hash="76e9cd27ea7b487b5f7ee13588d77a13"/><dir name="Resource"><dir name="Order"><file name="Collection.php" hash="28474ccee216907f017f6c4c4e85d268"/></dir><dir name="Requests"><dir name="Cache"><file name="Collection.php" hash="d095e817aec23bf2d5c1129d9da2c19a"/></dir><file name="Cache.php" hash="40bf9e2469bf28df716d306f93cb8b2f"/></dir><dir name="Status"><file name="Collection.php" hash="fa4da10e398ca7d7fe35fbe3e0ba3819"/></dir><file name="Status.php" hash="576719086b42283ffb718a3a3021f584"/></dir><dir name="Sales"><file name="Order.php" hash="fccba5d593ebb6a77874359119e96aab"/></dir><file name="Status.php" hash="9655e856c87c9c67c2efc7a95cc587cf"/></dir><file name="changes.txt" hash="77fd0b287a3fc7ebaf4d7f93a1ccf472"/><dir name="controllers"><file name="Eye4fraudController.php" hash="cf87e2ea1a26e7912a2ebe29d481b81d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="9968072302312e95e0598bd58d13d5ef"/><file name="config.xml" hash="0f68a072ee66a5e9918c37e13156ff11"/><file name="system.xml" hash="2d2dc4de88649ee3b64143687407f46e"/></dir><dir name="sql"><dir name="eye4fraud_setup"><file name="install-1.0.4.php" hash="d92abe981c5a18daed7c5a645294c5f4"/><file name="upgrade-1.0.6-1.0.7.php" hash="a117809d1e0a392e74b9d97594456a2a"/><file name="upgrade-1.1.1-1.1.2.php" hash="2bd28326005ba8d0cd9a3ff3d45fe91a"/><file name="upgrade-1.1.2-1.1.3.php" hash="ee78c256d54063ceb04888ca75af3847"/><file name="upgrade-1.1.3-1.1.4.php" hash="955c6deaaee043409155cf5e5e8cfa11"/><file name="upgrade-1.1.6-1.1.7.php" hash="7aeb9b88b19a463c6f87c3c203d40148"/><file name="upgrade-1.1.7-1.2.0.php" hash="f30f3d4f84a64e42917cd8df9c016b2b"/><file name="upgrade-1.2.2-1.2.3.php" hash="bfa62fed051e4afb7654c3b7b5364708"/><file name="upgrade-1.2.4-1.2.5.php" hash="d5673366993ca9fe1dad162fb45c7deb"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eye4Fraud_Connector.xml" hash="444bf3d400ab4017c6e81fa4ad5d1463"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Eye4Fraud_Connector.csv" hash="b3e05f240744648d9f97ea67661c4611"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="eye4fraud"><file name="salesgrid.xml" hash="1456cbf5e15c0f5d9609fa785848c3ef"/></dir></dir></dir></dir></dir></target></contents>
23
  <compatible/>
24
  <dependencies><required><php><min>5.3.0</min><max>5.7.0</max></php><extension><name>curl</name><min>7.8</min><max>7.51</max></extension></required></dependencies>
25
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Eye4Fraud_Connector_integration</name>
4
+ <version>1.2.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
12
  &#xD;
13
  The Best Weapon Against Your Worst Nightmare&#xD;
14
  Nothing worries you more than to see your money disappear on the heels of online thievery. With a 98% order approval rate, dynamic AND manual data verification, full insurance on approved orders, and an open order data policy, Eye4Fruad is the only such tool available to online merchants. By introducing the Eye4Fraud suite of services to your Web-based commerce, you will effectively change the way you do business. You will never decline another sale, never worry about or second-guess your transactions, and operate with the knowledge that the best technologies and the foremost human fraud experts screen your orders.</description>
15
+ <notes>- Implemented support for the payment method "Saved CC".&#xD;
16
+ - New setting "Cancel Order" added to extension configuration. It allow to cancel not completed order if fraud status received&#xD;
17
+ - Log file rotation implemented</notes>
 
18
  <authors><author><name>Shloimy Stauber</name><user>Eye4Fraud</user><email>info@eye4fraud.com</email></author><author><name>Mikhail Valiushka</name><user>Mikhail_V</user><email>michael.valushko@gmail.com</email></author></authors>
19
+ <date>2017-03-31</date>
20
+ <time>17:33:33</time>
21
+ <contents><target name="magelocal"><dir name="Eye4Fraud"><dir name="Connector"><dir name="Block"><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="f7328876a6c632bc94fb41245f405255"/></dir></dir></dir><dir name="Helper"><file name="Curl.php" hash="208efcd91bebc5baee5ca3ed3d72fdec"/><file name="Data.php" hash="37ddd5d48295ce30dc03e4040b5db525"/><dir name="Order"><file name="Grid.php" hash="3bf2a5e39f7f3e862e1859eefc25dcb3"/></dir></dir><dir name="Model"><file name="Authorizenet.php" hash="857460c0b6162045aee7b1f8bc17bbc6"/><dir name="Config"><dir name="Frontend"><file name="Authorizenet.php" hash="4ca4061907fb50c422f41c5df93ed9a5"/><file name="Cron.php" hash="0bec389d165cda547370500962d80295"/><file name="Grid.php" hash="cfdeea39ffa3416fa499f99e1d62f82b"/><file name="Logfile.php" hash="0da10b25ada8e877c5147d8add5462ba"/><file name="Payflowpro.php" hash="b9bad651e0af45b8b70085679a7861cb"/><file name="Paypaluk.php" hash="0584bd4253de063f4c51f3437b71e9cc"/><file name="Version.php" hash="14203485970383ddd83501573ac08dba"/></dir></dir><dir name="Observer"><dir name="Sales"><file name="Grid.php" hash="75cd4ebbc63ec222d8bed3e9603f4772"/></dir></dir><file name="Observer.php" hash="432b7e6357b22cea1248b2a93d1a8651"/><file name="Payflowpro.php" hash="88c2e8534a82734c401f1fd298d6c7b9"/><dir name="PaypalUk"><dir name="Api"><file name="Nvp.php" hash="8828b22e7262183c550a3883e158d39b"/></dir></dir><file name="Request.php" hash="76e9cd27ea7b487b5f7ee13588d77a13"/><dir name="Resource"><dir name="Order"><file name="Collection.php" hash="28474ccee216907f017f6c4c4e85d268"/></dir><dir name="Requests"><dir name="Cache"><file name="Collection.php" hash="d095e817aec23bf2d5c1129d9da2c19a"/></dir><file name="Cache.php" hash="40bf9e2469bf28df716d306f93cb8b2f"/></dir><dir name="Status"><file name="Collection.php" hash="fa4da10e398ca7d7fe35fbe3e0ba3819"/></dir><file name="Status.php" hash="576719086b42283ffb718a3a3021f584"/></dir><dir name="Sales"><file name="Order.php" hash="fccba5d593ebb6a77874359119e96aab"/></dir><file name="Status.php" hash="2fe1ca3b7b3e94cdc92117d7c33c7bdd"/></dir><file name="changes.txt" hash="8fa6b481ad231856c4b8a0255fb1cd08"/><dir name="controllers"><file name="Eye4fraudController.php" hash="7ac998d52d8ded504c0fb356e7158adb"/></dir><dir name="etc"><file name="adminhtml.xml" hash="9968072302312e95e0598bd58d13d5ef"/><file name="config.xml" hash="227d30182ded9183acdfe1dfb0307f80"/><file name="system.xml" hash="755c9d41ee792a5fc0c70b6ed6b6c6ff"/></dir><dir name="sql"><dir name="eye4fraud_setup"><file name="install-1.0.4.php" hash="d92abe981c5a18daed7c5a645294c5f4"/><file name="upgrade-1.0.6-1.0.7.php" hash="a117809d1e0a392e74b9d97594456a2a"/><file name="upgrade-1.1.1-1.1.2.php" hash="2bd28326005ba8d0cd9a3ff3d45fe91a"/><file name="upgrade-1.1.2-1.1.3.php" hash="ee78c256d54063ceb04888ca75af3847"/><file name="upgrade-1.1.3-1.1.4.php" hash="955c6deaaee043409155cf5e5e8cfa11"/><file name="upgrade-1.1.6-1.1.7.php" hash="7aeb9b88b19a463c6f87c3c203d40148"/><file name="upgrade-1.1.7-1.2.0.php" hash="f30f3d4f84a64e42917cd8df9c016b2b"/><file name="upgrade-1.2.2-1.2.3.php" hash="bfa62fed051e4afb7654c3b7b5364708"/><file name="upgrade-1.2.4-1.2.5.php" hash="d5673366993ca9fe1dad162fb45c7deb"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eye4Fraud_Connector.xml" hash="444bf3d400ab4017c6e81fa4ad5d1463"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Eye4Fraud_Connector.csv" hash="11b337a85e5b9f2ea8abb55a0280c52a"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="eye4fraud"><file name="salesgrid.xml" hash="1456cbf5e15c0f5d9609fa785848c3ef"/></dir></dir></dir></dir></dir></target></contents>
22
  <compatible/>
23
  <dependencies><required><php><min>5.3.0</min><max>5.7.0</max></php><extension><name>curl</name><min>7.8</min><max>7.51</max></extension></required></dependencies>
24
  </package>