Version Notes
Supports all versions of Magento
Download this release
Release Info
| Developer | signifyd |
| Extension | Signifyd_Connect |
| Version | 3.16.5 |
| Comparing to | |
| See all releases | |
Code changes from version 3.16.4 to 3.16.5
app/code/community/Signifyd/Connect/controllers/ConnectController.php
CHANGED
|
@@ -8,9 +8,9 @@
|
|
| 8 |
*/
|
| 9 |
class Signifyd_Connect_ConnectController extends Mage_Core_Controller_Front_Action
|
| 10 |
{
|
| 11 |
-
public $
|
| 12 |
-
public $
|
| 13 |
-
public $
|
| 14 |
public $logger;
|
| 15 |
|
| 16 |
/**
|
|
@@ -113,10 +113,10 @@ class Signifyd_Connect_ConnectController extends Mage_Core_Controller_Front_Acti
|
|
| 113 |
{
|
| 114 |
$case = false;
|
| 115 |
|
| 116 |
-
if (isset($this->
|
| 117 |
-
$case = Mage::getModel('signifyd_connect/case')->load($this->
|
| 118 |
if($case->isObjectNew()) {
|
| 119 |
-
$this->logger->addLog('Case not yet in DB. Likely timing issue. order_increment: ' . $this->
|
| 120 |
$this->conflict();
|
| 121 |
}
|
| 122 |
}
|
|
@@ -130,18 +130,18 @@ class Signifyd_Connect_ConnectController extends Mage_Core_Controller_Front_Acti
|
|
| 130 |
*/
|
| 131 |
public function initRequest($request)
|
| 132 |
{
|
| 133 |
-
$this->
|
| 134 |
|
| 135 |
$topic = $this->getHeader('X-SIGNIFYD-TOPIC');
|
| 136 |
|
| 137 |
-
$this->
|
| 138 |
|
| 139 |
// For the webhook test, all of the request data will be invalid
|
| 140 |
if ($topic == "cases/test") return;
|
| 141 |
|
| 142 |
-
$this->
|
| 143 |
-
if (!$this->
|
| 144 |
-
$this->logger->addLog('No matching case was found for this request. order_increment: ' . $this->
|
| 145 |
}
|
| 146 |
|
| 147 |
/**
|
|
@@ -195,19 +195,19 @@ class Signifyd_Connect_ConnectController extends Mage_Core_Controller_Front_Acti
|
|
| 195 |
if ($this->validRequest($request, $hash)) {
|
| 196 |
$this->initRequest($request);
|
| 197 |
|
| 198 |
-
$topic = $this->
|
| 199 |
$this->logger->addLog('API request topic: ' . $topic);
|
| 200 |
|
| 201 |
switch ($topic) {
|
| 202 |
case "cases/creation":
|
| 203 |
-
Mage::getModel('signifyd_connect/case')->processCreation($this->
|
| 204 |
break;
|
| 205 |
case "cases/rescore":
|
| 206 |
case "cases/review":
|
| 207 |
-
Mage::getModel('signifyd_connect/case')->processReview($this->
|
| 208 |
break;
|
| 209 |
case "guarantees/completion":
|
| 210 |
-
Mage::getModel('signifyd_connect/case')->processGuarantee($this->
|
| 211 |
break;
|
| 212 |
case "cases/test":
|
| 213 |
// Test is only verifying that the endpoint is reachable. So we just complete here
|
|
@@ -218,7 +218,7 @@ class Signifyd_Connect_ConnectController extends Mage_Core_Controller_Front_Acti
|
|
| 218 |
}
|
| 219 |
} else {
|
| 220 |
$this->logger->addLog('API request failed auth');
|
| 221 |
-
Mage::getModel('signifyd_connect/case')->processFallback($
|
| 222 |
}
|
| 223 |
} else {
|
| 224 |
echo $this->getDefaultMessage();
|
| 8 |
*/
|
| 9 |
class Signifyd_Connect_ConnectController extends Mage_Core_Controller_Front_Action
|
| 10 |
{
|
| 11 |
+
public $inRequest = array();
|
| 12 |
+
public $topic = false;
|
| 13 |
+
public $case = false;
|
| 14 |
public $logger;
|
| 15 |
|
| 16 |
/**
|
| 113 |
{
|
| 114 |
$case = false;
|
| 115 |
|
| 116 |
+
if (isset($this->inRequest['orderId'])) {
|
| 117 |
+
$case = Mage::getModel('signifyd_connect/case')->load($this->inRequest['orderId']);
|
| 118 |
if($case->isObjectNew()) {
|
| 119 |
+
$this->logger->addLog('Case not yet in DB. Likely timing issue. order_increment: ' . $this->inRequest['orderId']);
|
| 120 |
$this->conflict();
|
| 121 |
}
|
| 122 |
}
|
| 130 |
*/
|
| 131 |
public function initRequest($request)
|
| 132 |
{
|
| 133 |
+
$this->inRequest = json_decode($request, true);
|
| 134 |
|
| 135 |
$topic = $this->getHeader('X-SIGNIFYD-TOPIC');
|
| 136 |
|
| 137 |
+
$this->topic = $topic;
|
| 138 |
|
| 139 |
// For the webhook test, all of the request data will be invalid
|
| 140 |
if ($topic == "cases/test") return;
|
| 141 |
|
| 142 |
+
$this->case = $this->initCase();
|
| 143 |
+
if (!$this->case)
|
| 144 |
+
$this->logger->addLog('No matching case was found for this request. order_increment: ' . $this->inRequest['orderId']);
|
| 145 |
}
|
| 146 |
|
| 147 |
/**
|
| 195 |
if ($this->validRequest($request, $hash)) {
|
| 196 |
$this->initRequest($request);
|
| 197 |
|
| 198 |
+
$topic = $this->topic;
|
| 199 |
$this->logger->addLog('API request topic: ' . $topic);
|
| 200 |
|
| 201 |
switch ($topic) {
|
| 202 |
case "cases/creation":
|
| 203 |
+
Mage::getModel('signifyd_connect/case')->processCreation($this->case, $this->inRequest);
|
| 204 |
break;
|
| 205 |
case "cases/rescore":
|
| 206 |
case "cases/review":
|
| 207 |
+
Mage::getModel('signifyd_connect/case')->processReview($this->case, $this->inRequest);
|
| 208 |
break;
|
| 209 |
case "guarantees/completion":
|
| 210 |
+
Mage::getModel('signifyd_connect/case')->processGuarantee($this->case, $this->inRequest);
|
| 211 |
break;
|
| 212 |
case "cases/test":
|
| 213 |
// Test is only verifying that the endpoint is reachable. So we just complete here
|
| 218 |
}
|
| 219 |
} else {
|
| 220 |
$this->logger->addLog('API request failed auth');
|
| 221 |
+
Mage::getModel('signifyd_connect/case')->processFallback($request);
|
| 222 |
}
|
| 223 |
} else {
|
| 224 |
echo $this->getDefaultMessage();
|
app/code/community/Signifyd/Connect/etc/config.xml
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
<config>
|
| 4 |
<modules>
|
| 5 |
<Signifyd_Connect>
|
| 6 |
-
<version>3.16.
|
| 7 |
</Signifyd_Connect>
|
| 8 |
</modules>
|
| 9 |
<global>
|
| 3 |
<config>
|
| 4 |
<modules>
|
| 5 |
<Signifyd_Connect>
|
| 6 |
+
<version>3.16.5</version>
|
| 7 |
</Signifyd_Connect>
|
| 8 |
</modules>
|
| 9 |
<global>
|
app/design/adminhtml/default/default/layout/signifyd/connect.xml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<layout>
|
| 3 |
+
<signifyd_sales_order_grid_update_handle>
|
| 4 |
+
<reference name="sales_order.grid">
|
| 5 |
+
<action method="addColumnAfter">
|
| 6 |
+
<columnId>score</columnId>
|
| 7 |
+
<arguments>
|
| 8 |
+
<header>Signifyd Score</header>
|
| 9 |
+
<index>score</index>
|
| 10 |
+
<filter_index>score</filter_index>
|
| 11 |
+
<type>text</type>
|
| 12 |
+
<width>100px</width>
|
| 13 |
+
</arguments>
|
| 14 |
+
<after>status</after>
|
| 15 |
+
</action>
|
| 16 |
+
</reference>
|
| 17 |
+
</signifyd_sales_order_grid_update_handle>
|
| 18 |
+
<adminhtml_sales_order_grid>
|
| 19 |
+
<!-- apply layout handle defined above -->
|
| 20 |
+
<update handle="signifyd_sales_order_grid_update_handle" />
|
| 21 |
+
</adminhtml_sales_order_grid>
|
| 22 |
+
<adminhtml_sales_order_index>
|
| 23 |
+
<!-- apply layout handle defined above -->
|
| 24 |
+
<update handle="signifyd_sales_order_grid_update_handle" />
|
| 25 |
+
</adminhtml_sales_order_index>
|
| 26 |
+
</layout>
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Signifyd_Connect</name>
|
| 4 |
-
<version>3.16.
|
| 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>signifyd</user><email>manelis@signifyd.com</email></author></authors>
|
| 13 |
-
<date>2017-04
|
| 14 |
-
<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="2c2e8af2c67a09c041d5015c26eff587"/></dir><file name="Order.php" hash="e49f869c0aa5fb3ab6b70fb5752049ac"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="c83481d3f9f01e629bb48d34358a53f6"/></dir></dir></dir></dir><file name="Renderer.php" hash="f55b4ac4a447141df9886ca864e7b75e"/><file name="Url.php" hash="dbe3e967879a69a2c943056f820e4688"/></dir><dir name="Helper"><file name="Data.php" hash="cb3be1f7e5458308a98e9b03dc970941"/><file name="Log.php" hash="6cabab7d2bf1956496b250ccc638e8de"/></dir><dir name="Model"><file name="Authnet.php" hash="0387e631fb232778cdc82c0c72c16781"/><file name="Case.php" hash="74ca11b208625db4aa29352a79b8b62a"/><file name="Cron.php" hash="521c218b03ced0777cd1066ec1c67b45"/><file name="Link.php" hash="c8a690bfe4b0ab789c02173a347f0f13"/><file name="Observer.php" hash="1477acf2a3bda588fab2e31d5eb79b38"/><dir name="Order"><file name="Payment.php" hash="a0ad3107170b7bae94b8402960b5cf48"/></dir><file name="Order.php" hash="0f0bd365c02eef9b5f28cebfd6dac22d"/><dir name="Resource"><dir name="Case"><file name="Collection.php" hash="b7dac9979a0c81db56294d1548570fc2"/></dir><file name="Case.php" hash="60d14407c9c90148aad543ce6868f343"/><dir name="Retries"><file name="Collection.php" hash="bd94e095c3a6367d20f5ebdd756740c8"/></dir><file name="Retries.php" hash="8027995f79188f624b6a681e4868d2e6"/></dir><file name="Retries.php" hash="28780c04867b083b1d51878e59fa380b"/><file name="Setup.php" hash="e803ffb4b86c7d8ec1d149e665d65877"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Options"><file name="Accepted.php" hash="bfa242f435e794f77843f38f11122691"/><file name="Declined.php" hash="f48482c1a78be0568b7b60cd5042906e"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="SignifydController.php" hash="c241dc4434631e3eb345c731c8cf177d"/></dir><file name="ConnectController.php" hash="
|
| 16 |
<compatible/>
|
| 17 |
-
<dependencies><required><php><min>5.2.0</min><max>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Signifyd_Connect</name>
|
| 4 |
+
<version>3.16.5</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>signifyd</user><email>manelis@signifyd.com</email></author></authors>
|
| 13 |
+
<date>2017-05-04</date>
|
| 14 |
+
<time>12:21:10</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="2c2e8af2c67a09c041d5015c26eff587"/></dir><file name="Order.php" hash="e49f869c0aa5fb3ab6b70fb5752049ac"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="c83481d3f9f01e629bb48d34358a53f6"/></dir></dir></dir></dir><file name="Renderer.php" hash="f55b4ac4a447141df9886ca864e7b75e"/><file name="Url.php" hash="dbe3e967879a69a2c943056f820e4688"/></dir><dir name="Helper"><file name="Data.php" hash="cb3be1f7e5458308a98e9b03dc970941"/><file name="Log.php" hash="6cabab7d2bf1956496b250ccc638e8de"/></dir><dir name="Model"><file name="Authnet.php" hash="0387e631fb232778cdc82c0c72c16781"/><file name="Case.php" hash="74ca11b208625db4aa29352a79b8b62a"/><file name="Cron.php" hash="521c218b03ced0777cd1066ec1c67b45"/><file name="Link.php" hash="c8a690bfe4b0ab789c02173a347f0f13"/><file name="Observer.php" hash="1477acf2a3bda588fab2e31d5eb79b38"/><dir name="Order"><file name="Payment.php" hash="a0ad3107170b7bae94b8402960b5cf48"/></dir><file name="Order.php" hash="0f0bd365c02eef9b5f28cebfd6dac22d"/><dir name="Resource"><dir name="Case"><file name="Collection.php" hash="b7dac9979a0c81db56294d1548570fc2"/></dir><file name="Case.php" hash="60d14407c9c90148aad543ce6868f343"/><dir name="Retries"><file name="Collection.php" hash="bd94e095c3a6367d20f5ebdd756740c8"/></dir><file name="Retries.php" hash="8027995f79188f624b6a681e4868d2e6"/></dir><file name="Retries.php" hash="28780c04867b083b1d51878e59fa380b"/><file name="Setup.php" hash="e803ffb4b86c7d8ec1d149e665d65877"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Options"><file name="Accepted.php" hash="bfa242f435e794f77843f38f11122691"/><file name="Declined.php" hash="f48482c1a78be0568b7b60cd5042906e"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="SignifydController.php" hash="c241dc4434631e3eb345c731c8cf177d"/></dir><file name="ConnectController.php" hash="a0ba71aa4674361d7bb440045fba6758"/></dir><dir name="etc"><file name="adminhtml.xml" hash="894bd3f5ac76e9f602ab6ab592648b03"/><file name="config.xml" hash="8c8d071111096f5329c978f918dffeb4"/><file name="system.xml" hash="5b89a88ea3510e2ee6623582f639910e"/></dir><dir name="sql"><dir name="signifyd_connect_setup"><file name="mysql4-install-3.1.1.php" hash="7fb2ccaf8352eea26e626ace6de53d80"/><file name="mysql4-install-3.12.0.php" hash="e4ec4d7445fbbc13a7008bcd69c529c4"/><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.10.0-3.10.1.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.10.1-3.11.0.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.11.0-3.11.1.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.11.1-3.12.0.php" hash="df5447c6223f66c03ddeacefc64322b8"/><file name="mysql4-upgrade-3.12.0-3.13.0.php" hash="f2e8ccb1fd199a0a678b3e34181aac18"/><file name="mysql4-upgrade-3.15.1-3.16.0.php" hash="7cde716fe0e3e849c1f82bbd7bf8ec3a"/><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"/><file name="mysql4-upgrade-3.8.0-3.9.0.php" hash="3ceb86495f33475774d4fc8727254cfc"/><file name="mysql4-upgrade-3.9.0-3.10.0.php" hash="3ceb86495f33475774d4fc8727254cfc"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="signifyd"><dir name="connect"><dir name="config"><file name="hint.phtml" hash="e1f1d39ed2980473f1fef0aeb73a7e1c"/></dir></dir></dir></dir><dir name="layout"><dir name="signifyd"><file name="connect.xml" hash="f495d8b4ea154c1316847b22d6cac9b4"/></dir></dir></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
+
<dependencies><required><php><min>5.2.0</min><max>7.1.10</max></php></required></dependencies>
|
| 18 |
</package>
|
