Signifyd_Connect - Version 3.9.0

Version Notes

Supports all versions of Magento

Download this release

Release Info

Developer Magento Core Team
Extension Signifyd_Connect
Version 3.9.0
Comparing to
See all releases


Code changes from version 3.8.0 to 3.9.0

app/code/community/Signifyd/Connect/Helper/Data.php CHANGED
@@ -60,7 +60,7 @@ class Signifyd_Connect_Helper_Data extends Mage_Core_Helper_Abstract
60
  {
61
  $case = Mage::getModel('signifyd_connect/case')->load($order->getIncrementId());
62
 
63
- if ($case)
64
  {
65
  return true;
66
  }
60
  {
61
  $case = Mage::getModel('signifyd_connect/case')->load($order->getIncrementId());
62
 
63
+ if ($case->getId())
64
  {
65
  return true;
66
  }
app/code/community/Signifyd/Connect/Model/Observer.php CHANGED
@@ -445,6 +445,9 @@ class Signifyd_Connect_Model_Observer extends Varien_Object
445
  }
446
 
447
  if ($order && $order->getId()) {
 
 
 
448
  $payments = $order->getPaymentsCollection();
449
 
450
  foreach ($payments as $payment) {
@@ -474,7 +477,7 @@ class Signifyd_Connect_Model_Observer extends Varien_Object
474
  $case = $this->generateCase();
475
 
476
  $case_object = Mage::helper('signifyd_connect')->markProcessed($order);
477
-
478
  $response = $this->submitCase($case);
479
 
480
  try {
445
  }
446
 
447
  if ($order && $order->getId()) {
448
+ if (Mage::helper('signifyd_connect')->isProcessed($order)) {
449
+ return;
450
+ }
451
  $payments = $order->getPaymentsCollection();
452
 
453
  foreach ($payments as $payment) {
477
  $case = $this->generateCase();
478
 
479
  $case_object = Mage::helper('signifyd_connect')->markProcessed($order);
480
+
481
  $response = $this->submitCase($case);
482
 
483
  try {
app/code/community/Signifyd/Connect/Model/System/Config/Source/Options/Positive.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Signifyd_Connect_Model_System_Config_Source_Options_Positive
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array(
9
+ 'value' => 'nothing',
10
+ 'label' => 'Nothing',
11
+ ),
12
+ array(
13
+ 'value' => 'unhold',
14
+ 'label' => 'Unhold Order',
15
+ ),
16
+ );
17
+ }
18
+ }
app/code/community/Signifyd/Connect/controllers/ConnectController.php CHANGED
@@ -40,7 +40,7 @@ class Signifyd_Connect_ConnectController extends Mage_Core_Controller_Front_Acti
40
 
41
  public function positiveGuaranteeAction()
42
  {
43
- return 'nothing';
44
  }
45
 
46
  public function enabled()
@@ -225,6 +225,18 @@ class Signifyd_Connect_ConnectController extends Mage_Core_Controller_Front_Acti
225
  }
226
  }
227
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  public function cancelOrder($order)
229
  {
230
  if ($order && $order->getId() && $order->canCancel()) {
@@ -268,6 +280,8 @@ class Signifyd_Connect_ConnectController extends Mage_Core_Controller_Front_Acti
268
  $threshold = $this->holdThreshold();
269
 
270
  $negativeAction = $this->negativeGuaranteeAction();
 
 
271
  if ($this->_request['guaranteeDisposition'] == 'DECLINED' && $negativeAction != 'nothing') {
272
  if($negativeAction == 'hold') {
273
  $this->holdOrder($order);
@@ -280,7 +294,15 @@ class Signifyd_Connect_ConnectController extends Mage_Core_Controller_Front_Acti
280
  else {
281
  Mage::log("Unknown action $negativeAction", null, 'signifyd_connect.log');
282
  }
 
 
 
 
 
 
 
283
  }
 
284
  if (!$original_status || $original_status == 'PENDING') {
285
  if ($threshold && $case->getScore() <= $threshold && $this->canReviewHold()) {
286
  $this->holdOrder($order);
40
 
41
  public function positiveGuaranteeAction()
42
  {
43
+ return Mage::getStoreConfig('signifyd_connect/advanced/guarantee_positive_action', $this->_store_id);
44
  }
45
 
46
  public function enabled()
225
  }
226
  }
227
 
228
+ public function unholdOrder($order)
229
+ {
230
+ if ($order && $order->getId() && $order->canUnhold()) {
231
+ $order->unhold();
232
+ $order->save();
233
+
234
+ if ($this->logRequest()) {
235
+ Mage::log('Order ' . $order->getId() . ' unheld', null, 'signifyd_connect.log');
236
+ }
237
+ }
238
+ }
239
+
240
  public function cancelOrder($order)
241
  {
242
  if ($order && $order->getId() && $order->canCancel()) {
280
  $threshold = $this->holdThreshold();
281
 
282
  $negativeAction = $this->negativeGuaranteeAction();
283
+ $positiveAction = $this->positiveGuaranteeAction();
284
+
285
  if ($this->_request['guaranteeDisposition'] == 'DECLINED' && $negativeAction != 'nothing') {
286
  if($negativeAction == 'hold') {
287
  $this->holdOrder($order);
294
  else {
295
  Mage::log("Unknown action $negativeAction", null, 'signifyd_connect.log');
296
  }
297
+ } else if($this->_request['guaranteeDisposition'] == 'APPROVED' && $positiveAction != 'nothing') {
298
+ if($positiveAction == 'unhold'){
299
+ $this->unholdOrder($order);
300
+ }
301
+ else {
302
+ Mage::log("Unknown action $positiveAction", null, 'signifyd_connect.log');
303
+ }
304
  }
305
+
306
  if (!$original_status || $original_status == 'PENDING') {
307
  if ($threshold && $case->getScore() <= $threshold && $this->canReviewHold()) {
308
  $this->holdOrder($order);
app/code/community/Signifyd/Connect/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <modules>
5
  <Signifyd_Connect>
6
- <version>3.8.0</version>
7
  </Signifyd_Connect>
8
  </modules>
9
  <global>
3
  <config>
4
  <modules>
5
  <Signifyd_Connect>
6
+ <version>3.9.0</version>
7
  </Signifyd_Connect>
8
  </modules>
9
  <global>
app/code/community/Signifyd/Connect/etc/system.xml CHANGED
@@ -124,6 +124,16 @@
124
  <show_in_store>1</show_in_store>
125
  <comment><![CDATA[Which action to take on orders when the guarantee is declined]]></comment>
126
  </guarantee_negative_action>
 
 
 
 
 
 
 
 
 
 
127
  <invoice_orders translate="label">
128
  <label>Invoice orders after receiving Signifyd Scores</label>
129
  <frontend_type>select</frontend_type>
124
  <show_in_store>1</show_in_store>
125
  <comment><![CDATA[Which action to take on orders when the guarantee is declined]]></comment>
126
  </guarantee_negative_action>
127
+ <guarantee_positive_action translate="label">
128
+ <label>Action on Guarantee Approve</label>
129
+ <frontend_type>select</frontend_type>
130
+ <source_model>signifyd_connect/system_config_source_options_positive</source_model>
131
+ <sort_order>86</sort_order>
132
+ <show_in_default>1</show_in_default>
133
+ <show_in_website>1</show_in_website>
134
+ <show_in_store>1</show_in_store>
135
+ <comment><![CDATA[Which action to take on orders when the guarantee is approved]]></comment>
136
+ </guarantee_positive_action>
137
  <invoice_orders translate="label">
138
  <label>Invoice orders after receiving Signifyd Scores</label>
139
  <frontend_type>select</frontend_type>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Signifyd_Connect</name>
4
- <version>3.8.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Supports all versions of Magento</description>
11
  <notes>Supports all versions of Magento</notes>
12
  <authors><author><name>signifyd</name><user>auto-converted</user><email>manelis@signifyd.com</email></author></authors>
13
- <date>2015-07-01</date>
14
- <time>06:14:41</time>
15
- <contents><target name="mageetc"><dir name="modules"><file name="Signifyd_Connect.xml" hash="bcd998a24567eba8a20423c40fba2adf"/></dir></target><target name="magecommunity"><dir name="Signifyd"><dir name="Connect"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="52843fc84cdb65214bb3469b6390bee5"/></dir><file name="Order.php" hash="e49f869c0aa5fb3ab6b70fb5752049ac"/></dir></dir><file name="Renderer.php" hash="5564e9c6926afbbdade26a6fe746948a"/></dir><dir name="Helper"><file name="Data.php" hash="d88c0c8e3a6c6780919afcc0eaa0c92c"/></dir><dir name="Model"><dir name="Resource"><dir name="Case"><file name="Collection.php" hash="b7dac9979a0c81db56294d1548570fc2"/></dir><file name="Case.php" hash="60d14407c9c90148aad543ce6868f343"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Options"><file name="Negative.php" hash="098488fbb0ea84945fdd1e1fe8449b4b"/></dir></dir></dir></dir><file name="Case.php" hash="2a28a63f02df1b9103b89a562c0abe1b"/><file name="Cron.php" hash="51665978bd2bcf67b493f2a2b450d1b8"/><file name="Link.php" hash="ecaf4c403a586b4b5c8b67c77f6ac433"/><file name="Observer.php" hash="abbab7f087c7e88e579b843f8c4bd3bb"/><file name="Setup.php" hash="e803ffb4b86c7d8ec1d149e665d65877"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SignifydController.php" hash="937fa40bfd59857c738691e0fc6594e7"/></dir><file name="ConnectController.php" hash="08690c3d872e752e26d002e0adfe24ea"/></dir><dir name="etc"><file name="adminhtml.xml" hash="894bd3f5ac76e9f602ab6ab592648b03"/><file name="config.xml" hash="bf399232ab0c5eb2773a1fdac776e2ac"/><file name="system.xml" hash="eab15c87f36a8adc6b38f38a7654c66e"/></dir><dir name="sql"><dir name="signifyd_connect_setup"><file name="mysql4-install-3.1.1.php" hash="7fb2ccaf8352eea26e626ace6de53d80"/><file name="mysql4-install-3.3.0.php" hash="f61d0c018b28ae04d8d14b38556d18ad"/><file name="mysql4-install-3.4.0.php" hash="109cc5ca60974d0c4755dcb0f5ade3e7"/><file name="mysql4-install-3.4.5.php" hash="401b92235c0e534c941a64c60d24b851"/><file name="mysql4-install-3.7.0.php" hash="48a9d427944a4e63a000343ab329f517"/><file name="mysql4-install-3.8.0.php" hash="0fb3583eb4481c21b84ea674abc200f0"/><file name="mysql4-upgrade-3.2.0-3.2.1.php" hash="9e36c608afd6e30e3052334e085eeff4"/><file name="mysql4-upgrade-3.2.1-3.2.2.php" hash="efcc5d46a41e549e508a693f1e77bf44"/><file name="mysql4-upgrade-3.2.2-3.2.3.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.2.3-3.3.0.php" hash="94b907c2cacde5fb9831408ce9a06190"/><file name="mysql4-upgrade-3.3.0-3.4.0.php" hash="6eb18705081483bb8d9c14adcdefd095"/><file name="mysql4-upgrade-3.4.0-3.4.1.php" hash="79f2064f1fa20d646e66aa3e7912d2a0"/><file name="mysql4-upgrade-3.4.1-3.4.2.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.4.2-3.4.3.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.4.3-3.4.4.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.4.4-3.4.5.php" hash="5b7507d6bb97bf44d27b7a89c56924bb"/><file name="mysql4-upgrade-3.4.5-3.4.6.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.4.6-3.4.7.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.4.7-3.4.8.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.4.8-3.5.0.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.5.0-3.5.1.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.5.1-3.5.2.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.5.2-3.5.3.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.5.3-3.6.0.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.6.0-3.7.0.php" hash="1456a6d0ddf091be9c87b3bbc91263ba"/><file name="mysql4-upgrade-3.7.0-3.8.0.php" hash="e6fc207541cacc5079e8ea8e4d55f356"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Signifyd_Connect</name>
4
+ <version>3.9.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
10
  <description>Supports all versions of Magento</description>
11
  <notes>Supports all versions of Magento</notes>
12
  <authors><author><name>signifyd</name><user>auto-converted</user><email>manelis@signifyd.com</email></author></authors>
13
+ <date>2015-07-22</date>
14
+ <time>07:11:43</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Signifyd_Connect.xml" hash="bcd998a24567eba8a20423c40fba2adf"/></dir></target><target name="magecommunity"><dir name="Signifyd"><dir name="Connect"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="52843fc84cdb65214bb3469b6390bee5"/></dir><file name="Order.php" hash="e49f869c0aa5fb3ab6b70fb5752049ac"/></dir></dir><file name="Renderer.php" hash="5564e9c6926afbbdade26a6fe746948a"/></dir><dir name="Helper"><file name="Data.php" hash="dcb489c1daf62b0436c7fbd39a833287"/></dir><dir name="Model"><dir name="Resource"><dir name="Case"><file name="Collection.php" hash="b7dac9979a0c81db56294d1548570fc2"/></dir><file name="Case.php" hash="60d14407c9c90148aad543ce6868f343"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Options"><file name="Negative.php" hash="098488fbb0ea84945fdd1e1fe8449b4b"/><file name="Positive.php" hash="80b4cdd2bae6e2a2f3a273fa49d32331"/></dir></dir></dir></dir><file name="Case.php" hash="2a28a63f02df1b9103b89a562c0abe1b"/><file name="Cron.php" hash="51665978bd2bcf67b493f2a2b450d1b8"/><file name="Link.php" hash="ecaf4c403a586b4b5c8b67c77f6ac433"/><file name="Observer.php" hash="a6883bc0aefa67c27e42a663bdb9fc81"/><file name="Setup.php" hash="e803ffb4b86c7d8ec1d149e665d65877"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SignifydController.php" hash="937fa40bfd59857c738691e0fc6594e7"/></dir><file name="ConnectController.php" hash="5c23182cf8373d36b102dffca24e81c5"/></dir><dir name="etc"><file name="adminhtml.xml" hash="894bd3f5ac76e9f602ab6ab592648b03"/><file name="config.xml" hash="3eddcfe2a9f66ac68c89b5340513d13f"/><file name="system.xml" hash="c42b2db859506998618701c980c6245f"/></dir><dir name="sql"><dir name="signifyd_connect_setup"><file name="mysql4-install-3.1.1.php" hash="7fb2ccaf8352eea26e626ace6de53d80"/><file name="mysql4-install-3.3.0.php" hash="f61d0c018b28ae04d8d14b38556d18ad"/><file name="mysql4-install-3.4.0.php" hash="109cc5ca60974d0c4755dcb0f5ade3e7"/><file name="mysql4-install-3.4.5.php" hash="401b92235c0e534c941a64c60d24b851"/><file name="mysql4-install-3.7.0.php" hash="48a9d427944a4e63a000343ab329f517"/><file name="mysql4-install-3.8.0.php" hash="0fb3583eb4481c21b84ea674abc200f0"/><file name="mysql4-upgrade-3.2.0-3.2.1.php" hash="9e36c608afd6e30e3052334e085eeff4"/><file name="mysql4-upgrade-3.2.1-3.2.2.php" hash="efcc5d46a41e549e508a693f1e77bf44"/><file name="mysql4-upgrade-3.2.2-3.2.3.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.2.3-3.3.0.php" hash="94b907c2cacde5fb9831408ce9a06190"/><file name="mysql4-upgrade-3.3.0-3.4.0.php" hash="6eb18705081483bb8d9c14adcdefd095"/><file name="mysql4-upgrade-3.4.0-3.4.1.php" hash="79f2064f1fa20d646e66aa3e7912d2a0"/><file name="mysql4-upgrade-3.4.1-3.4.2.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.4.2-3.4.3.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.4.3-3.4.4.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.4.4-3.4.5.php" hash="5b7507d6bb97bf44d27b7a89c56924bb"/><file name="mysql4-upgrade-3.4.5-3.4.6.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.4.6-3.4.7.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.4.7-3.4.8.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.4.8-3.5.0.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.5.0-3.5.1.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.5.1-3.5.2.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.5.2-3.5.3.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.5.3-3.6.0.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.6.0-3.7.0.php" hash="1456a6d0ddf091be9c87b3bbc91263ba"/><file name="mysql4-upgrade-3.7.0-3.8.0.php" hash="e6fc207541cacc5079e8ea8e4d55f356"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>