Mage_Centinel - Version 1.9.3.0

Version Notes

1.9.3.0

Download this release

Release Info

Developer Magento Core Team
Extension Mage_Centinel
Version 1.9.3.0
Comparing to
See all releases


Code changes from version 1.9.2.4 to 1.9.3.0

app/code/core/Mage/Centinel/Model/Api.php CHANGED
@@ -24,11 +24,6 @@
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
27
- /**
28
- * 3D Secure Validation Library for Payment
29
- */
30
- include_once '3Dsecure/CentinelClient.php';
31
-
32
  /**
33
  * 3D Secure Validation Api
34
  */
@@ -73,19 +68,19 @@ class Mage_Centinel_Model_Api extends Varien_Object
73
  /**
74
  * Centinel validation client
75
  *
76
- * @var CentinelClient
77
  */
78
  protected $_clientInstance = null;
79
 
80
  /**
81
  * Return Centinel thin client object
82
  *
83
- * @return CentinelClient
84
  */
85
  protected function _getClientInstance()
86
  {
87
  if (empty($this->_clientInstance)) {
88
- $this->_clientInstance = new CentinelClient();
89
  }
90
  return $this->_clientInstance;
91
  }
@@ -136,7 +131,7 @@ class Mage_Centinel_Model_Api extends Varien_Object
136
  * @param $method string
137
  * @param $data array
138
  *
139
- * @return CentinelClient
140
  */
141
  protected function _call($method, $data)
142
  {
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
 
 
 
 
 
27
  /**
28
  * 3D Secure Validation Api
29
  */
68
  /**
69
  * Centinel validation client
70
  *
71
+ * @var Mage_Centinel_Model_Api_Client
72
  */
73
  protected $_clientInstance = null;
74
 
75
  /**
76
  * Return Centinel thin client object
77
  *
78
+ * @return Mage_Centinel_Model_Api_Client
79
  */
80
  protected function _getClientInstance()
81
  {
82
  if (empty($this->_clientInstance)) {
83
+ $this->_clientInstance = new Mage_Centinel_Model_Api_Client();
84
  }
85
  return $this->_clientInstance;
86
  }
131
  * @param $method string
132
  * @param $data array
133
  *
134
+ * @return Mage_Centinel_Model_Api_Client
135
  */
136
  protected function _call($method, $data)
137
  {
app/code/core/Mage/Centinel/Model/Api/Client.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Centinel
23
+ * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * 3D Secure Validation Library for Payment
29
+ */
30
+ include_once '3Dsecure/CentinelClient.php';
31
+
32
+ /**
33
+ * 3D Secure Validation Api
34
+ */
35
+ class Mage_Centinel_Model_Api_Client extends CentinelClient
36
+ {
37
+ public function sendHttp($url, $connectTimeout = "", $timeout)
38
+ {
39
+ // verify that the URL uses a supported protocol.
40
+ if ((strpos($url, "http://") === 0) || (strpos($url, "https://") === 0)) {
41
+
42
+ //Construct the payload to POST to the url.
43
+ $data = $this->getRequestXml();
44
+
45
+ // create a new cURL resource
46
+ $ch = curl_init($url);
47
+
48
+ // set URL and other appropriate options
49
+ curl_setopt($ch, CURLOPT_POST ,1);
50
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
51
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
52
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
53
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
54
+ curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
55
+
56
+ // Execute the request.
57
+ $result = curl_exec($ch);
58
+ $succeeded = curl_errno($ch) == 0 ? true : false;
59
+
60
+ // close cURL resource, and free up system resources
61
+ curl_close($ch);
62
+
63
+ // If Communication was not successful set error result, otherwise
64
+ if (!$succeeded) {
65
+ $result = $this->setErrorResponse(CENTINEL_ERROR_CODE_8030, CENTINEL_ERROR_CODE_8030_DESC);
66
+ }
67
+
68
+ // Assert that we received an expected Centinel Message in reponse.
69
+ if (strpos($result, "<CardinalMPI>") === false) {
70
+ $result = $this->setErrorResponse(CENTINEL_ERROR_CODE_8010, CENTINEL_ERROR_CODE_8010_DESC);
71
+ }
72
+ } else {
73
+ $result = $this->setErrorResponse(CENTINEL_ERROR_CODE_8000, CENTINEL_ERROR_CODE_8000_DESC);
74
+ }
75
+ $parser = new XMLParser;
76
+ $parser->deserializeXml($result);
77
+ $this->response = $parser->deserializedResponse;
78
+ }
79
+ }
js/mage/adminhtml/sales/centinel.js CHANGED
@@ -68,4 +68,4 @@ centinelValidator.prototype = {
68
  return $(this.containerId);
69
  }
70
 
71
- }
68
  return $(this.containerId);
69
  }
70
 
71
+ };
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Mage_Centinel</name>
4
- <version>1.9.2.4</version>
5
  <stability>stable</stability>
6
  <license>mixed</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>3D Secure Card Validation</summary>
10
  <description>An integration with Cardinalcommerce Centinel service. Provides option to validate Visa and Mastercard cards for eliminating possible fraudlent order placement attempts. Adds information about Electronic Commerce Identifier, that designates liability for chargeback.</description>
11
- <notes>1.9.2.4</notes>
12
  <authors><author><name>Magento Core Team</name><user>core</user><email>core@magentocommerce.com</email></author></authors>
13
- <date>2016-02-17</date>
14
- <time>18:27:38</time>
15
- <contents><target name="magecore"><dir name="Mage"><dir name="Centinel"><dir name="Block"><dir name="Adminhtml"><dir name="Validation"><file name="Form.php" hash="8dc01ecb0ffb4dc7db40d199b203f46c"/></dir><file name="Validation.php" hash="17e03dde94d880faae1e2a5aeac61fb9"/></dir><dir name="Authentication"><file name="Complete.php" hash="65792b61016db681d2030fc275f7f3d3"/><file name="Start.php" hash="b2b8fc1a4d334885692e1bd1b0890c56"/></dir><file name="Authentication.php" hash="23d22f4c5c9ddf15cb3983c442dd377a"/><file name="Logo.php" hash="1ad870c04da5e20dcb33bf59282595ee"/></dir><dir name="Helper"><file name="Data.php" hash="6cf157af15d3139c2cb1c4f4e25c0460"/></dir><dir name="Model"><file name="Api.php" hash="c892285dfaf4fa0769b0cab6a7b28aac"/><file name="Config.php" hash="d9306631fdb31e4cb2cb0d2da74a5030"/><file name="Observer.php" hash="ca63ef0543fad61ba665ba0d7ae4b707"/><file name="Service.php" hash="92554655332dc4d3aaa472d8dfe96546"/><file name="Session.php" hash="2b8f7bb41c03cfeb87c48390fae68936"/><dir name="State"><file name="Jcb.php" hash="f9d400159c5f78274ca53ce11c1d921e"/><file name="Mastercard.php" hash="8cfa3c4ab8b307e29f0674b0be501d6b"/><file name="Visa.php" hash="587a0410d2a193055ee2b8258ec4c058"/></dir><file name="StateAbstract.php" hash="a3f63c2a9ba0099965c229265337976e"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Centinel"><file name="IndexController.php" hash="9389d956acf22c68c3826fd271703045"/></dir></dir><file name="IndexController.php" hash="f1c4b74c03b07455d58066e335d366f6"/></dir><dir name="etc"><file name="config.xml" hash="b178f0e4cb9b8313ea4c98808bbf40c5"/><file name="system.xml" hash="0155b8c767e56e79a679881078d76e2a"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mage_Centinel.xml" hash="11cfd493feba9265b3d8e589ab8ad75e"/></dir></target><target name="mageweb"><dir name="js"><dir name="mage"><dir name="adminhtml"><dir name="sales"><file name="centinel.js" hash="9f8c53393e134e16c1959cc84f7869c7"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="centinel"><dir name="authentication"><file name="complete.phtml" hash="40520bc69fe3c3e5ba11e5784e469341"/><file name="start.phtml" hash="56887a333919637e9dec93de41ddf055"/></dir><dir name="validation"><file name="form.phtml" hash="d972ff22d8434633d828845d0cac6f64"/></dir></dir></dir><dir name="layout"><file name="centinel.xml" hash="778748e28556d2e60892123b608c148a"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="centinel"><dir name="authentication"><file name="complete.phtml" hash="58d06520c3942699eca09ad08a469777"/><file name="start.phtml" hash="55775763fc1dfcfceaa9a05860859dce"/></dir><file name="authentication.phtml" hash="8377aad093d13512ac08669fde11fe8d"/><file name="logo.phtml" hash="18040021e3e4c6815c9403fc8c77bc37"/></dir></dir><dir name="layout"><file name="centinel.xml" hash="b2d0397c5b9577e6d40a270f8e026e4a"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Mage_Centinel.csv" hash="20f331c149ccf32faabdd406626805e0"/></dir></target><target name="magelib"><dir name="3Dsecure"><file name="CentinelClient.php" hash="e8459bd7d542e38058529e9bbb27ca25"/><file name="CentinelErrors.php" hash="e99aa9e865cc56beb2cf99d616ff0ceb"/><file name="XMLParser.php" hash="d089f3a81ac81378c889eee73a52f413"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="centinel"><file name="sc_learn_62x34.png" hash="7d6ec4b19f8eeb6baa2cddd5d4274f87"/><file name="v_activate_steps.gif" hash="005312b14c6aed41e8a47c4acaac7c1a"/><file name="vbv_ltbg_71x57.png" hash="324e5de7f6c75dc3cecb61646113ac41"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
- <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.9.2.4</min><max>1.9.2.4</max></package></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Mage_Centinel</name>
4
+ <version>1.9.3.0</version>
5
  <stability>stable</stability>
6
  <license>mixed</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>3D Secure Card Validation</summary>
10
  <description>An integration with Cardinalcommerce Centinel service. Provides option to validate Visa and Mastercard cards for eliminating possible fraudlent order placement attempts. Adds information about Electronic Commerce Identifier, that designates liability for chargeback.</description>
11
+ <notes>1.9.3.0</notes>
12
  <authors><author><name>Magento Core Team</name><user>core</user><email>core@magentocommerce.com</email></author></authors>
13
+ <date>2016-10-04</date>
14
+ <time>13:04:39</time>
15
+ <contents><target name="magecore"><dir name="Mage"><dir name="Centinel"><dir name="Block"><dir name="Adminhtml"><dir name="Validation"><file name="Form.php" hash="8dc01ecb0ffb4dc7db40d199b203f46c"/></dir><file name="Validation.php" hash="17e03dde94d880faae1e2a5aeac61fb9"/></dir><dir name="Authentication"><file name="Complete.php" hash="65792b61016db681d2030fc275f7f3d3"/><file name="Start.php" hash="b2b8fc1a4d334885692e1bd1b0890c56"/></dir><file name="Authentication.php" hash="23d22f4c5c9ddf15cb3983c442dd377a"/><file name="Logo.php" hash="1ad870c04da5e20dcb33bf59282595ee"/></dir><dir name="Helper"><file name="Data.php" hash="6cf157af15d3139c2cb1c4f4e25c0460"/></dir><dir name="Model"><dir name="Api"><file name="Client.php" hash="5013bb7ef76a1168e8bdadf496eda9ab"/></dir><file name="Api.php" hash="918dc5eb577f17b8e1029090ffd1b12a"/><file name="Config.php" hash="d9306631fdb31e4cb2cb0d2da74a5030"/><file name="Observer.php" hash="ca63ef0543fad61ba665ba0d7ae4b707"/><file name="Service.php" hash="92554655332dc4d3aaa472d8dfe96546"/><file name="Session.php" hash="2b8f7bb41c03cfeb87c48390fae68936"/><dir name="State"><file name="Jcb.php" hash="f9d400159c5f78274ca53ce11c1d921e"/><file name="Mastercard.php" hash="8cfa3c4ab8b307e29f0674b0be501d6b"/><file name="Visa.php" hash="587a0410d2a193055ee2b8258ec4c058"/></dir><file name="StateAbstract.php" hash="a3f63c2a9ba0099965c229265337976e"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Centinel"><file name="IndexController.php" hash="9389d956acf22c68c3826fd271703045"/></dir></dir><file name="IndexController.php" hash="f1c4b74c03b07455d58066e335d366f6"/></dir><dir name="etc"><file name="config.xml" hash="b178f0e4cb9b8313ea4c98808bbf40c5"/><file name="system.xml" hash="0155b8c767e56e79a679881078d76e2a"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mage_Centinel.xml" hash="11cfd493feba9265b3d8e589ab8ad75e"/></dir></target><target name="mageweb"><dir name="js"><dir name="mage"><dir name="adminhtml"><dir name="sales"><file name="centinel.js" hash="5d467231f7bcb612213c4112a19f535c"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="centinel"><dir name="authentication"><file name="complete.phtml" hash="40520bc69fe3c3e5ba11e5784e469341"/><file name="start.phtml" hash="56887a333919637e9dec93de41ddf055"/></dir><dir name="validation"><file name="form.phtml" hash="d972ff22d8434633d828845d0cac6f64"/></dir></dir></dir><dir name="layout"><file name="centinel.xml" hash="778748e28556d2e60892123b608c148a"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="centinel"><dir name="authentication"><file name="complete.phtml" hash="58d06520c3942699eca09ad08a469777"/><file name="start.phtml" hash="55775763fc1dfcfceaa9a05860859dce"/></dir><file name="authentication.phtml" hash="8377aad093d13512ac08669fde11fe8d"/><file name="logo.phtml" hash="18040021e3e4c6815c9403fc8c77bc37"/></dir></dir><dir name="layout"><file name="centinel.xml" hash="b2d0397c5b9577e6d40a270f8e026e4a"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Mage_Centinel.csv" hash="20f331c149ccf32faabdd406626805e0"/></dir></target><target name="magelib"><dir name="3Dsecure"><file name="CentinelClient.php" hash="e8459bd7d542e38058529e9bbb27ca25"/><file name="CentinelErrors.php" hash="e99aa9e865cc56beb2cf99d616ff0ceb"/><file name="XMLParser.php" hash="d089f3a81ac81378c889eee73a52f413"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="centinel"><file name="sc_learn_62x34.png" hash="7d6ec4b19f8eeb6baa2cddd5d4274f87"/><file name="v_activate_steps.gif" hash="005312b14c6aed41e8a47c4acaac7c1a"/><file name="vbv_ltbg_71x57.png" hash="324e5de7f6c75dc3cecb61646113ac41"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.9.3.0</min><max>1.9.3.0</max></package></required></dependencies>
18
  </package>