diff --git a/.php_cs b/.php_cs index 743cab6ee0d17db99cfd1373cf35f246772921fe..8381e44cf08ffb15328333db20f5d3a9b69386dc 100644 --- a/.php_cs +++ b/.php_cs @@ -15,7 +15,6 @@ $finder = Symfony\CS\Finder\DefaultFinder::create() ->exclude('dev/tests/functional/vendor') ->exclude('dev/tests/integration/tmp') ->exclude('dev/tests/integration/var') - ->exclude('lib/internal/CardinalCommerce') ->exclude('lib/internal/Cm') ->exclude('lib/internal/Credis') ->exclude('lib/internal/JSMin') diff --git a/app/code/Magento/Centinel/Block/Adminhtml/Validation.php b/app/code/Magento/Centinel/Block/Adminhtml/Validation.php deleted file mode 100644 index cd3ee0a70796ae6f58c588b62d2db317f122092e..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Block/Adminhtml/Validation.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Adminhtml sales order create validation card block - */ -namespace Magento\Centinel\Block\Adminhtml; - -class Validation extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate -{ - /** - * Construct - * - * @return void - */ - protected function _construct() - { - parent::_construct(); - $this->setId('sales_order_create_validation_card'); - } - - /** - * Return text for block`s header - * - * @return \Magento\Framework\Phrase - */ - public function getHeaderText() - { - return __('3D Secure Card Validation'); - } - - /** - * Return css class name for header block - * - * @return string - */ - public function getHeaderCssClass() - { - return 'head-payment-method'; - } - - /** - * Prepare html output - * - * @return string - */ - protected function _toHtml() - { - $payment = $this->getQuote()->getPayment(); - if (!$payment->getMethod() || - $payment->getMethodInstance()->getIsDummy() || - !$payment->getMethodInstance()->getIsCentinelValidationEnabled() - ) { - return ''; - } - return parent::_toHtml(); - } -} diff --git a/app/code/Magento/Centinel/Block/Adminhtml/Validation/Form.php b/app/code/Magento/Centinel/Block/Adminhtml/Validation/Form.php deleted file mode 100644 index 1bb63f2cee86de1e62d714fa7eb7352e72274b8c..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Block/Adminhtml/Validation/Form.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Adminhtml sales order create validation card block - * - * @author Magento Core Team <core@magentocommerce.com> - */ -namespace Magento\Centinel\Block\Adminhtml\Validation; - -class Form extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate -{ - /** - * Prepare validation and template parameters - * - * @return string - */ - protected function _toHtml() - { - $payment = $this->getQuote()->getPayment(); - if ($payment) { - $method = $payment->getMethodInstance(); - if ($method->getIsCentinelValidationEnabled() && ($centinel = $method->getCentinelValidator())) { - $this->setFrameUrl( - $centinel->getValidatePaymentDataUrl() - )->setContainerId( - 'centinel_authenticate_iframe' - )->setMethodCode( - $method->getCode() - ); - return parent::_toHtml(); - } - } - return ''; - } -} diff --git a/app/code/Magento/Centinel/Block/Authentication.php b/app/code/Magento/Centinel/Block/Authentication.php deleted file mode 100644 index 149548fec10bb35803c36b56cbbb29e1d2dfe503..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Block/Authentication.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Centinel validation frame - */ -namespace Magento\Centinel\Block; - -class Authentication extends \Magento\Framework\View\Element\Template -{ - /** - * Checkout session - * - * @var \Magento\Checkout\Model\Session - */ - protected $_checkoutSession; - - /** - * Strage for identifiers of related blocks - * - * @var string[] - */ - protected $_relatedBlocks = []; - - /** - * Flag - authentication start mode - * - * @var bool - * @see self::setAuthenticationStartMode - */ - protected $_authenticationStartMode = false; - - /** - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Checkout\Model\Session $checkoutSession - * @param array $data - */ - public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Checkout\Model\Session $checkoutSession, - array $data = [] - ) { - $this->_checkoutSession = $checkoutSession; - parent::__construct($context, $data); - $this->_isScopePrivate = true; - } - - /** - * Add identifier of related block - * - * @param string $blockId - * @return $this - */ - public function addRelatedBlock($blockId) - { - $this->_relatedBlocks[] = $blockId; - return $this; - } - - /** - * Return identifiers of related blocks - * - * @return string[] - */ - public function getRelatedBlocks() - { - return $this->_relatedBlocks; - } - - /** - * Check whether authentication is required and prepare some template data - * - * @return string - */ - protected function _toHtml() - { - $method = $this->_checkoutSession->getQuote()->getPayment()->getMethodInstance(); - if ($method->getIsCentinelValidationEnabled()) { - $centinel = $method->getCentinelValidator(); - if ($centinel && $centinel->shouldAuthenticate()) { - $this->setAuthenticationStart(true); - $this->setFrameUrl($centinel->getAuthenticationStartUrl()); - return parent::_toHtml(); - } - } - return parent::_toHtml(); - } -} diff --git a/app/code/Magento/Centinel/Block/Authentication/Complete.php b/app/code/Magento/Centinel/Block/Authentication/Complete.php deleted file mode 100644 index 6fb32e49efa70961cb57a96804820cb1136adef5..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Block/Authentication/Complete.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Centinel validation form lookup - */ -namespace Magento\Centinel\Block\Authentication; - -class Complete extends \Magento\Framework\View\Element\Template -{ - /** - * Core registry - * - * @var \Magento\Framework\Registry - */ - protected $_coreRegistry = null; - - /** - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Framework\Registry $registry - * @param array $data - */ - public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Framework\Registry $registry, - array $data = [] - ) { - $this->_coreRegistry = $registry; - parent::__construct($context, $data); - } - - /** - * Prepare authentication result params and render - * - * @return string - */ - protected function _toHtml() - { - $validator = $this->_coreRegistry->registry('current_centinel_validator'); - if ($validator) { - $this->setIsProcessed(true); - $this->setIsSuccess($validator->isAuthenticateSuccessful()); - } - return parent::_toHtml(); - } -} diff --git a/app/code/Magento/Centinel/Block/Authentication/Start.php b/app/code/Magento/Centinel/Block/Authentication/Start.php deleted file mode 100644 index 10fd701433be36e040573e69db2c630f594ad16f..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Block/Authentication/Start.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Authentication start/redirect form - */ -namespace Magento\Centinel\Block\Authentication; - -class Start extends \Magento\Framework\View\Element\Template -{ - /** - * Core registry - * - * @var \Magento\Framework\Registry - */ - protected $_coreRegistry = null; - - /** - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Framework\Registry $registry - * @param array $data - */ - public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Framework\Registry $registry, - array $data = [] - ) { - $this->_coreRegistry = $registry; - parent::__construct($context, $data); - } - - /** - * Prepare form parameters and render - * - * @return string - */ - protected function _toHtml() - { - $validator = $this->_coreRegistry->registry('current_centinel_validator'); - if ($validator && $validator->shouldAuthenticate()) { - $this->addData($validator->getAuthenticateStartData()); - return parent::_toHtml(); - } - return ''; - } -} diff --git a/app/code/Magento/Centinel/Block/Logo.php b/app/code/Magento/Centinel/Block/Logo.php deleted file mode 100644 index bcefadeeacbbc9639c152e830342ff28b9801e4b..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Block/Logo.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Centinel payment form logo block - */ -namespace Magento\Centinel\Block; - -class Logo extends \Magento\Framework\View\Element\Template -{ - /** - * @var string - */ - protected $_template = 'logo.phtml'; - - /** - * Return code of payment method - * - * @return string - */ - public function getCode() - { - return $this->getMethod()->getCode(); - } -} diff --git a/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index.php b/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index.php deleted file mode 100644 index cb8ffb4afa3bd17f829347f10c917b3997ace64a..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Centinel Index Controller - * - * @author Magento Core Team <core@magentocommerce.com> - */ -namespace Magento\Centinel\Controller\Adminhtml\Centinel; - -class Index extends \Magento\Backend\App\Action -{ - /** - * Core registry - * - * @var \Magento\Framework\Registry - */ - protected $_coreRegistry = null; - - /** - * @param \Magento\Backend\App\Action\Context $context - * @param \Magento\Framework\Registry $coreRegistry - */ - public function __construct(\Magento\Backend\App\Action\Context $context, \Magento\Framework\Registry $coreRegistry) - { - $this->_coreRegistry = $coreRegistry; - parent::__construct($context); - } - - /** - * Return payment model - * - * @return \Magento\Quote\Model\Quote\Payment - */ - protected function _getPayment() - { - return $this->_objectManager->get('Magento\Sales\Model\AdminOrder\Create')->getQuote()->getPayment(); - } - - /** - * Return Centinel validation model - * - * @return \Magento\Centinel\Model\Service - */ - protected function _getValidator() - { - if ($this->_getPayment()->getMethodInstance()->getIsCentinelValidationEnabled()) { - return $this->_getPayment()->getMethodInstance()->getCentinelValidator(); - } - return false; - } -} diff --git a/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index/AuthenticationComplete.php b/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index/AuthenticationComplete.php deleted file mode 100644 index fa7ee1ffd32fb5c5959b7ee36d6ee8225b5302a1..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index/AuthenticationComplete.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Centinel\Controller\Adminhtml\Centinel\Index; - -class AuthenticationComplete extends \Magento\Centinel\Controller\Adminhtml\Centinel\Index -{ - /** - * Process autentication complete action - * - * @return void - */ - public function execute() - { - try { - $validator = $this->_getValidator(); - if ($validator) { - $request = $this->getRequest(); - - $data = new \Magento\Framework\Object(); - $data->setTransactionId($request->getParam('MD')); - $data->setPaResPayload($request->getParam('PaRes')); - - $validator->authenticate($data); - $this->_coreRegistry->register('current_centinel_validator', $validator); - } - } catch (\Exception $e) { - $this->_coreRegistry->register('current_centinel_validator', false); - } - $this->_view->loadLayout()->renderLayout(); - } -} diff --git a/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index/AuthenticationStart.php b/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index/AuthenticationStart.php deleted file mode 100644 index 33bdc10cc336f35a3ef5b80ea44dca2f73a11b01..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index/AuthenticationStart.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Centinel\Controller\Adminhtml\Centinel\Index; - -class AuthenticationStart extends \Magento\Centinel\Controller\Adminhtml\Centinel\Index -{ - /** - * Process autentication start action - * - * @return void - */ - public function execute() - { - $validator = $this->_getValidator(); - if ($validator) { - $this->_coreRegistry->register('current_centinel_validator', $validator); - } - $this->_view->loadLayout()->renderLayout(); - } -} diff --git a/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index/ValidatePaymentData.php b/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index/ValidatePaymentData.php deleted file mode 100644 index 13d3154b90053ae2b2016039f730d9afba705d58..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Controller/Adminhtml/Centinel/Index/ValidatePaymentData.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Centinel\Controller\Adminhtml\Centinel\Index; - -class ValidatePaymentData extends \Magento\Centinel\Controller\Adminhtml\Centinel\Index -{ - /** - * Process validate payment data action - * - * @return void - */ - public function execute() - { - $result = []; - try { - $paymentData = $this->getRequest()->getParam('payment'); - $validator = $this->_getValidator(); - if (!$validator) { - throw new \Exception('This payment method does not have centinel validation.'); - } - $validator->reset(); - $this->_getPayment()->importData($paymentData); - $result['authenticationUrl'] = $validator->getAuthenticationStartUrl(); - } catch (\Magento\Framework\Exception\LocalizedException $e) { - $result['message'] = $e->getMessage(); - } catch (\Exception $e) { - $this->_objectManager->get('Psr\Log\LoggerInterface')->critical($e); - $result['message'] = __('Validation failed.'); - } - $this->getResponse()->representJson( - $this->_objectManager->get('Magento\Framework\Json\Helper\Data')->jsonEncode($result) - ); - } -} diff --git a/app/code/Magento/Centinel/Controller/Index.php b/app/code/Magento/Centinel/Controller/Index.php deleted file mode 100644 index 1cbca3d3e64420c834b242085fab82ba8d131f55..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Controller/Index.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Centinel Authenticate Controller - * - */ -namespace Magento\Centinel\Controller; - -class Index extends \Magento\Framework\App\Action\Action -{ - /** - * Core registry - * - * @var \Magento\Framework\Registry - */ - protected $_coreRegistry = null; - - /** - * @param \Magento\Framework\App\Action\Context $context - * @param \Magento\Framework\Registry $coreRegistry - */ - public function __construct( - \Magento\Framework\App\Action\Context $context, - \Magento\Framework\Registry $coreRegistry - ) { - $this->_coreRegistry = $coreRegistry; - parent::__construct($context); - } - - /** - * Return payment model - * - * @return \Magento\Quote\Model\Quote\Payment - */ - protected function _getPayment() - { - return $this->_objectManager->get('Magento\Checkout\Model\Session')->getQuote()->getPayment(); - } - - /** - * Return Centinel validation model - * - * @return \Magento\Centinel\Model\Service - */ - protected function _getValidator() - { - if ($this->_getPayment()->getMethodInstance()->getIsCentinelValidationEnabled()) { - return $this->_getPayment()->getMethodInstance()->getCentinelValidator(); - } - return false; - } -} diff --git a/app/code/Magento/Centinel/Controller/Index/AuthenticationComplete.php b/app/code/Magento/Centinel/Controller/Index/AuthenticationComplete.php deleted file mode 100644 index 2c726b855a8dfc4fa6341e143a985c4365191a40..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Controller/Index/AuthenticationComplete.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Centinel\Controller\Index; - -class AuthenticationComplete extends \Magento\Centinel\Controller\Index -{ - /** - * Process autentication complete action - * - * @return void - */ - public function execute() - { - try { - $validator = $this->_getValidator(); - if ($validator) { - $request = $this->getRequest(); - - $data = new \Magento\Framework\Object(); - $data->setTransactionId($request->getParam('MD')); - $data->setPaResPayload($request->getParam('PaRes')); - - $validator->authenticate($data); - $this->_coreRegistry->register('current_centinel_validator', $validator); - } - } catch (\Exception $e) { - $this->_coreRegistry->register('current_centinel_validator', false); - } - $this->_view->loadLayout()->renderLayout(); - } -} diff --git a/app/code/Magento/Centinel/Controller/Index/AuthenticationStart.php b/app/code/Magento/Centinel/Controller/Index/AuthenticationStart.php deleted file mode 100644 index ecddad03418c14e1d36492076a65afb31f222802..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Controller/Index/AuthenticationStart.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php -/** - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Centinel\Controller\Index; - -class AuthenticationStart extends \Magento\Centinel\Controller\Index -{ - /** - * Process autentication start action - * - * @return void - */ - public function execute() - { - $validator = $this->_getValidator(); - if ($validator) { - $this->_coreRegistry->register('current_centinel_validator', $validator); - } - $this->_view->loadLayout()->renderLayout(); - } -} diff --git a/app/code/Magento/Centinel/Helper/Data.php b/app/code/Magento/Centinel/Helper/Data.php deleted file mode 100644 index 393505eef9eb03eab21d2f8b22d3e343aeec3137..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Helper/Data.php +++ /dev/null @@ -1,145 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Centinel module base helper - * - * @author Magento Core Team <core@magentocommerce.com> - */ -namespace Magento\Centinel\Helper; - -class Data extends \Magento\Framework\App\Helper\AbstractHelper -{ - /** - * Return label for cmpi field - * - * @param string $fieldName - * @return \Magento\Framework\Phrase|string - */ - public function getCmpiLabel($fieldName) - { - switch ($fieldName) { - case \Magento\Centinel\Model\Service::CMPI_PARES: - return __('3D Secure Verification Result'); - case \Magento\Centinel\Model\Service::CMPI_ENROLLED: - return __('3D Secure Cardholder Validation'); - case \Magento\Centinel\Model\Service::CMPI_ECI: - return __('3D Secure Electronic Commerce Indicator'); - case \Magento\Centinel\Model\Service::CMPI_CAVV: - return __('3D Secure CAVV'); - case \Magento\Centinel\Model\Service::CMPI_XID: - return __('3D Secure XID'); - } - return ''; - } - - /** - * Return value for cmpi field - * - * @param string $fieldName - * @param string $value - * @return string - */ - public function getCmpiValue($fieldName, $value) - { - switch ($fieldName) { - case \Magento\Centinel\Model\Service::CMPI_PARES: - return $this->_getCmpiParesValue($value); - case \Magento\Centinel\Model\Service::CMPI_ENROLLED: - return $this->_getCmpiEnrolledValue($value); - case \Magento\Centinel\Model\Service::CMPI_ECI: - return $this->_getCmpiEciValue($value); - case \Magento\Centinel\Model\Service::CMPI_CAVV: - // break intentionally omitted - case \Magento\Centinel\Model\Service::CMPI_XID: - return $value; - } - return ''; - } - - /** - * Return text value for cmpi eci flag field - * - * @param string $value - * @return \Magento\Framework\Phrase|string - */ - private function _getCmpiEciValue($value) - { - switch ($value) { - case '01': - case '07': - return __('Merchant Liability'); - case '02': - case '05': - case '06': - return __('Card Issuer Liability'); - default: - return $value; - } - } - - /** - * Return text value for cmpi enrolled field - * - * @param string $value - * @return \Magento\Framework\Phrase - */ - private function _getCmpiEnrolledValue($value) - { - switch ($value) { - case 'Y': - return __('Enrolled'); - case 'U': - return __('Enrolled but Authentication Unavailable'); - case 'N': - // break intentionally omitted - default: - return __('Not Enrolled'); - } - } - - /** - * Return text value for cmpi pares field - * - * @param string $value - * @return \Magento\Framework\Phrase|string - */ - private function _getCmpiParesValue($value) - { - switch ($value) { - case 'Y': - return __('Successful'); - case 'N': - return __('Failed'); - case 'U': - return __('Unable to complete'); - case 'A': - return __('Successful attempt'); - default: - return $value; - } - } - - /** - * Return url of page about visa verification - * - * @return string - */ - public function getVisaLearnMorePageUrl() - { - return 'https://usa.visa.com/personal/security/vbv/index.html?ep=v_sym_verifiedbyvisa'; - } - - /** - * Return url of page about mastercard verification - * - * @return string - */ - public function getMastercardLearnMorePageUrl() - { - return 'http://www.mastercardbusiness.com/mcbiz/index.jsp?template=/orphans&content=securecodepopup'; - } -} diff --git a/app/code/Magento/Centinel/LICENSE.txt b/app/code/Magento/Centinel/LICENSE.txt deleted file mode 100644 index 49525fd99da9c51e6d85420266d41cb3d6b7a648..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/LICENSE.txt +++ /dev/null @@ -1,48 +0,0 @@ - -Open Software License ("OSL") v. 3.0 - -This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: - -Licensed under the Open Software License version 3.0 - - 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: - - 1. to reproduce the Original Work in copies, either alone or as part of a collective work; - - 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; - - 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License; - - 4. to perform the Original Work publicly; and - - 5. to display the Original Work publicly. - - 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. - - 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. - - 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. - - 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). - - 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. - - 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. - - 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. - - 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). - - 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. - - 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. - - 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. - - 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. - - 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - - 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. - - 16. Modification of This License. This License is Copyright (C) 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. \ No newline at end of file diff --git a/app/code/Magento/Centinel/LICENSE_AFL.txt b/app/code/Magento/Centinel/LICENSE_AFL.txt deleted file mode 100644 index 87943b95d43a5bb8736093275afe3cb8e1d93d26..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/LICENSE_AFL.txt +++ /dev/null @@ -1,48 +0,0 @@ - -Academic Free License ("AFL") v. 3.0 - -This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: - -Licensed under the Academic Free License version 3.0 - - 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: - - 1. to reproduce the Original Work in copies, either alone or as part of a collective work; - - 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; - - 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License; - - 4. to perform the Original Work publicly; and - - 5. to display the Original Work publicly. - - 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. - - 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. - - 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. - - 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). - - 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. - - 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. - - 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. - - 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). - - 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. - - 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. - - 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. - - 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. - - 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - - 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. - - 16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. \ No newline at end of file diff --git a/app/code/Magento/Centinel/Model/AbstractState.php b/app/code/Magento/Centinel/Model/AbstractState.php deleted file mode 100644 index 58f3b6dee34d1fbae03caeb47e28ea5699015e06..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Model/AbstractState.php +++ /dev/null @@ -1,151 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Abstract Validation State Model - */ -namespace Magento\Centinel\Model; - -abstract class AbstractState extends \Magento\Framework\Object -{ - /** - * Storage data model - * - * @var \Magento\Framework\Object - */ - private $_dataStorage = false; - - /** - * Setter for storage data model - * - * @param \Magento\Framework\Object $dataStorageModel - * @return $this - */ - public function setDataStorage($dataStorageModel) - { - $this->_dataStorage = $dataStorageModel; - return $this; - } - - /** - * Getter for storage data model - * - * @return \Magento\Framework\Object - */ - public function getDataStorage() - { - return $this->_dataStorage; - } - - /** - * Retrieves data from the object - * - * If $key is empty will return all the data as an array - * Otherwise it will return value of the attribute specified by $key - * - * $index parameter is ignored - * - * @param string $key - * @param string|int $index - * @return mixed - * @see \Magento\Framework\Session\SessionManager::getData() - */ - public function getData($key = '', $index = null) - { - return $this->getDataStorage()->getData($key); - } - - /** - * Overwrite data in the object. - * - * Parameter $key can be string or array. - * If $key is string, the attribute value will be overwritten by $value - * - * If $key is an array, it will overwrite all the data in the object. - * - * @param string|array $key - * @param mixed $value - * @return $this - */ - public function setData($key, $value = null) - { - $this->getDataStorage()->setData($key, $value); - return $this; - } - - /** - * Save lookup result in state model - * - * @param \Magento\Framework\Object $result - * @return $this - */ - public function setLookupResult($result) - { - foreach ($result->getData() as $key => $value) { - $this->setData('lookup_' . $key, $value); - } - return $this; - } - - /** - * Save authenticate result in state model - * - * @param \Magento\Framework\Object $result - * @return $this - */ - public function setAuthenticateResult($result) - { - foreach ($result->getData() as $key => $value) { - $this->setData('authenticate_' . $key, $value); - } - return $this; - } - - /** - * Analyse lookup`s results. If lookup is successful return true and false if it failure - * Result depends from flag self::getIsModeStrict() - * - * @return bool - */ - final public function isLookupSuccessful() - { - if ($this->_isLookupStrictSuccessful()) { - return true; - } elseif (!$this->getIsModeStrict() && $this->_isLookupSoftSuccessful()) { - return true; - } - return false; - } - - /** - * Analyse lookup`s results. If lookup is strict successful return true - * - * @return bool - */ - abstract protected function _isLookupStrictSuccessful(); - - /** - * Analyse lookup`s results. If lookup is soft successful return true - * - * @return bool - */ - abstract protected function _isLookupSoftSuccessful(); - - /** - * Analyse lookup`s results. If it has require params for authenticate, return true - * - * @return bool - */ - abstract public function isAuthenticateAllowed(); - - /** - * Analyse authenticate`s results. If authenticate is successful return true and false if it failure - * Result depends from flag self::getIsModeStrict() - * - * @return bool - */ - abstract public function isAuthenticateSuccessful(); -} diff --git a/app/code/Magento/Centinel/Model/Api.php b/app/code/Magento/Centinel/Model/Api.php deleted file mode 100644 index 29babcc6a118e395f89dcb7e590b14de30a16e8a..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Model/Api.php +++ /dev/null @@ -1,424 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Centinel\Model; - -/** - * 3D Secure Validation Library for Payment - */ -include_once 'CardinalCommerce/CentinelClient.php'; -/** - * 3D Secure Validation Api - */ -class Api extends \Magento\Framework\Object -{ - /** - * Fields that should be replaced in debug with '***' - * - * @var string[] - */ - protected $_debugReplacePrivateDataKeys = ['TransactionPwd', 'CardNumber', 'CardExpMonth', 'CardExpYear']; - - /** - * Array of ISO 4217 Currency codes and numbers - * - * @var array - */ - protected static $_iso4217Currencies = [ - 'AED' => '784', - 'AFN' => '971', - 'ALL' => '008', - 'AMD' => '051', - 'ANG' => '532', - 'AOA' => '973', - 'ARS' => '032', - 'AUD' => '036', - 'AWG' => '533', - 'AZN' => '944', - 'BAM' => '977', - 'BBD' => '052', - 'BDT' => '050', - 'BGN' => '975', - 'BHD' => '048', - 'BIF' => '108', - 'BMD' => '060', - 'BND' => '096', - 'BOB' => '068', - 'BOV' => '984', - 'BRL' => '986', - 'BSD' => '044', - 'BTN' => '064', - 'BWP' => '072', - 'BYR' => '974', - 'BZD' => '084', - 'CAD' => '124', - 'CDF' => '976', - 'CHE' => '947', - 'CHF' => '756', - 'CHW' => '948', - 'CLF' => '990', - 'CLP' => '152', - 'CNY' => '156', - 'COP' => '170', - 'COU' => '970', - 'CRC' => '188', - 'CUC' => '931', - 'CUP' => '192', - 'CVE' => '132', - 'CZK' => '203', - 'DJF' => '262', - 'DKK' => '208', - 'DOP' => '214', - 'DZD' => '012', - 'EEK' => '233', - 'EGP' => '818', - 'ERN' => '232', - 'ETB' => '230', - 'EUR' => '978', - 'FJD' => '242', - 'FKP' => '238', - 'GBP' => '826', - 'GEL' => '981', - 'GHS' => '936', - 'GIP' => '292', - 'GMD' => '270', - 'GNF' => '324', - 'GTQ' => '320', - 'GYD' => '328', - 'HKD' => '344', - 'HNL' => '340', - 'HRK' => '191', - 'HTG' => '332', - 'HUF' => '348', - 'IDR' => '360', - 'ILS' => '376', - 'INR' => '356', - 'IQD' => '368', - 'IRR' => '364', - 'ISK' => '352', - 'JMD' => '388', - 'JOD' => '400', - 'JPY' => '392', - 'KES' => '404', - 'KGS' => '417', - 'KHR' => '116', - 'KMF' => '174', - 'KPW' => '408', - 'KRW' => '410', - 'KWD' => '414', - 'KYD' => '136', - 'KZT' => '398', - 'LAK' => '418', - 'LBP' => '422', - 'LKR' => '144', - 'LRD' => '430', - 'LSL' => '426', - 'LTL' => '440', - 'LVL' => '428', - 'LYD' => '434', - 'MAD' => '504', - 'MDL' => '498', - 'MGA' => '969', - 'MKD' => '807', - 'MMK' => '104', - 'MNT' => '496', - 'MOP' => '446', - 'MRO' => '478', - 'MUR' => '480', - 'MVR' => '462', - 'MWK' => '454', - 'MXN' => '484', - 'MXV' => '979', - 'MYR' => '458', - 'MZN' => '943', - 'NAD' => '516', - 'NGN' => '566', - 'NIO' => '558', - 'NOK' => '578', - 'NPR' => '524', - 'NZD' => '554', - 'OMR' => '512', - 'PAB' => '590', - 'PEN' => '604', - 'PGK' => '598', - 'PHP' => '608', - 'PKR' => '586', - 'PLN' => '985', - 'PYG' => '600', - 'QAR' => '634', - 'RON' => '946', - 'RSD' => '941', - 'RUB' => '643', - 'RWF' => '646', - 'SAR' => '682', - 'SBD' => '090', - 'SCR' => '690', - 'SDG' => '938', - 'SEK' => '752', - 'SGD' => '702', - 'SHP' => '654', - 'SLL' => '694', - 'SOS' => '706', - 'SRD' => '968', - 'STD' => '678', - 'SYP' => '760', - 'SZL' => '748', - 'THB' => '764', - 'TJS' => '972', - 'TMT' => '934', - 'TND' => '788', - 'TOP' => '776', - 'TRY' => '949', - 'TTD' => '780', - 'TWD' => '901', - 'TZS' => '834', - 'UAH' => '980', - 'UGX' => '800', - 'USD' => '840', - 'USN' => '997', - 'USS' => '998', - 'UYU' => '858', - 'UZS' => '860', - 'VEF' => '937', - 'VND' => '704', - 'VUV' => '548', - 'WST' => '882', - 'XAF' => '950', - 'XAG' => '961', - 'XAU' => '959', - 'XBA' => '955', - 'XBB' => '956', - 'XBC' => '957', - 'XBD' => '958', - 'XCD' => '951', - 'XDR' => '960', - 'XOF' => '952', - 'XPD' => '964', - 'XPF' => '953', - 'XPT' => '962', - 'XTS' => '963', - 'XXX' => '999', - 'YER' => '886', - 'ZAR' => '710', - 'ZMK' => '894', - 'ZWL' => '932', - ]; - - /** - * Centinel validation client - * - * @var \CentinelClient - */ - protected $_clientInstance = null; - - /** - * @var \Psr\Log\LoggerInterface - */ - protected $logger; - - /** - * @param \Psr\Log\LoggerInterface $logger - * @param array $data - */ - public function __construct(\Psr\Log\LoggerInterface $logger, array $data = []) - { - $this->logger = $logger; - parent::__construct($data); - } - - /** - * Return Centinel thin client object - * - * @return \CentinelClient - */ - protected function _getClientInstance() - { - if (empty($this->_clientInstance)) { - $this->_clientInstance = new \CentinelClient(); - } - return $this->_clientInstance; - } - - /** - * Return Centinel Api version - * - * @return string - */ - protected function _getVersion() - { - return '1.7'; - } - - /** - * Return transaction type. according centinel documetation it should be "C" - * - * @return string - */ - protected function _getTransactionType() - { - return 'C'; - } - - /** - * Return Timeout Connect - * - * @return int - */ - protected function _getTimeoutConnect() - { - return 100; - } - - /** - * Return Timeout Read - * - * @return int - */ - protected function _getTimeoutRead() - { - return 100; - } - - /** - * Call centinel api methods by given method name and data - * - * @param string $method - * @param array $data - * @return \CentinelClient - * @throws \Exception - */ - protected function _call($method, $data) - { - $client = $this->_getClientInstance(); - $request = array_merge( - [ - 'MsgType' => $method, - 'Version' => $this->_getVersion(), - 'ProcessorId' => $this->getProcessorId(), - 'MerchantId' => $this->getMerchantId(), - 'TransactionPwd' => $this->getTransactionPwd(), - 'TransactionType' => $this->_getTransactionType(), - ], - $data - ); - - $debugData = ['request' => $request]; - - try { - foreach ($request as $key => $val) { - $client->add($key, $val); - } - $client->sendHttp($this->_getApiEndpointUrl(), $this->_getTimeoutConnect(), $this->_getTimeoutRead()); - } catch (\Exception $e) { - $debugData['response'] = ['error' => $e->getMessage(), 'code' => $e->getCode()]; - $this->_debug($debugData); - throw $e; - } - - $debugData['response'] = $client->response; - $this->_debug($debugData); - - return $client; - } - - /** - * Getter for API call URL - * - * @return string - * @throws \Exception - */ - protected function _getApiEndpointUrl() - { - if ($this->getIsTestMode()) { - return 'https://centineltest.cardinalcommerce.com/maps/txns.asp'; - } - $url = $this->getApiEndpointUrl(); - if (!$url) { - throw new \Exception('Centinel API endpoint URL is not configured properly.'); - } - return $url; - } - - /** - * Call centinel api lookup method - * - * @param \Magento\Framework\Object $data - * @return \Magento\Framework\Object - */ - public function callLookup($data) - { - $result = new \Magento\Framework\Object(); - - $month = strlen($data->getCardExpMonth()) == 1 ? '0' . $data->getCardExpMonth() : $data->getCardExpMonth(); - $currencyCode = $data->getCurrencyCode(); - $currencyNumber = isset( - self::$_iso4217Currencies[$currencyCode] - ) ? self::$_iso4217Currencies[$currencyCode] : ''; - if (!$currencyNumber) { - return $result->setErrorNo(1)->setErrorDesc(__('Unsupported currency code: %1.', $currencyCode)); - } - - $clientResponse = $this->_call( - 'cmpi_lookup', - [ - 'Amount' => round($data->getAmount() * 100), - 'CurrencyCode' => $currencyNumber, - 'CardNumber' => $data->getCardNumber(), - 'CardExpMonth' => $month, - 'CardExpYear' => $data->getCardExpYear(), - 'OrderNumber' => $data->getOrderNumber() - ] - ); - - $result->setErrorNo($clientResponse->getValue('ErrorNo')); - $result->setErrorDesc($clientResponse->getValue('ErrorDesc')); - $result->setTransactionId($clientResponse->getValue('TransactionId')); - $result->setEnrolled($clientResponse->getValue('Enrolled')); - $result->setAcsUrl($clientResponse->getValue('ACSUrl')); - $result->setPayload($clientResponse->getValue('Payload')); - $result->setEciFlag($clientResponse->getValue('EciFlag')); - - return $result; - } - - /** - * Call centinel api authentication method - * - * @param \Magento\Framework\Object $data - * @return \Magento\Framework\Object - */ - public function callAuthentication($data) - { - $result = new \Magento\Framework\Object(); - - $clientResponse = $this->_call( - 'cmpi_authenticate', - ['TransactionId' => $data->getTransactionId(), 'PAResPayload' => $data->getPaResPayload()] - ); - - $result->setErrorNo($clientResponse->getValue('ErrorNo')); - $result->setErrorDesc($clientResponse->getValue('ErrorDesc')); - $result->setPaResStatus($clientResponse->getValue('PAResStatus')); - $result->setSignatureVerification($clientResponse->getValue('SignatureVerification')); - $result->setCavv($clientResponse->getValue('Cavv')); - $result->setEciFlag($clientResponse->getValue('EciFlag')); - $result->setXid($clientResponse->getValue('Xid')); - - return $result; - } - - /** - * Log debug data to file - * - * @param array $debugData - * @return void - */ - protected function _debug($debugData) - { - if ($this->getDebugFlag()) { - $this->logger->debug(var_export($debugData, true)); - } - } -} diff --git a/app/code/Magento/Centinel/Model/Config.php b/app/code/Magento/Centinel/Model/Config.php deleted file mode 100644 index 81d187f3ed2ed1abd52e349b4bf9c00fd5ffe19d..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Model/Config.php +++ /dev/null @@ -1,150 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -// @codingStandardsIgnoreFile - -/** - * Config centinel model - */ -namespace Magento\Centinel\Model; - -class Config -{ - /** - * Store id or store model - * - * @var int|\Magento\Store\Model\Store - */ - protected $_store = false; - - /** - * Path of centinel config - * - * @var string - */ - protected $_serviceConfigPath = 'payment_services/centinel'; - - /** - * Core store config - * - * @var \Magento\Framework\App\Config\ScopeConfigInterface - */ - protected $_scopeConfig; - - /** - * Core config interface - * - * @var \Magento\Framework\App\Config\ScopeConfigInterface - */ - protected $_coreConfig; - - /** - * Encryptor interface - * - * @var \Magento\Framework\Encryption\EncryptorInterface - */ - protected $_encryptor; - - /** - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig - * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor - */ - public function __construct( - \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig, - \Magento\Framework\Encryption\EncryptorInterface $encryptor - ) { - $this->_scopeConfig = $scopeConfig; - $this->_coreConfig = $coreConfig; - $this->_encryptor = $encryptor; - } - - /** - * Set store to congif model - * - * @param int|\Magento\Store\Model\Store $store - * @return $this - */ - public function setStore($store) - { - $this->_store = $store; - return $this; - } - - /** - * Return store - * - * @return int|\Magento\Store\Model\Store - */ - public function getStore() - { - return $this->_store; - } - - /** - * Return centinel processorId - * - * @return string - */ - public function getProcessorId() - { - return $this->_getServiceConfigValue('processor_id'); - } - - /** - * Return centinel merchantId - * - * @return string - */ - public function getMerchantId() - { - return $this->_getServiceConfigValue('merchant_id'); - } - - /** - * Return centinel transactionPwd - * - * @return string - */ - public function getTransactionPwd() - { - return $this->_encryptor->decrypt($this->_getServiceConfigValue('password')); - } - - /** - * Return flag - is centinel mode test - * - * @return bool - * @SuppressWarnings(PHPMD.BooleanGetMethodName) - */ - public function getIsTestMode() - { - return (bool)(int)$this->_getServiceConfigValue('test_mode'); - } - - /** - * Return value of node of centinel config section - * - * @param string $key - * @return string - */ - private function _getServiceConfigValue($key) - { - return $this->_scopeConfig->getValue($this->_serviceConfigPath . '/' . $key, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $this->getStore()); - } - - /** - * Define if debugging is enabled - * - * @return bool - * @SuppressWarnings(PHPMD.BooleanGetMethodName) - */ - public function getDebugFlag() - { - return $this->_getServiceConfigValue('debug'); - } -} diff --git a/app/code/Magento/Centinel/Model/Observer.php b/app/code/Magento/Centinel/Model/Observer.php deleted file mode 100644 index 7f3c95ef9ce965e7318ed78bd30016ee4a943023..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Model/Observer.php +++ /dev/null @@ -1,133 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * 3D Secure Validation Model - * - * @author Magento Core Team <core@magentocommerce.com> - */ -namespace Magento\Centinel\Model; - -class Observer extends \Magento\Framework\Object -{ - /** - * Centinel data - * - * @var \Magento\Centinel\Helper\Data - */ - protected $_centinelData = null; - - /** - * Constructor - * - * By default is looking for first argument as array and assigns it as object - * attributes This behavior may change in child classes - * - * @param \Magento\Centinel\Helper\Data $centinelData - * @param array $data - */ - public function __construct(\Magento\Centinel\Helper\Data $centinelData, array $data = []) - { - $this->_centinelData = $centinelData; - parent::__construct($data); - } - - /** - * Set cmpi data to payment - * - * @param \Magento\Framework\Object $observer - * @return $this - */ - public function salesEventConvertQuoteToOrder($observer) - { - $payment = $observer->getEvent()->getQuote()->getPayment(); - - if ($payment->getMethodInstance()->getIsCentinelValidationEnabled()) { - $to = [$payment, 'setAdditionalInformation']; - $payment->getMethodInstance()->getCentinelValidator()->exportCmpiData($to); - } - return $this; - } - - /** - * Add cmpi data to info block - * - * @param \Magento\Framework\Object $observer - * @return void|$this - */ - public function paymentInfoBlockPrepareSpecificInformation($observer) - { - if ($observer->getEvent()->getBlock()->getIsSecureMode()) { - return; - } - - $payment = $observer->getEvent()->getPayment(); - $transport = $observer->getEvent()->getTransport(); - $helper = $this->_centinelData; - - $info = [ - \Magento\Centinel\Model\Service::CMPI_PARES, - \Magento\Centinel\Model\Service::CMPI_ENROLLED, - \Magento\Centinel\Model\Service::CMPI_ECI, - \Magento\Centinel\Model\Service::CMPI_CAVV, - \Magento\Centinel\Model\Service::CMPI_XID, - ]; - foreach ($info as $key) { - if ($value = $payment->getAdditionalInformation($key)) { - $transport->setData($helper->getCmpiLabel($key), $helper->getCmpiValue($key, $value)); - } - } - return $this; - } - - /** - * Add centinel logo block into payment form - * - * @param \Magento\Framework\Object $observer - * @return $this - */ - public function paymentFormBlockToHtmlBefore($observer) - { - $paymentFormBlock = $observer->getEvent()->getBlock(); - $method = $paymentFormBlock->getMethod(); - - if ($method && $method->getIsCentinelValidationEnabled()) { - $layout = $paymentFormBlock->getLayout(); - $block = $layout->createBlock('Magento\Centinel\Block\Logo'); - $block->setMethod($method); - - $paymentFormBlock->setChild( - 'payment.method.' . $method->getCode() . 'centinel.logo', - $block - ); - } - return $this; - } - - /** - * Reset validation data - * - * @param \Magento\Framework\Object $observer - * @return $this - */ - public function checkoutSubmitAllAfter($observer) - { - $method = false; - - if ($order = $observer->getEvent()->getOrder()) { - $method = $order->getPayment()->getMethodInstance(); - } elseif ($orders = $observer->getEvent()->getOrders()) { - if ($order = array_shift($orders)) { - $method = $order->getPayment()->getMethodInstance(); - } - } - - if ($method && $method->getIsCentinelValidationEnabled()) { - $method->getCentinelValidator()->reset(); - } - return $this; - } -} diff --git a/app/code/Magento/Centinel/Model/Service.php b/app/code/Magento/Centinel/Model/Service.php deleted file mode 100644 index b21fc2db737974dfa8f38809a5fa3c7e64802e88..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Model/Service.php +++ /dev/null @@ -1,448 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Centinel\Model; - -/** - * 3D Secure Validation Model - */ -class Service extends \Magento\Framework\Object -{ - /** - * Cmpi public keys - */ - const CMPI_PARES = 'centinel_authstatus'; - - const CMPI_ENROLLED = 'centinel_mpivendor'; - - const CMPI_CAVV = 'centinel_cavv'; - - const CMPI_ECI = 'centinel_eci'; - - const CMPI_XID = 'centinel_xid'; - - /** - * State cmpi results to public map - * - * @var array - */ - protected $_cmpiMap = [ - 'lookup_enrolled' => self::CMPI_ENROLLED, - 'lookup_eci_flag' => self::CMPI_ECI, - 'authenticate_pa_res_status' => self::CMPI_PARES, - 'authenticate_cavv' => self::CMPI_CAVV, - 'authenticate_eci_flag' => self::CMPI_ECI, - 'authenticate_xid' => self::CMPI_XID, - ]; - - /** - * Validation api model factory - * - * @var \Magento\Centinel\Model\Api - */ - protected $_apiFactory; - - /** - * Config - * - * @var \Magento\Centinel\Model\Config - */ - protected $_config; - - /** - * Backend url - * - * @var \Magento\Framework\UrlInterface - */ - protected $_url; - - /** - * Centinel session - * - * @var \Magento\Framework\Session\SessionManagerInterface - */ - protected $_centinelSession; - - /** - * State factory - * - * @var \Magento\Centinel\Model\StateFactory - */ - protected $_stateFactory; - - /** - * Validation state model - * - * @var \Magento\Centinel\Model\AbstractState - */ - protected $_validationState; - - /** - * Url prefix - * - * @var string - */ - protected $_urlPrefix; - - /** - * @var \Magento\Framework\Data\Form\FormKey - */ - protected $formKey; - - /** - * @param \Magento\Centinel\Model\Config $config - * @param \Magento\Centinel\Model\ApiFactory $apiFactory - * @param \Magento\Framework\UrlInterface $url - * @param \Magento\Framework\Session\SessionManagerInterface $centinelSession - * @param \Magento\Centinel\Model\StateFactory $stateFactory - * @param \Magento\Framework\Data\Form\FormKey $formKey - * @param string $urlPrefix - * @param array $data - */ - public function __construct( - \Magento\Centinel\Model\Config $config, - \Magento\Centinel\Model\ApiFactory $apiFactory, - \Magento\Framework\UrlInterface $url, - \Magento\Framework\Session\SessionManagerInterface $centinelSession, - \Magento\Centinel\Model\StateFactory $stateFactory, - \Magento\Framework\Data\Form\FormKey $formKey, - $urlPrefix = 'centinel/index/', - array $data = [] - ) { - $this->_config = $config; - $this->_apiFactory = $apiFactory; - $this->_url = $url; - $this->_centinelSession = $centinelSession; - $this->_stateFactory = $stateFactory; - $this->formKey = $formKey; - $this->_urlPrefix = $urlPrefix; - parent::__construct($data); - } - - /** - * Return value from section of centinel config - * - * @return \Magento\Centinel\Model\Config - */ - protected function _getConfig() - { - return $this->_config->setStore($this->getStore()); - } - - /** - * Generate checksum from all passed parameters - * - * @param string $paymentMethodCode - * @param string $cardType - * @param string $cardNumber - * @param string $cardExpMonth - * @param string $cardExpYear - * @param float $amount - * @param string $currencyCode - * @return string - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - protected function _generateChecksum( - $paymentMethodCode, - $cardType, - $cardNumber, - $cardExpMonth, - $cardExpYear, - $amount, - $currencyCode - ) { - return md5(implode(func_get_args(), '_')); - } - - /** - * Unified validation/authentication URL getter - * - * @param string $suffix - * @param bool $current - * @return string - */ - protected function _getUrl($suffix, $current = false) - { - $params = [ - '_secure' => true, - '_current' => $current, - 'form_key' => $this->formKey->getFormKey(), - 'isIframe' => true, - ]; - return $this->_url->getUrl($this->_urlPrefix . $suffix, $params); - } - - /** - * Return validation api model - * - * @return \Magento\Centinel\Model\Api - */ - protected function _getApi() - { - $config = $this->_getConfig(); - $api = $this->_apiFactory->create(); - $api->setProcessorId( - $config->getProcessorId() - )->setMerchantId( - $config->getMerchantId() - )->setTransactionPwd( - $config->getTransactionPwd() - )->setIsTestMode( - $config->getIsTestMode() - )->setDebugFlag( - $config->getDebugFlag() - )->setApiEndpointUrl( - $this->getCustomApiEndpointUrl() - ); - return $api; - } - - /** - * Return validation state model - * - * @param string $cardType - * @return \Magento\Centinel\Model\AbstractState - */ - protected function _getValidationState($cardType = null) - { - $type = $cardType ? $cardType : $this->_centinelSession->getData('card_type'); - if (!$this->_validationState && $type) { - $model = $this->_stateFactory->createState($type); - if (!$model) { - return false; - } - $model->setDataStorage($this->_centinelSession); - $this->_validationState = $model; - } - return $this->_validationState; - } - - /** - * Drop validation state model - * - * @return void - */ - protected function _resetValidationState() - { - $this->_centinelSession->setData([]); - $this->_validationState = false; - } - - /** - * Drop old and init new validation state model - * - * @param string $cardType - * @param string $dataChecksum - * @return \Magento\Centinel\Model\AbstractState - */ - protected function _initValidationState($cardType, $dataChecksum) - { - $this->_resetValidationState(); - $state = $this->_stateFactory->createState($cardType); - $state->setDataStorage( - $this->_centinelSession - )->setCardType( - $cardType - )->setChecksum( - $dataChecksum - )->setIsModeStrict( - $this->getIsModeStrict() - ); - return $this->_getValidationState(); - } - - /** - * Process lookup validation and init new validation state model - * - * @param \Magento\Framework\Object $data - * @return void - */ - public function lookup($data) - { - $newChecksum = $this->_generateChecksum( - $data->getPaymentMethodCode(), - $data->getCardType(), - $data->getCardNumber(), - $data->getCardExpMonth(), - $data->getCardExpYear(), - $data->getAmount(), - $data->getCurrencyCode() - ); - - $validationState = $this->_initValidationState($data->getCardType(), $newChecksum); - - $api = $this->_getApi(); - $result = $api->callLookup($data); - $validationState->setLookupResult($result); - } - - /** - * Process authenticate validation - * - * @param \Magento\Framework\Object $data - * @return void - * @throws \Exception - */ - public function authenticate($data) - { - $validationState = $this->_getValidationState(); - if (!$validationState || $data->getTransactionId() != $validationState->getLookupTransactionId()) { - throw new \Exception('Authentication impossible: transaction id or validation state is wrong.'); - } - - $api = $this->_getApi(); - $result = $api->callAuthentication($data); - $validationState->setAuthenticateResult($result); - if (!$validationState->isAuthenticateSuccessful()) { - $this->reset(); - } - } - - /** - * Validate payment data - * - * This check is performed on payment information submission, as well as on placing order. - * Workflow state is stored validation state model - * - * @param \Magento\Framework\Object $data - * @return void - * @throws \Magento\Framework\Exception\LocalizedException - */ - public function validate($data) - { - $newChecksum = $this->_generateChecksum( - $data->getPaymentMethodCode(), - $data->getCardType(), - $data->getCardNumber(), - $data->getCardExpMonth(), - $data->getCardExpYear(), - $data->getAmount(), - $data->getCurrencyCode() - ); - - $validationState = $this->_getValidationState($data->getCardType()); - if (!$validationState) { - $this->_resetValidationState(); - return; - } - - // check whether is authenticated before placing order - if ($this->getIsPlaceOrder()) { - if ($validationState->getChecksum() != $newChecksum) { - throw new \Magento\Framework\Exception\LocalizedException( - __('Payment information error. Please start over.') - ); - } - if ($validationState->isAuthenticateSuccessful()) { - return; - } - throw new \Magento\Framework\Exception\LocalizedException( - __('Please verify the card with the issuer bank before placing the order.') - ); - } else { - if ($validationState->getChecksum() != $newChecksum || !$validationState->isLookupSuccessful()) { - $this->lookup($data); - $validationState = $this->_getValidationState(); - } - if ($validationState->isLookupSuccessful()) { - return; - } - throw new \Magento\Framework\Exception\LocalizedException( - __('This card has failed validation and cannot be used.') - ); - } - } - - /** - * Reset validation state and drop api object - * - * @return $this - */ - public function reset() - { - $this->_resetValidationState(); - return $this; - } - - /** - * Return URL for authentication - * - * @return string - */ - public function getAuthenticationStartUrl() - { - return $this->_getUrl('authenticationstart'); - } - - /** - * Return URL for validation - * - * @return string - */ - public function getValidatePaymentDataUrl() - { - return $this->_getUrl('validatepaymentdata'); - } - - /** - * If authenticate is should return true - * - * @return bool - */ - public function shouldAuthenticate() - { - $validationState = $this->_getValidationState(); - return $validationState && $validationState->isAuthenticateAllowed(); - } - - /** - * Return data for start authentication (redirect customer to bank page) - * - * @return array - */ - public function getAuthenticateStartData() - { - $validationState = $this->_getValidationState(); - if (!$validationState && $this->shouldAuthenticate()) { - throw new \Exception('Authentication impossible: validation state is wrong.'); - } - $data = [ - 'acs_url' => $validationState->getLookupAcsUrl(), - 'pa_req' => $validationState->getLookupPayload(), - 'term_url' => $this->_getUrl('authenticationcomplete', true), - 'md' => $validationState->getLookupTransactionId(), - ]; - return $data; - } - - /** - * If authenticate is successful return true - * - * @return bool - */ - public function isAuthenticateSuccessful() - { - $validationState = $this->_getValidationState(); - return $validationState && $validationState->isAuthenticateSuccessful(); - } - - /** - * Export cmpi lookups and authentication information stored in session into array - * - * @param array|object $to - * @param array|bool $map - * @return array|object - */ - public function exportCmpiData($to, $map = false) - { - if (!$map) { - $map = $this->_cmpiMap; - } - if ($validationState = $this->_getValidationState()) { - $to = \Magento\Framework\Object\Mapper::accumulateByMap($validationState, $to, $map); - } - return $to; - } -} diff --git a/app/code/Magento/Centinel/Model/State/Jcb.php b/app/code/Magento/Centinel/Model/State/Jcb.php deleted file mode 100644 index 82ab2944c32d2a1de9e4692a1d354b162245973b..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Model/State/Jcb.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Validation State Model for JCB - */ -namespace Magento\Centinel\Model\State; - -class Jcb extends \Magento\Centinel\Model\AbstractState -{ - /** - * Analyse lookup`s results. If it has require params for authenticate, return true - * - * @return bool - */ - public function isAuthenticateAllowed() - { - return $this->_isLookupStrictSuccessful() && $this->getAuthenticateEciFlag() === null; - } - - /** - * Analyse authenticate`s results. If authenticate is successful return true and false if it failure - * Result depends from flag self::getIsModeStrict() - * - * @return bool - */ - public function isAuthenticateSuccessful() - { - if (!$this->getIsModeStrict() && $this->_isLookupSoftSuccessful()) { - return true; - } - - if ($this->_isLookupStrictSuccessful()) { - if ($this->_isAuthenticationSuccessful()) { - return true; - } - if ($this->_isAuthenticationUnavailable() && !$this->getIsModeStrict()) { - return true; - } - if ($this->_isAuthenticationAttemptsPerformed()) { - return true; - } - } - - return false; - } - - /** - * Returns true if authentication successful (Test case 1) - * - * @return bool - */ - protected function _isAuthenticationSuccessful() - { - return $this->getAuthenticatePaResStatus() === 'Y' && - $this->getAuthenticateEciFlag() === '05' && - $this->getAuthenticateXid() != '' && - $this->getAuthenticateCavv() != '' && - $this->getAuthenticateErrorNo() === '0' && - $this->getAuthenticateSignatureVerification() === 'Y'; - } - - /** - * Returns true if authentication unavailable (Test case 4) or timeout encountered (Test case 5) - * - * @return bool - */ - protected function _isAuthenticationUnavailable() - { - return $this->getAuthenticatePaResStatus() === 'U' && - $this->getAuthenticateSignatureVerification() === 'Y' && - $this->getAuthenticateEciFlag() === '07' && - $this->getAuthenticateXid() != '' && - $this->getAuthenticateCavv() === '' && - $this->getAuthenticateErrorNo() === '0'; - } - - /** - * Returns true if processing attempts performed (Test case 11) - * - * @return bool - */ - protected function _isAuthenticationAttemptsPerformed() - { - return $this->getAuthenticatePaResStatus() === 'A' && - $this->getAuthenticateSignatureVerification() === 'Y' && - $this->getAuthenticateEciFlag() === '06' && - $this->getAuthenticateXid() != '' && - $this->getAuthenticateCavv() != '' && - $this->getAuthenticateErrorNo() === '0'; - } - - /** - * Analyse lookup`s results. If lookup is strict successful return true (Test cases 1-4, 6, 10-11) - * - * @return bool - */ - protected function _isLookupStrictSuccessful() - { - return $this->getLookupEnrolled() === 'Y' && - $this->getLookupAcsUrl() != '' && - $this->getLookupPayload() != '' && - $this->getLookupErrorNo() === '0'; - } - - /** - * Analyse lookup`s results. If lookup is soft successful return true (Test cases 5,7,8,9) - * - * @return bool - */ - protected function _isLookupSoftSuccessful() - { - $acsUrl = $this->getLookupAcsUrl(); - $payload = $this->getLookupPayload(); - $errorNo = $this->getLookupErrorNo(); - $enrolled = $this->getLookupEnrolled(); - - if ($acsUrl !== '' || $payload !== '') { - return false; - } - - if ($enrolled === '' && $errorNo === '0') { - return true; - } - - if ($enrolled === 'U' && ($errorNo === '0' || $errorNo !== '')) { - return true; - } - - return false; - } -} diff --git a/app/code/Magento/Centinel/Model/State/Mastercard.php b/app/code/Magento/Centinel/Model/State/Mastercard.php deleted file mode 100644 index 803dc7d12e63120a7a5e8e57ac5db447f9e835f2..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Model/State/Mastercard.php +++ /dev/null @@ -1,164 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Abstract Validation State Model for Mastercard - */ -namespace Magento\Centinel\Model\State; - -class Mastercard extends \Magento\Centinel\Model\AbstractState -{ - /** - * Analyse lookup`s results. If it has require params for authenticate, return true - * - * @return bool - */ - public function isAuthenticateAllowed() - { - return $this->_isLookupStrictSuccessful() && $this->getAuthenticateEciFlag() === null; - } - - /** - * Analyse authenticate`s results. If authenticate is successful return true and false if it failure - * Result depends from flag self::getIsModeStrict() - * - * @return bool - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.NPathComplexity) - */ - public function isAuthenticateSuccessful() - { - $paResStatus = $this->getAuthenticatePaResStatus(); - $eciFlag = $this->getAuthenticateEciFlag(); - $xid = $this->getAuthenticateXid(); - $cavv = $this->getAuthenticateCavv(); - $errorNo = $this->getAuthenticateErrorNo(); - $signatureVerification = $this->getAuthenticateSignatureVerification(); - - //Test cases 1-4, 10 - if ($this->_isLookupStrictSuccessful()) { - if ($paResStatus == 'Y' && $eciFlag == '02' && $xid != '' && $cavv != '' && $errorNo == '0') { - //Test case 1 - if ($signatureVerification == 'Y') { - return true; - } - //Test case 2 - if ($signatureVerification == 'N') { - return false; - } - } - - //Test case 3 - if ($paResStatus == 'N' && - $signatureVerification == 'Y' && - $eciFlag == '01' && - $xid != '' && - $cavv == '' && - $errorNo == '0' - ) { - return false; - } - - //Test case 4 - if ($paResStatus == 'U' && - $signatureVerification == 'Y' && - $eciFlag == '01' && - $xid != '' && - $cavv == '' && - $errorNo == '0' - ) { - if ($this->getIsModeStrict()) { - return false; - } else { - return true; - } - } - - //Test case 10 - if ($paResStatus == '' && - $signatureVerification == '' && - $eciFlag == '01' && - $xid == '' && - $cavv == '' && - $errorNo == '1050' - ) { - return false; - } - } - - //Test cases 5-9 - if (!$this->getIsModeStrict() && $this->_isLookupSoftSuccessful()) { - if ($paResStatus == '' && - $signatureVerification == '' && - $eciFlag == '' && - $xid == '' && - $cavv == '' && - $errorNo == '0' - ) { - return true; - } elseif ($paResStatus == false && - $signatureVerification == false && - $eciFlag == false && - $xid == false && - $cavv == false && - $errorNo == false - ) { - return true; - } - } - - return false; - } - - /** - * Analyse lookup`s results. If lookup is strict successful return true - * - * @return bool - */ - protected function _isLookupStrictSuccessful() - { - //Test cases 1-4, 10 - if ($this->getLookupEnrolled() == 'Y' && - $this->getLookupAcsUrl() != '' && - $this->getLookupPayload() != '' && - $this->getLookupErrorNo() == '0' - ) { - return true; - } - return false; - } - - /** - * Analyse lookup`s results. If lookup is soft successful return true - * - * @return bool - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - */ - protected function _isLookupSoftSuccessful() - { - $acsUrl = $this->getLookupAcsUrl(); - $payload = $this->getLookupPayload(); - $errorNo = $this->getLookupErrorNo(); - $enrolled = $this->getLookupEnrolled(); - - //Test cases 6,7 - if ($acsUrl == '' && $payload == '' && $errorNo == '0' && ($enrolled == 'N' || $enrolled == 'U')) { - return true; - } - - //Test case 5 - if ($enrolled == '' && $acsUrl == '' && $payload == '' && $errorNo == 'Timeout number') { - return true; - } - - //Test cases 8,9 - if ($enrolled == 'U' && $acsUrl == '' && $payload == '' && $errorNo == '1001') { - return true; - } - - return false; - } -} diff --git a/app/code/Magento/Centinel/Model/State/Visa.php b/app/code/Magento/Centinel/Model/State/Visa.php deleted file mode 100644 index d667cc51daa154e80cac7ad59efcb32dd65399d8..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Model/State/Visa.php +++ /dev/null @@ -1,184 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Abstract Validation State Model for Visa - */ -namespace Magento\Centinel\Model\State; - -class Visa extends \Magento\Centinel\Model\AbstractState -{ - /** - * Analyse lookup`s results. If it has require params for authenticate, return true - * - * @return bool - */ - public function isAuthenticateAllowed() - { - return $this->_isLookupStrictSuccessful() && $this->getAuthenticateEciFlag() === null; - } - - /** - * Analyse authenticate`s results. If authenticate is successful return true and false if it failure - * Result depends from flag self::getIsModeStrict() - * - * @return bool - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.NPathComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - public function isAuthenticateSuccessful() - { - $paResStatus = $this->getAuthenticatePaResStatus(); - $eciFlag = $this->getAuthenticateEciFlag(); - $xid = $this->getAuthenticateXid(); - $cavv = $this->getAuthenticateCavv(); - $errorNo = $this->getAuthenticateErrorNo(); - $signatureVerification = $this->getAuthenticateSignatureVerification(); - - //Test cases 1-5, 11 - if ($this->_isLookupStrictSuccessful()) { - if ($paResStatus == 'Y' && $eciFlag == '05' && $xid != '' && $cavv != '' && $errorNo == '0') { - //Test case 1 - if ($signatureVerification == 'Y') { - return true; - } - //Test case 2 - if ($signatureVerification == 'N') { - return false; - } - } - - //Test case 3 - if ($paResStatus == 'N' && - $signatureVerification == 'Y' && - $eciFlag == '07' && - $xid != '' && - $cavv == '' && - $errorNo == '0' - ) { - return false; - } - - //Test case 4 - if ($paResStatus == 'A' && - $signatureVerification == 'Y' && - $eciFlag == '06' && - $xid != '' && - $cavv != '' && - $errorNo == '0' - ) { - if ($this->getIsModeStrict()) { - return false; - } else { - return true; - } - } - - //Test case 5 - if ($paResStatus == 'U' && - $signatureVerification == 'Y' && - $eciFlag == '07' && - $xid != '' && - $cavv == '' && - $errorNo == '0' - ) { - if ($this->getIsModeStrict()) { - return false; - } else { - return true; - } - } - - //Test case 11 - if ($paResStatus == 'U' && - $signatureVerification == '' && - $eciFlag == '07' && - $xid == '' && - $cavv == '' && - $errorNo == '1050' - ) { - if ($this->getIsModeStrict()) { - return false; - } else { - return true; - } - } - } - - //Test cases 6-10 - if (!$this->getIsModeStrict() && $this->_isLookupSoftSuccessful()) { - if ($paResStatus == '' && - $signatureVerification == '' && - $eciFlag == '' && - $xid == '' && - $cavv == '' && - $errorNo == '0' - ) { - return true; - } elseif ($paResStatus == false && - $signatureVerification == false && - $eciFlag == false && - $xid == false && - $cavv == false && - $errorNo == false - ) { - return true; - } - } - - return false; - } - - /** - * Analyse lookup`s results. If lookup is strict successful return true - * - * @return bool - */ - protected function _isLookupStrictSuccessful() - { - //Test cases 1-5, 11 - if ($this->getLookupEnrolled() == 'Y' && - $this->getLookupAcsUrl() != '' && - $this->getLookupPayload() != '' && - $this->getLookupErrorNo() == '0' - ) { - return true; - } - return false; - } - - /** - * Analyse lookup`s results. If lookup is soft successful return true - * - * @return bool - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - */ - protected function _isLookupSoftSuccessful() - { - $acsUrl = $this->getLookupAcsUrl(); - $payload = $this->getLookupPayload(); - $errorNo = $this->getLookupErrorNo(); - $enrolled = $this->getLookupEnrolled(); - - //Test cases 7,8 - if ($acsUrl == '' && $payload == '' && $errorNo == '0' && ($enrolled == 'N' || $enrolled == 'U')) { - return true; - } - - //Test case 6 - if ($enrolled == '' && $acsUrl == '' && $payload == '' && $errorNo == 'Timeout number') { - return true; - } - - //Test cases 9,10 - if ($enrolled == 'U' && $acsUrl == '' && $payload == '' && $errorNo == '1001') { - return true; - } - - return false; - } -} diff --git a/app/code/Magento/Centinel/Model/StateFactory.php b/app/code/Magento/Centinel/Model/StateFactory.php deleted file mode 100644 index 71e949e5e6056c3a3dfb30b4a08628e46c47d26b..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Model/StateFactory.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Factory class for Credit Card types - */ -namespace Magento\Centinel\Model; - -class StateFactory -{ - /** - * Object manager - * - * @var \Magento\Framework\ObjectManagerInterface - */ - protected $_objectManager; - - /** - * State class map - * - * @var array - */ - protected $_stateClassMap; - - /** - * @param \Magento\Framework\ObjectManagerInterface $objectManager - * @param array $stateClassMap - key stands for card type, value define the validator class - */ - public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager, array $stateClassMap = []) - { - $this->_objectManager = $objectManager; - $this->_stateClassMap = $stateClassMap; - } - - /** - * Create state object - * - * @param string $cardType - * @return \Magento\Centinel\Model\AbstractState|false - */ - public function createState($cardType) - { - if (!isset($this->_stateClassMap[$cardType])) { - return false; - } - return $this->_objectManager->create($this->_stateClassMap[$cardType]); - } -} diff --git a/app/code/Magento/Centinel/README.md b/app/code/Magento/Centinel/README.md deleted file mode 100644 index f0b3f3f7bd25313039e468ca578cb01c10cc5570..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/README.md +++ /dev/null @@ -1 +0,0 @@ -The Magento_Centinel module implements the integration with Centinel (Cardinal Centinel Thin Client), a payment gateway from Cardinal Commerce, and enables 3-D Secure credit card validation (that is, Verified by Visa, MasterCard SecureCode and JCB J/Secure Payer Authentication programs). diff --git a/app/code/Magento/Centinel/Test/Unit/Model/ObserverTest.php b/app/code/Magento/Centinel/Test/Unit/Model/ObserverTest.php deleted file mode 100644 index a37c377bc7600c379c25a815872be5bc80349231..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Test/Unit/Model/ObserverTest.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Centinel\Test\Unit\Model; - -class ObserverTest extends \PHPUnit_Framework_TestCase -{ - public function testPaymentFormBlockToHtmlBefore() - { - $method = $this->getMockBuilder('Magento\Framework\Model\AbstractExtensibleModel') - ->disableOriginalConstructor() - ->setMethods(['getIsCentinelValidationEnabled', 'getCode']) - ->getMockForAbstractClass(); - $method->expects($this->once()) - ->method('getIsCentinelValidationEnabled') - ->will($this->returnValue(true)); - - $method->expects($this->once()) - ->method('getCode') - ->willReturn('payflowpro'); - - $blockLogo = $this->getMock( - 'Magento\Centinel\Block\Logo', - ['setMethod'], - [], - '', - false - ); - $blockLogo->expects($this->once()) - ->method('setMethod') - ->with($method); - - $layout = $this->getMock( - 'Magento\Framework\View\Layout', - ['createBlock'], - [], - '', - false - ); - $layout->expects($this->once()) - ->method('createBlock') - ->will($this->returnValue($blockLogo)); - - $block = $this->getMock( - 'Magento\Framework\View\Element\Template', - ['getMethod', 'getLayout', 'setChild'], - [], - '', - false - ); - $block->expects($this->once()) - ->method('getMethod') - ->will($this->returnValue($method)); - $block->expects($this->once()) - ->method('getLayout') - ->will($this->returnValue($layout)); - $block->expects($this->once()) - ->method('setChild') - ->with('payment.method.payflowprocentinel.logo', $blockLogo); - - $event = $this->getMock( - 'Magento\Framework\Event', - ['getBlock'], - [], - '', - false - ); - $event->expects($this->once()) - ->method('getBlock') - ->will($this->returnValue($block)); - - $observer = $this->getMock( - 'Magento\Framework\Event\Observer', - [], - [], - '', - false - ); - $observer->expects($this->once()) - ->method('getEvent') - ->will($this->returnValue($event)); - - $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); - /** @var \Magento\Centinel\Model\Observer $model */ - $model = $this->objectManager->getObject('Magento\Centinel\Model\Observer'); - - $this->assertEquals($model->paymentFormBlockToHtmlBefore($observer), $model); - } -} diff --git a/app/code/Magento/Centinel/Test/Unit/Model/ServiceTest.php b/app/code/Magento/Centinel/Test/Unit/Model/ServiceTest.php deleted file mode 100644 index e9b5237e16ead347fa64ebafda32d99533ba6392..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Test/Unit/Model/ServiceTest.php +++ /dev/null @@ -1,137 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Test class for \Magento\Centinel\Model\Service - */ -namespace Magento\Centinel\Test\Unit\Model; - -class ServiceTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers \Magento\Centinel\Model\Service::getAuthenticationStartUrl - * @covers \Magento\Centinel\Model\Service::_getUrl - */ - public function testGetAuthenticationStartUrl() - { - $url = $this->getMock('Magento\Framework\Url', ['getUrl'], [], '', false); - $url->expects( - $this->once() - )->method( - 'getUrl' - )->with( - $this->equalTo('url_prefix/authenticationstart'), - $this->equalTo(['_secure' => true, '_current' => false, 'form_key' => false, 'isIframe' => true]) - )->will( - $this->returnValue('some value') - ); - - $helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); - /** @var \Magento\Centinel\Model\Service $model */ - $model = $helper->getObject( - 'Magento\Centinel\Model\Service', - ['url' => $url, 'urlPrefix' => 'url_prefix/'] - ); - $this->assertEquals('some value', $model->getAuthenticationStartUrl()); - } - - public function testLookup() - { - $centinelSession = $this->getMock( - 'Magento\Framework\Session\SessionManager', - ['setData', 'getData'], - [], - '', - false - ); - $centinelSession->expects($this->once())->method('setData')->with([]); - $centinelSession->expects($this->once())->method('getData')->will($this->returnValue('cardType')); - - $api = $this->getMock( - 'Magento\Centinel\Model\Api', - [ - 'setProcessorId', - 'setMerchantId', - 'setTransactionPwd', - 'setIsTestMode', - 'setDebugFlag', - 'callLookup' - ], - [], - '', - false - ); - $api->expects($this->once())->method('setProcessorId')->will($this->returnValue($api)); - $api->expects($this->once())->method('setMerchantId')->will($this->returnValue($api)); - $api->expects($this->once())->method('setTransactionPwd')->will($this->returnValue($api)); - $api->expects($this->once())->method('setIsTestMode')->will($this->returnValue($api)); - $api->expects($this->once())->method('setDebugFlag')->will($this->returnValue($api)); - $api->expects($this->once())->method('callLookup')->will($this->returnValue('result')); - $apiFactory = $this->getMock('Magento\Centinel\Model\ApiFactory', ['create'], [], '', false); - $apiFactory->expects($this->once())->method('create')->will($this->returnValue($api)); - - $state = $this->getMock( - '\Magento\Centinel\Model\State', - ['setDataStorage', 'setCardType', 'setChecksum', 'setIsModeStrict', 'setLookupResult'], - [], - '', - false - ); - $state->expects( - $this->any() - )->method( - 'setDataStorage' - )->with( - $centinelSession - )->will( - $this->returnValue($state) - ); - $state->expects($this->once())->method('setCardType')->with('cardType')->will($this->returnValue($state)); - $state->expects($this->once())->method('setChecksum')->will($this->returnValue($state)); - $state->expects($this->once())->method('setLookupResult')->with('result'); - $stateFactory = $this->getMock( - '\Magento\Centinel\Model\StateFactory', - ['createState'], - [], - '', - false - ); - $stateFactory->expects( - $this->any() - )->method( - 'createState' - )->with( - 'cardType' - )->will( - $this->returnValue($state) - ); - - $config = $this->getMock( - '\Magento\Centinel\Model\Config', - ['setStore', 'getProcessorId', 'getMerchantId', 'getTransactionPwd', 'getIsTestMode', 'getDebugFlag'], - [], - '', - false - ); - $config->expects($this->once())->method('setStore')->will($this->returnValue($config)); - - $helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); - /** @var \Magento\Centinel\Model\Service $model */ - $model = $helper->getObject( - 'Magento\Centinel\Model\Service', - [ - 'apiFactory' => $apiFactory, - 'centinelSession' => $centinelSession, - 'stateFactory' => $stateFactory, - 'config' => $config - ] - ); - - $data = new \Magento\Framework\Object(['card_type' => 'cardType']); - - $model->lookup($data); - } -} diff --git a/app/code/Magento/Centinel/Test/Unit/Model/State/JcbTest.php b/app/code/Magento/Centinel/Test/Unit/Model/State/JcbTest.php deleted file mode 100644 index bf72a0b64e878ffef4f4cb30d3d7e634423dbeac..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Test/Unit/Model/State/JcbTest.php +++ /dev/null @@ -1,848 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Test class for \Magento\Centinel\Model\State\Jcb. - */ -namespace Magento\Centinel\Test\Unit\Model\State; - -class JcbTest extends \PHPUnit_Framework_TestCase -{ - /** - * State model - * - * @var \Magento\Centinel\Model\State\Jcb - */ - protected $_model; - - protected function setUp() - { - $this->_model = new \Magento\Centinel\Model\State\Jcb(); - $this->_model->setDataStorage(new \Magento\Framework\Object()); - } - - /** - * @param bool $result - * @param array $lookupResults - * @param array $params - * @dataProvider testIsAuthenticateAllowedDataProvider - */ - public function testIsAuthenticateAllowed($result, $lookupResults, $params) - { - $this->_model->setLookupResult(new \Magento\Framework\Object($lookupResults)); - $this->_model->setAuthenticateResult(new \Magento\Framework\Object($params)); - $this->assertEquals($result, $this->_model->isAuthenticateAllowed()); - } - - public function testIsAuthenticateAllowedDataProvider() - { - return [ - 'successful lookup and empty authentication' => [ - true, - [ - 'enrolled' => 'Y', - 'acs_url' => 'no empty value', - 'payload' => 'no empty value', - 'error_no' => '0' - ], - [], - ], - 'wrong lookup and empty authentication' => [false, [], []], - 'successful lookup and not empty authentication' => [ - false, - [ - 'enrolled' => 'Y', - 'acs_url' => 'no empty value', - 'payload' => 'no empty value', - 'error_no' => '0' - ], - ['eci_flag' => 'value'], - ], - 'wrong lookup and not empty authentication' => [false, [], ['eci_flag' => 'value']] - ]; - } - - public function testIsAuthenticateSuccessfulWithSoftLookup() - { - $lookupResults = ['enrolled' => '', 'acs_url' => '', 'payload' => '', 'error_no' => '0']; - $this->_model->setLookupResult(new \Magento\Framework\Object($lookupResults)); - - $this->_model->setIsModeStrict(true); - $this->assertEquals(false, $this->_model->isAuthenticateSuccessful()); - - $this->_model->setIsModeStrict(false); - $this->assertEquals(true, $this->_model->isAuthenticateSuccessful()); - } - - /** - * @param bool $result - * @param bool $strictMode - * @param array $params - * @dataProvider isAuthenticateSuccessfulDataProvider - */ - public function testIsAuthenticateSuccessful($result, $strictMode, $params) - { - $strictMode = $strictMode; - // PHPMD bug: unused local variable warning - $this->_model->setIsModeStrict($strictMode); - $lookupResult = [ - 'enrolled' => 'Y', - 'acs_url' => 'no empty value', - 'payload' => 'no empty value', - 'error_no' => '0', - ]; - $this->_model->setLookupResult(new \Magento\Framework\Object($lookupResult)); - $this->_model->setAuthenticateResult(new \Magento\Framework\Object($params)); - - $this->assertEquals($result, $this->_model->isAuthenticateSuccessful()); - } - - public function isAuthenticateSuccessfulDataProvider() - { - return array_merge( - $this->_getAuthenticationSuccessfulData(), - $this->_getAuthenticationUnavailableData(), - $this->_getProcessingAttemptsPerformedData(), - [ - 'Centinel case 2' => [ - false, - true, - [ - 'pa_res_status' => 'Y', - 'eci_flag' => '05', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => '0', - 'signature_verification' => 'N' - ], - ], - 'Centinel case 3' => [ - false, - true, - [ - 'pa_res_status' => 'N', - 'signature_verification' => 'Y', - 'eci_flag' => '07', - 'xid' => 'some string', - 'cavv' => '', - 'error_no' => '0' - ], - ], - 'Centinel case 10' => [ - false, - true, - [ - 'pa_res_status' => '', - 'signature_verification' => '', - 'eci_flag' => '07', - 'xid' => '', - 'cavv' => '', - 'error_no' => 'not zero' - ], - ] - ] - ); - } - - /** - * Data for successful authentication - * - * @return array - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - protected function _getAuthenticationSuccessfulData() - { - return [ - 'Centinel case 1' => [ - true, - true, - [ - 'pa_res_status' => 'Y', - 'eci_flag' => '05', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => '0', - 'signature_verification' => 'Y' - ], - ], - 'Centinel case 1 pa_res_status is absent' => [ - false, - true, - [ - 'eci_flag' => '05', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => '0', - 'signature_verification' => 'Y' - ], - ], - 'Centinel case 1 eci_flag is absent' => [ - false, - true, - [ - 'pa_res_status' => 'Y', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => '0', - 'signature_verification' => 'Y' - ], - ], - 'Centinel case 1 xid is absent' => [ - false, - true, - [ - 'pa_res_status' => 'Y', - 'eci_flag' => '05', - 'cavv' => 'some string', - 'error_no' => '0', - 'signature_verification' => 'Y' - ], - ], - 'Centinel case 1 cavv is absent' => [ - false, - true, - [ - 'pa_res_status' => 'Y', - 'eci_flag' => '05', - 'xid' => 'some string', - 'error_no' => '0', - 'signature_verification' => 'Y' - ], - ], - 'Centinel case 1 error_no is absent' => [ - false, - true, - [ - 'pa_res_status' => 'Y', - 'eci_flag' => '05', - 'xid' => 'some string', - 'cavv' => 'some string', - 'signature_verification' => 'Y' - ], - ], - 'Centinel case 1 signature_verification is absent' => [ - false, - true, - [ - 'pa_res_status' => 'Y', - 'eci_flag' => '05', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => '0' - ], - ], - 'Centinel case 1 wrong pa_res_status' => [ - false, - true, - [ - 'pa_res_status' => 'wrong value', - 'eci_flag' => '05', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => '0', - 'signature_verification' => 'Y' - ], - ], - 'Centinel case 1 wrong eci_flag' => [ - false, - true, - [ - 'pa_res_status' => 'Y', - 'eci_flag' => 'wrong value', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => '0', - 'signature_verification' => 'Y' - ], - ], - 'Centinel case 1 empty xid' => [ - false, - true, - [ - 'pa_res_status' => 'Y', - 'eci_flag' => '05', - 'xid' => '', - 'cavv' => 'some string', - 'error_no' => '0', - 'signature_verification' => 'Y' - ], - ], - 'Centinel case 1 empty cavv' => [ - false, - true, - [ - 'pa_res_status' => 'Y', - 'eci_flag' => '05', - 'xid' => 'some string', - 'cavv' => '', - 'error_no' => '0', - 'signature_verification' => 'Y' - ], - ], - 'Centinel case 1 no zero error_no' => [ - false, - true, - [ - 'pa_res_status' => 'Y', - 'eci_flag' => '05', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => 'no zero', - 'signature_verification' => 'Y' - ], - ], - 'Centinel case 1 wrong signature_verification' => [ - false, - true, - [ - 'pa_res_status' => 'Y', - 'eci_flag' => '05', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => '0', - 'signature_verification' => 'wrong value' - ], - ], - 'Centinel case 1 no params' => [false, true, []] - ]; - } - - /** - * Data for unavailable authentication - * - * @return array - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - protected function _getAuthenticationUnavailableData() - { - return [ - 'Centinel case 4,5 in strict mode' => [ - false, - true, - [ - 'pa_res_status' => 'U', - 'signature_verification' => 'Y', - 'eci_flag' => '07', - 'xid' => 'some string', - 'cavv' => '', - 'error_no' => '0' - ], - ], - 'Centinel case 4,5' => [ - true, - false, - [ - 'pa_res_status' => 'U', - 'signature_verification' => 'Y', - 'eci_flag' => '07', - 'xid' => 'some string', - 'cavv' => '', - 'error_no' => '0' - ], - ], - 'Centinel case 4,5 pa_res_status is absent' => [ - false, - false, - [ - 'signature_verification' => 'Y', - 'eci_flag' => '07', - 'xid' => 'some string', - 'cavv' => '', - 'error_no' => '0' - ], - ], - 'Centinel case 4,5 signature_verification is absent' => [ - false, - false, - [ - 'pa_res_status' => 'U', - 'eci_flag' => '07', - 'xid' => 'some string', - 'cavv' => '', - 'error_no' => '0' - ], - ], - 'Centinel case 4,5 eci_flag is absent' => [ - false, - false, - [ - 'pa_res_status' => 'U', - 'signature_verification' => 'Y', - 'xid' => 'some string', - 'cavv' => '', - 'error_no' => '0' - ], - ], - 'Centinel case 4,5 xid is absent' => [ - false, - false, - [ - 'pa_res_status' => 'U', - 'signature_verification' => 'Y', - 'eci_flag' => '07', - 'cavv' => '', - 'error_no' => '0' - ], - ], - 'Centinel case 4,5 cavv is absent' => [ - false, - false, - [ - 'pa_res_status' => 'U', - 'signature_verification' => 'Y', - 'eci_flag' => '07', - 'xid' => 'some string', - 'error_no' => '0' - ], - ], - 'Centinel case 4,5 error_no is absent' => [ - false, - false, - [ - 'pa_res_status' => 'U', - 'signature_verification' => 'Y', - 'eci_flag' => '07', - 'xid' => 'some string', - 'cavv' => '' - ], - ], - 'Centinel case 4,5 wrong pa_res_status' => [ - false, - false, - [ - 'pa_res_status' => 'wrong value', - 'signature_verification' => 'Y', - 'eci_flag' => '07', - 'xid' => 'some string', - 'cavv' => '', - 'error_no' => '0' - ], - ], - 'Centinel case 4,5 wrong signature_verification' => [ - false, - false, - [ - 'pa_res_status' => 'U', - 'signature_verification' => 'wrong value', - 'eci_flag' => '07', - 'xid' => 'some string', - 'cavv' => '', - 'error_no' => '0' - ], - ], - 'Centinel case 4,5 wrong eci_flag' => [ - false, - false, - [ - 'pa_res_status' => 'U', - 'signature_verification' => 'Y', - 'eci_flag' => 'wrong value', - 'xid' => '', - 'cavv' => '', - 'error_no' => '0' - ], - ], - 'Centinel case 4,5 empty xid' => [ - false, - false, - [ - 'pa_res_status' => 'U', - 'signature_verification' => 'Y', - 'eci_flag' => '07', - 'xid' => '', - 'cavv' => '', - 'error_no' => '0' - ], - ], - 'Centinel case 4,5 not empty cavv' => [ - false, - false, - [ - 'pa_res_status' => 'U', - 'signature_verification' => 'Y', - 'eci_flag' => '07', - 'xid' => 'some string', - 'cavv' => 'not empty', - 'error_no' => '0' - ], - ], - 'Centinel case 4,5 no zero error_no' => [ - false, - false, - [ - 'pa_res_status' => 'U', - 'signature_verification' => 'Y', - 'eci_flag' => '07', - 'xid' => 'some string', - 'cavv' => '', - 'error_no' => 'no zero' - ], - ], - 'Centinel case 4,5 no params' => [false, false, []] - ]; - } - - /** - * Data for attempts performed processing - * - * @return array - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - protected function _getProcessingAttemptsPerformedData() - { - return [ - 'Centinel case 11' => [ - true, - true, - [ - 'pa_res_status' => 'A', - 'signature_verification' => 'Y', - 'eci_flag' => '06', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => '0' - ], - ], - 'Centinel case 11 pa_res_status is absent' => [ - false, - true, - [ - 'signature_verification' => 'Y', - 'eci_flag' => '06', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => '0' - ], - ], - 'Centinel case 11 signature_verification is absent' => [ - false, - true, - [ - 'pa_res_status' => 'A', - 'eci_flag' => '06', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => '0' - ], - ], - 'Centinel case 11 eci_flag is absent' => [ - false, - true, - [ - 'pa_res_status' => 'A', - 'signature_verification' => 'Y', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => '0' - ], - ], - 'Centinel case 11 xid is absent' => [ - false, - true, - [ - 'pa_res_status' => 'A', - 'signature_verification' => 'Y', - 'eci_flag' => '06', - 'cavv' => 'some string', - 'error_no' => '0' - ], - ], - 'Centinel case 11 cavv is absent' => [ - false, - true, - [ - 'pa_res_status' => 'A', - 'signature_verification' => 'Y', - 'eci_flag' => '06', - 'xid' => 'some string', - 'error_no' => '0' - ], - ], - 'Centinel case 11 error_no is absent' => [ - false, - true, - [ - 'pa_res_status' => 'A', - 'signature_verification' => 'Y', - 'eci_flag' => '06', - 'xid' => 'some string', - 'cavv' => 'some string' - ], - ], - 'Centinel case no params' => [false, true, []], - 'Centinel case 11 wrong pa_res_status' => [ - false, - true, - [ - 'pa_res_status' => 'wrong value', - 'signature_verification' => 'Y', - 'eci_flag' => '06', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => '0' - ], - ], - 'Centinel case 11 wrong signature_verification' => [ - false, - true, - [ - 'pa_res_status' => 'A', - 'signature_verification' => 'wrong value', - 'eci_flag' => '06', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => '0' - ], - ], - 'Centinel case 11 wrong eci_flag' => [ - false, - true, - [ - 'pa_res_status' => 'A', - 'signature_verification' => 'Y', - 'eci_flag' => 'wrong value', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => '0' - ], - ], - 'Centinel case 11 empty xid' => [ - false, - true, - [ - 'pa_res_status' => 'A', - 'signature_verification' => 'Y', - 'eci_flag' => '06', - 'xid' => '', - 'cavv' => 'some string', - 'error_no' => '0' - ], - ], - 'Centinel case 11 empty cavv' => [ - false, - true, - [ - 'pa_res_status' => 'A', - 'signature_verification' => 'Y', - 'eci_flag' => '06', - 'xid' => 'some string', - 'cavv' => '', - 'error_no' => '0' - ], - ], - 'Centinel case 11 no zero' => [ - false, - true, - [ - 'pa_res_status' => 'A', - 'signature_verification' => 'Y', - 'eci_flag' => '06', - 'xid' => 'some string', - 'cavv' => 'some string', - 'error_no' => 'no zero' - ], - ] - ]; - } - - /** - * @param bool $result - * @param bool $strictMode - * @param array $params - * @dataProvider isLookupSuccessfulDataProvider - */ - public function testIsLookupSuccessful($result, $strictMode, $params) - { - $this->_model->setLookupResult(new \Magento\Framework\Object($params)); - $this->_model->setIsModeStrict($strictMode); - $this->assertEquals($result, $this->_model->isLookupSuccessful()); - } - - public function isLookupSuccessfulDataProvider() - { - return array_merge($this->_getSoftSuccessfulLookupData(), $this->_getStrictSuccessfulLookupData()); - } - - /** - * Data for soft successful lookup - * - * @return array - */ - protected function _getSoftSuccessfulLookupData() - { - return [ - 'Centinel case 5' => [ - true, - false, - ['enrolled' => '', 'acs_url' => '', 'payload' => '', 'error_no' => '0'], - ], - 'Centinel case 5 enrolled is absent' => [ - false, - false, - ['acs_url' => '', 'payload' => '', 'error_no' => '0'], - ], - 'Centinel case 5 acs_url is absent' => [ - false, - false, - ['enrolled' => '', 'payload' => '', 'error_no' => '0'], - ], - 'Centinel case 5 payload is absent' => [ - false, - false, - ['enrolled' => '', 'acs_url' => '', 'error_no' => '0'], - ], - 'Centinel case 5 error_no is absent' => [ - false, - false, - ['enrolled' => '', 'acs_url' => '', 'payload' => ''], - ], - 'Centinel case 5 no params' => [false, false, []], - 'Centinel case 5 not empty enrolled' => [ - false, - false, - ['enrolled' => 'not empty', 'acs_url' => '', 'payload' => '', 'error_no' => '0'], - ], - 'Centinel case 5 not empty acs_url' => [ - false, - false, - ['enrolled' => '', 'acs_url' => 'not empty', 'payload' => '', 'error_no' => '0'], - ], - 'Centinel case 5 not empty payload' => [ - false, - false, - ['enrolled' => '', 'acs_url' => '', 'payload' => 'not empty', 'error_no' => '0'], - ], - 'Centinel case 5 no zero error_no' => [ - false, - false, - ['enrolled' => '', 'acs_url' => '', 'payload' => '', 'error_no' => 'not zero'], - ], - 'Centinel case 5 empty error_no' => [ - false, - false, - ['enrolled' => '', 'acs_url' => '', 'payload' => '', 'error_no' => ''], - ], - 'Centinel case 7' => [ - true, - false, - ['enrolled' => 'U', 'acs_url' => '', 'payload' => '', 'error_no' => '0'], - ], - 'Centinel case 8,9' => [ - true, - false, - ['enrolled' => 'U', 'acs_url' => '', 'payload' => '', 'error_no' => 'some string'], - ], - 'Centinel case 7,8,9 enrolled is absent' => [ - false, - false, - ['acs_url' => '', 'payload' => '', 'error_no' => '0'], - ], - 'Centinel case 7,8,9 acs_url is absent' => [ - false, - false, - ['enrolled' => 'U', 'payload' => '', 'error_no' => '0'], - ], - 'Centinel case 7,8,9 payload is absent' => [ - false, - false, - ['enrolled' => 'U', 'acs_url' => '', 'error_no' => '0'], - ], - 'Centinel case 7,8,9 error_no no params' => [false, false, []], - 'Centinel case 7,8,9 wrong enrolled' => [ - false, - false, - ['enrolled' => 'wrong value', 'acs_url' => '', 'payload' => '', 'error_no' => '0'], - ], - 'Centinel case 7,8,9 not empty acs_url' => [ - false, - false, - ['enrolled' => 'U', 'acs_url' => 'not empty', 'payload' => '', 'error_no' => '0'], - ], - 'Centinel case 7,8,9 not empty payload' => [ - false, - false, - ['enrolled' => 'U', 'acs_url' => '', 'payload' => 'not empty', 'error_no' => '0'], - ] - ]; - } - - /** - * Data for strict successful lookup - * - * @return array - */ - protected function _getStrictSuccessfulLookupData() - { - return [ - 'Centinel cases 1-4, 6, 10-11' => [ - true, - true, - ['enrolled' => 'Y', 'acs_url' => 'some string', 'payload' => 'some string', 'error_no' => '0'], - ], - 'Centinel cases 1-4, 6, 10-11 enrolled is absent' => [ - false, - true, - ['acs_url' => 'some string', 'payload' => 'some string', 'error_no' => '0'], - ], - 'Centinel cases 1-4, 6, 10-11 acs_url is absent' => [ - false, - true, - ['enrolled' => 'Y', 'payload' => 'some string', 'error_no' => '0'], - ], - 'Centinel cases 1-4, 6, 10-11 payload is absent' => [ - false, - true, - ['enrolled' => 'Y', 'acs_url' => 'some string', 'error_no' => '0'], - ], - 'Centinel cases 1-4, 6, 10-11 error_no is absent' => [ - false, - true, - ['enrolled' => 'Y', 'acs_url' => 'some string', 'payload' => 'some string'], - ], - 'Centinel cases 1-4, 6, 10-11 no params' => [false, true, []], - 'Centinel cases 1-4, 6, 10-11 wrong enrolled' => [ - false, - true, - [ - 'enrolled' => 'wrong value', - 'acs_url' => 'some string', - 'payload' => 'some string', - 'error_no' => '0' - ], - ], - 'Centinel cases 1-4, 6, 10-11 empty enrolled' => [ - false, - true, - ['enrolled' => '', 'acs_url' => 'some string', 'payload' => 'some string', 'error_no' => '0'], - ], - 'Centinel cases 1-4, 6, 10-11 empty acs_url' => [ - false, - true, - ['enrolled' => 'Y', 'acs_url' => '', 'payload' => 'some string', 'error_no' => '0'], - ], - 'Centinel cases 1-4, 6, 10-11 empty payload' => [ - false, - true, - ['enrolled' => 'Y', 'acs_url' => 'some string', 'payload' => '', 'error_no' => '0'], - ], - 'Centinel cases 1-4, 6, 10-11 wrong error_no' => [ - false, - true, - [ - 'enrolled' => 'Y', - 'acs_url' => 'some string', - 'payload' => 'some string', - 'error_no' => 'wrong value' - ], - ], - 'Centinel cases 1-4, 6, 10-11 empty error_no' => [ - false, - true, - ['enrolled' => 'Y', 'acs_url' => 'some string', 'payload' => 'some string', 'error_no' => ''], - ] - ]; - } -} diff --git a/app/code/Magento/Centinel/Test/Unit/Model/StateFactoryTest.php b/app/code/Magento/Centinel/Test/Unit/Model/StateFactoryTest.php deleted file mode 100644 index 4614ed11af44e408db0589a459dce781c83b2c06..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/Test/Unit/Model/StateFactoryTest.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php -/** - * \Magento\Centinel\Model\StateFactory - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Centinel\Test\Unit\Model; - -class StateFactoryTest extends \PHPUnit_Framework_TestCase -{ - public function testCreateState() - { - $objectManager = $this->getMock('Magento\Framework\ObjectManagerInterface'); - $objectManager->expects( - $this->at(0) - )->method( - 'create' - )->with( - 'Magento\Centinel\Model\State\Visa' - )->will( - $this->returnValue($this->getMock('Magento\Centinel\Model\State\Visa')) - ); - $objectManager->expects( - $this->at(1) - )->method( - 'create' - )->with( - 'Magento\Centinel\Model\State\Mastercard' - )->will( - $this->returnValue($this->getMock('Magento\Centinel\Model\State\Mastercard')) - ); - $objectManager->expects( - $this->at(2) - )->method( - 'create' - )->with( - 'Magento\Centinel\Model\State\Jcb' - )->will( - $this->returnValue($this->getMock('Magento\Centinel\Model\State\Jcb')) - ); - $objectManager->expects( - $this->at(3) - )->method( - 'create' - )->with( - 'Magento\Centinel\Model\State\Mastercard' - )->will( - $this->returnValue($this->getMock('Magento\Centinel\Model\State\Mastercard')) - ); - - $factory = new \Magento\Centinel\Model\StateFactory( - $objectManager, - [ - 'VI' => 'Magento\Centinel\Model\State\Visa', - 'MC' => 'Magento\Centinel\Model\State\Mastercard', - 'JCB' => 'Magento\Centinel\Model\State\Jcb', - 'SM' => 'Magento\Centinel\Model\State\Mastercard' - ] - ); - $this->assertInstanceOf('Magento\Centinel\Model\State\Visa', $factory->createState('VI')); - $this->assertInstanceOf('Magento\Centinel\Model\State\Mastercard', $factory->createState('MC')); - $this->assertInstanceOf('Magento\Centinel\Model\State\Jcb', $factory->createState('JCB')); - $this->assertInstanceOf('Magento\Centinel\Model\State\Mastercard', $factory->createState('SM')); - $this->assertFalse($factory->createState('LOL')); - } - - public function testCreateStateMapIsEmpty() - { - $objectManager = $this->getMock('Magento\Framework\ObjectManagerInterface'); - $factory = new \Magento\Centinel\Model\StateFactory($objectManager); - $this->assertFalse($factory->createState('VI')); - $this->assertFalse($factory->createState('MC')); - $this->assertFalse($factory->createState('JCB')); - $this->assertFalse($factory->createState('SM')); - $this->assertFalse($factory->createState('LOL')); - } -} diff --git a/app/code/Magento/Centinel/composer.json b/app/code/Magento/Centinel/composer.json deleted file mode 100644 index c5d8f9f3577f9958e93edb19e650ad39b23c003d..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "magento/module-centinel", - "description": "N/A", - "require": { - "php": "~5.5.0|~5.6.0", - "magento/module-store": "0.74.0-beta9", - "magento/module-checkout": "0.74.0-beta9", - "magento/module-backend": "0.74.0-beta9", - "magento/module-sales": "0.74.0-beta9", - "magento/framework": "0.74.0-beta9", - "magento/magento-composer-installer": "*" - }, - "type": "magento2-module", - "version": "0.74.0-beta9", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "extra": { - "map": [ - [ - "*", - "Magento/Centinel" - ] - ] - } -} diff --git a/app/code/Magento/Centinel/etc/adminhtml/di.xml b/app/code/Magento/Centinel/etc/adminhtml/di.xml deleted file mode 100644 index 87e976b536e30a5ed537bb7f12dab32084d1593d..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/etc/adminhtml/di.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> - <virtualType name="Magento\Centinel\Model\Session\Storage" type="Magento\Framework\Session\Storage"> - <arguments> - <argument name="namespace" xsi:type="string">centinel_validator</argument> - </arguments> - </virtualType> - <virtualType name="Magento\Centinel\Model\Session" type="Magento\Framework\Session\Generic"> - <arguments> - <argument name="storage" xsi:type="object">Magento\Centinel\Model\Session\Storage</argument> - </arguments> - </virtualType> - <type name="Magento\Centinel\Model\Service"> - <arguments> - <argument name="url" xsi:type="object">Magento\Backend\Model\UrlInterface</argument> - <argument name="centinelSession" xsi:type="object">Magento\Centinel\Model\Session</argument> - <argument name="urlPrefix" xsi:type="string">adminhtml/centinel_index/</argument> - </arguments> - </type> -</config> diff --git a/app/code/Magento/Centinel/etc/adminhtml/events.xml b/app/code/Magento/Centinel/etc/adminhtml/events.xml deleted file mode 100644 index 3a6750b2da85c2b7fddc4ae15a8a8769581f7af1..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/etc/adminhtml/events.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> - <event name="payment_info_block_prepare_specific_information"> - <observer name="centinel" instance="Magento\Centinel\Model\Observer" method="paymentInfoBlockPrepareSpecificInformation" shared="false" /> - </event> -</config> diff --git a/app/code/Magento/Centinel/etc/adminhtml/routes.xml b/app/code/Magento/Centinel/etc/adminhtml/routes.xml deleted file mode 100644 index 2ff9c2bc4715a7fed5d87b70d7f05edfb9a25c4e..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/etc/adminhtml/routes.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> - <router id="admin"> - <route id="adminhtml"> - <module name="Magento_Centinel" before="Magento_Backend" /> - </route> - </router> -</config> diff --git a/app/code/Magento/Centinel/etc/adminhtml/system.xml b/app/code/Magento/Centinel/etc/adminhtml/system.xml deleted file mode 100644 index 643f1878b6282844e4fe19874d8d408b863c4e0d..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/etc/adminhtml/system.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../Config/etc/system_file.xsd"> - <system> - <section id="payment_services" translate="label" type="text" sortOrder="450" showInDefault="1" showInWebsite="1" showInStore="1"> - <label>Payment Services</label> - <tab>sales</tab> - <resource>Magento_Payment::payment_services</resource> - <group id="centinel" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> - <label>3D Secure Credit Card Validation</label> - <field id="processor_id" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> - <label>Processor ID</label> - </field> - <field id="merchant_id" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> - <label>Merchant ID</label> - </field> - <field id="password" translate="label" type="obscure" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> - <label>Password</label> - <backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model> - </field> - <field id="test_mode" translate="label comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> - <label>Test Mode</label> - <comment>This overrides any API URL that may be specified by a payment method.</comment> - <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> - </field> - <field id="debug" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> - <label>Debug Mode</label> - <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> - </field> - </group> - </section> - </system> -</config> diff --git a/app/code/Magento/Centinel/etc/di.xml b/app/code/Magento/Centinel/etc/di.xml deleted file mode 100644 index b970db56e8625e48422ddb884a7bc196be1fa3e6..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/etc/di.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> - <type name="Magento\Centinel\Model\StateFactory"> - <arguments> - <argument name="stateClassMap" xsi:type="array"> - <item name="VI" xsi:type="string">Magento\Centinel\Model\State\Visa</item> - <item name="MC" xsi:type="string">Magento\Centinel\Model\State\Mastercard</item> - <item name="JCB" xsi:type="string">Magento\Centinel\Model\State\Jcb</item> - <item name="SM" xsi:type="string">Magento\Centinel\Model\State\Mastercard</item> - </argument> - </arguments> - </type> -</config> diff --git a/app/code/Magento/Centinel/etc/events.xml b/app/code/Magento/Centinel/etc/events.xml deleted file mode 100644 index 3a09cd0c0da1bc655565063b4feda7f2d67c1bdd..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/etc/events.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> - <event name="sales_convert_quote_to_order"> - <observer name="centinel" instance="Magento\Centinel\Model\Observer" method="salesEventConvertQuoteToOrder" /> - </event> - <event name="checkout_submit_all_after"> - <observer name="centinel" instance="Magento\Centinel\Model\Observer" method="checkoutSubmitAllAfter" /> - </event> -</config> diff --git a/app/code/Magento/Centinel/etc/frontend/di.xml b/app/code/Magento/Centinel/etc/frontend/di.xml deleted file mode 100644 index 4ec66c4094e5928524a68a01b7cf026c6d2e4c8e..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/etc/frontend/di.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> - <virtualType name="Magento\Centinel\Model\Session\Storage" type="Magento\Framework\Session\Storage"> - <arguments> - <argument name="namespace" xsi:type="string">centinel_validator</argument> - </arguments> - </virtualType> - <virtualType name="Magento\Centinel\Model\Session" type="Magento\Framework\Session\Generic"> - <arguments> - <argument name="storage" xsi:type="object">Magento\Centinel\Model\Session\Storage</argument> - </arguments> - </virtualType> - <type name="Magento\Framework\Url\SecurityInfo"> - <arguments> - <argument name="secureUrlList" xsi:type="array"> - <item name="centinel" xsi:type="string">/centinel/</item> - </argument> - </arguments> - </type> - <type name="Magento\Centinel\Model\Service"> - <arguments> - <argument name="centinelSession" xsi:type="object">Magento\Centinel\Model\Session</argument> - </arguments> - </type> -</config> diff --git a/app/code/Magento/Centinel/etc/frontend/events.xml b/app/code/Magento/Centinel/etc/frontend/events.xml deleted file mode 100644 index 24dcacbedddf5bdb6ae32153dbe4b0681b2e9340..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/etc/frontend/events.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> - <event name="payment_form_block_to_html_before"> - <observer name="centinel" instance="Magento\Centinel\Model\Observer" method="paymentFormBlockToHtmlBefore" shared="false" /> - </event> -</config> diff --git a/app/code/Magento/Centinel/etc/frontend/routes.xml b/app/code/Magento/Centinel/etc/frontend/routes.xml deleted file mode 100644 index 136230f5ce152c1f3e177a90849e68e90aaaddaf..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/etc/frontend/routes.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd"> - <router id="standard"> - <route id="centinel" frontName="centinel"> - <module name="Magento_Centinel" /> - </route> - </router> -</config> diff --git a/app/code/Magento/Centinel/etc/module.xml b/app/code/Magento/Centinel/etc/module.xml deleted file mode 100644 index 1b9fa14e9f40d2226a1e7d6b555822bd8b0ed14d..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/etc/module.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> - <module name="Magento_Centinel" setup_version="2.0.0"> - <sequence> - <module name="Magento_Payment"/> - <module name="Magento_Checkout"/> - </sequence> - </module> -</config> diff --git a/app/code/Magento/Centinel/i18n/de_DE.csv b/app/code/Magento/Centinel/i18n/de_DE.csv deleted file mode 100644 index 01df77c497be5fa524e2855e89359a38b2f4cda4..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/i18n/de_DE.csv +++ /dev/null @@ -1,42 +0,0 @@ -"3D Secure Card Validation","3D Secure Kartenvalidierung" -"Validation failed.","Validierung ist fehlgeschlagen." -"3D Secure Verification Result","3D Secure Verifizierungsergebnis" -"3D Secure Cardholder Validation","3D Secure Karteninhabervalidierung" -"3D Secure Electronic Commerce Indicator","3D Secure Electronic Commerce Indicator" -"3D Secure CAVV","3D Secure CAVV" -"3D Secure XID","3D Secure XD" -"Merchant Liability","Haftung für Händler" -"Card Issuer Liability","Haftung für Kartenausteller" -Enrolled,Eingeschrieben -"Enrolled but Authentication Unavailable","Eingeschrieben, aber Authentifizierung nicht verfügbar" -"Not Enrolled","Nicht eingeschrieben" -Successful,Erfolgreich -Failed,Fehlgeschlagen -"Unable to complete","Fertigstellung nicht möglich" -"Successful attempt","Erfolgreicher Versuch" -"Unsupported currency code: %1.","Unsupported currency code: %1." -"Payment information error. Please start over.","Fehler bei Zahlungsinformation. Bitte versuchen Sie es erneut." -"Please verify the card with the issuer bank before placing the order.","Bitte verifizieren Sie die Karte mit der Ausstellerbank bevor Sie die Bestellung durchführen." -"This card has failed validation and cannot be used.","Diese Karte konnte nicht validiert werden und kann nicht benützt werden." -"Verification Successful","Verifizierung erfolgreich" -"Please continue with placing order.","Bitte fahren Sie mit der Bestellung fort." -"Verification Failed","Verifizierung fehlgeschlagen" -"The card has failed verification with the issuer bank.","Die Karte konnte nicht mit der Ausstellerbank verifiziert werden." -"Order cannot be placed.","Bestellung kann nicht durchgeführt werden." -"Verification cannot be processed","Verifizierung kann nicht verarbeitet werden" -"There has been wrong payment information submitted or time limit has expired. Please, try again.","Es wurden falsche Zahlungsinformationen abgeschickt, oder Zeitlimit ist abgelaufen. Bitte versuchen Sie es erneut." -"Card Verification",Kartenverifizierung -"Start/Reset Validation...","Validierung starten/zurücksetzen..." -"Please verify the card with the issuer bank:","Bitte verifizieren Sie die Karte mit der Ausstellerbank:" -"There has been wrong payment information submitted or the time limit has expired. Please, try again.","Es wurden falsche Zahlungsinformationen abgeschickt, oder das Zeitlimit ist abgelaufen. Bitte versuchen Sie es erneut." -"To ensure the security of your transactions","Um die Sicherheit ihrer Transaktionen zu gewährleisten" -"Verified by Visa","Verified by Visa" -"MasterCard SecureCode","MasterCard SecureCode" -Password,Password -"Test Mode","Test Mode" -"Payment Services","Payment Services" -"3D Secure Credit Card Validation","3D Secure Credit Card Validation" -"Processor ID","Processor ID" -"Merchant ID","Merchant ID" -"This overrides any API URL that may be specified by a payment method.","This overrides any API URL that may be specified by a payment method." -"Debug Mode","Debug Mode" diff --git a/app/code/Magento/Centinel/i18n/en_US.csv b/app/code/Magento/Centinel/i18n/en_US.csv deleted file mode 100644 index 98e02de675243787795dbaa692bc9787aa4ba383..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/i18n/en_US.csv +++ /dev/null @@ -1,42 +0,0 @@ -"3D Secure Card Validation","3D Secure Card Validation" -"Validation failed.","Validation failed." -"3D Secure Verification Result","3D Secure Verification Result" -"3D Secure Cardholder Validation","3D Secure Cardholder Validation" -"3D Secure Electronic Commerce Indicator","3D Secure Electronic Commerce Indicator" -"3D Secure CAVV","3D Secure CAVV" -"3D Secure XID","3D Secure XID" -"Merchant Liability","Merchant Liability" -"Card Issuer Liability","Card Issuer Liability" -Enrolled,Enrolled -"Enrolled but Authentication Unavailable","Enrolled but Authentication Unavailable" -"Not Enrolled","Not Enrolled" -Successful,Successful -Failed,Failed -"Unable to complete","Unable to complete" -"Successful attempt","Successful attempt" -"Unsupported currency code: %1.","Unsupported currency code: %1." -"Payment information error. Please start over.","Payment information error. Please start over." -"Please verify the card with the issuer bank before placing the order.","Please verify the card with the issuer bank before placing the order." -"This card has failed validation and cannot be used.","This card has failed validation and cannot be used." -"Verification Successful","Verification Successful" -"Please continue with placing order.","Please continue with placing order." -"Verification Failed","Verification Failed" -"The card has failed verification with the issuer bank.","The card has failed verification with the issuer bank." -"Order cannot be placed.","Order cannot be placed." -"Verification cannot be processed","Verification cannot be processed" -"There has been wrong payment information submitted or time limit has expired. Please, try again.","There has been wrong payment information submitted or time limit has expired. Please, try again." -"Card Verification","Card Verification" -"Start/Reset Validation...","Start/Reset Validation..." -"Please verify the card with the issuer bank:","Please verify the card with the issuer bank:" -"There has been wrong payment information submitted or the time limit has expired. Please, try again.","There has been wrong payment information submitted or the time limit has expired. Please, try again." -"To ensure the security of your transactions","To ensure the security of your transactions" -"Verified by Visa","Verified by Visa" -"MasterCard SecureCode","MasterCard SecureCode" -Password,Password -"Test Mode","Test Mode" -"Payment Services","Payment Services" -"3D Secure Credit Card Validation","3D Secure Credit Card Validation" -"Processor ID","Processor ID" -"Merchant ID","Merchant ID" -"This overrides any API URL that may be specified by a payment method.","This overrides any API URL that may be specified by a payment method." -"Debug Mode","Debug Mode" diff --git a/app/code/Magento/Centinel/i18n/es_ES.csv b/app/code/Magento/Centinel/i18n/es_ES.csv deleted file mode 100644 index d4b4792979a6c8f7383b9b492560e09768beb947..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/i18n/es_ES.csv +++ /dev/null @@ -1,42 +0,0 @@ -"3D Secure Card Validation","Validación segura 3D de tarjeta" -"Validation failed.","Validación errónea." -"3D Secure Verification Result","Resultados de la verificación segura 3D" -"3D Secure Cardholder Validation","Validación segura 3D del tÃtular de la tarjeta" -"3D Secure Electronic Commerce Indicator","Indicador comercio electrónico seguro 3D" -"3D Secure CAVV","CAVV Seguro 3D" -"3D Secure XID","XID Seguro 3D" -"Merchant Liability","Responsabilidad del comerciante" -"Card Issuer Liability","Responsabilidad del emisor de la tarjeta" -Enrolled,Inscrito -"Enrolled but Authentication Unavailable","Inscrito pero autentificación no disponible" -"Not Enrolled","No inscrito" -Successful,Exitoso -Failed,"Ha fallado" -"Unable to complete","No se ha podido completar" -"Successful attempt","Intento exitoso" -"Unsupported currency code: %1.","Unsupported currency code: %1." -"Payment information error. Please start over.","Error de información de pago. Por favor, comience de nuevo." -"Please verify the card with the issuer bank before placing the order.","Por favor verifique la tarjeta con el banco emisor antes de realizar el pedido." -"This card has failed validation and cannot be used.","Esta tarjeta ha fallado su validación y no puede ser usada." -"Verification Successful","Verificación exitosa" -"Please continue with placing order.","Por favor continue con su pedido." -"Verification Failed","Verificación errónea" -"The card has failed verification with the issuer bank.","La tarjeta ha fallado la verificación con el banco emisor." -"Order cannot be placed.","El pedido no puede ser realizado." -"Verification cannot be processed","La verificación no puede ser procesada" -"There has been wrong payment information submitted or time limit has expired. Please, try again.","Se ha enviado información errónea o el lÃmite de tiempo ha expirado. Por favor, inténtelo de nuevo." -"Card Verification","Verificación de tarjeta" -"Start/Reset Validation...","Comenzar/Resetear validación..." -"Please verify the card with the issuer bank:","Por favor verifique la tarjeta con el banco emisor:" -"There has been wrong payment information submitted or the time limit has expired. Please, try again.","Se ha enviado información errónea o el lÃmite de tiempo ha expirado. Por favor, inténtelo de nuevo." -"To ensure the security of your transactions","Para asegurar la seguridad de sus transacciones" -"Verified by Visa","Verificado por Visa" -"MasterCard SecureCode","MasterCard Código Seguro" -Password,Password -"Test Mode","Test Mode" -"Payment Services","Payment Services" -"3D Secure Credit Card Validation","3D Secure Credit Card Validation" -"Processor ID","Processor ID" -"Merchant ID","Merchant ID" -"This overrides any API URL that may be specified by a payment method.","This overrides any API URL that may be specified by a payment method." -"Debug Mode","Debug Mode" diff --git a/app/code/Magento/Centinel/i18n/fr_FR.csv b/app/code/Magento/Centinel/i18n/fr_FR.csv deleted file mode 100644 index c4679155db4df340bc200ca06ea7f3771093985f..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/i18n/fr_FR.csv +++ /dev/null @@ -1,42 +0,0 @@ -"3D Secure Card Validation","Validation carte 3D sécurisée" -"Validation failed.","Validation a échouée." -"3D Secure Verification Result","Résultat vérification 3D sécurisé" -"3D Secure Cardholder Validation","Validation porteur de carte 3D sécurisée" -"3D Secure Electronic Commerce Indicator","Indicateur commerce électronique 3D sécurisé" -"3D Secure CAVV","CAVV 3D sécurisé" -"3D Secure XID","XID 3D sécurisé" -"Merchant Liability","Responsabilité du commerçant" -"Card Issuer Liability","Responsabilité de l'émetteur de la carte" -Enrolled,Enrôlé -"Enrolled but Authentication Unavailable","Enrôlé mais authentification non disponible" -"Not Enrolled","Non enrôlé" -Successful,Réussi -Failed,Échec -"Unable to complete","Ne peut compléter" -"Successful attempt","Tentative réussie" -"Unsupported currency code: %1.","Unsupported currency code: %1." -"Payment information error. Please start over.","Erreur d'infos de paiement. Veuillez recommencer." -"Please verify the card with the issuer bank before placing the order.","Veuillez vérifier la carte avec la banque émettrice avant de passer la commande." -"This card has failed validation and cannot be used.","La carte n'a pu être validée et ne peut être utilisée." -"Verification Successful","Vérification réussie" -"Please continue with placing order.","Veuillez continuer à faire la commande." -"Verification Failed","Vérification a échouée" -"The card has failed verification with the issuer bank.","La carte n'a pas réussie sa vérification avec la banque émettrice." -"Order cannot be placed.","Commande ne peut être placée." -"Verification cannot be processed","Vérification ne peut être traitée" -"There has been wrong payment information submitted or time limit has expired. Please, try again.","Une mauvaise information de paiement a été soumise ou temps imparti est achevé. Veuillez réessayer." -"Card Verification","Vérification carte" -"Start/Reset Validation...","Démarrer/réinitialiser validation..." -"Please verify the card with the issuer bank:","Veuillez vérifier la carte avec la banque émettrice" -"There has been wrong payment information submitted or the time limit has expired. Please, try again.","Une mauvaise information de paiement a été soumise ou le temps imparti s'est achevé. Veuillez réessayer." -"To ensure the security of your transactions","Pour assurer la sécurité de vos transactions" -"Verified by Visa","Vérifié par Visa" -"MasterCard SecureCode","Code sûr MasterCard" -Password,Password -"Test Mode","Test Mode" -"Payment Services","Payment Services" -"3D Secure Credit Card Validation","3D Secure Credit Card Validation" -"Processor ID","Processor ID" -"Merchant ID","Merchant ID" -"This overrides any API URL that may be specified by a payment method.","This overrides any API URL that may be specified by a payment method." -"Debug Mode","Debug Mode" diff --git a/app/code/Magento/Centinel/i18n/nl_NL.csv b/app/code/Magento/Centinel/i18n/nl_NL.csv deleted file mode 100644 index 9cc11c4a1041bc8851f7aec4be74f7889e43c8f1..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/i18n/nl_NL.csv +++ /dev/null @@ -1,42 +0,0 @@ -"3D Secure Card Validation","3D Secure Card Validation" -"Validation failed.","Validatie mislukt." -"3D Secure Verification Result","3D Veilig Verificatie Resultaat" -"3D Secure Cardholder Validation","3D Veilige Kaarthouder Verificatie" -"3D Secure Electronic Commerce Indicator","3D Veilige Electronische Commerce Indicator" -"3D Secure CAVV","3D Veilige CAVV" -"3D Secure XID","3D Veilige XID" -"Merchant Liability","Winkelier Aansprakelijkheid" -"Card Issuer Liability","Kaart Uitgever Verplichting" -Enrolled,Ingeschreven -"Enrolled but Authentication Unavailable","Ingeschreven maar Authenticatie niet Beschikbaar" -"Not Enrolled","Niet Ingeschreven" -Successful,Succesvol -Failed,Mislukt -"Unable to complete","Niet afgemaakt" -"Successful attempt","Succesvolle poging" -"Unsupported currency code: %1.","Unsupported currency code: %1." -"Payment information error. Please start over.","Betalingsinformatie fout. Start a.u.b. overnieuw." -"Please verify the card with the issuer bank before placing the order.","Verifieer de kaart a.u.b. met de uitgevende bank, voordat u de order plaatst." -"This card has failed validation and cannot be used.","Deze kaart kon niet worden gevalideerd en is onbruikbaar." -"Verification Successful","Verificatie geslaagd" -"Please continue with placing order.","Ga aub verder met plaatsen order." -"Verification Failed","Verificatie mislukt" -"The card has failed verification with the issuer bank.","De kaart verificatie met de uitgevende bank is mislukt." -"Order cannot be placed.","Order kan niet geplaatst worden." -"Verification cannot be processed","Verificatie kan niet worden verwerkt" -"There has been wrong payment information submitted or time limit has expired. Please, try again.","Er is verkeerde betalingsinformatie verzonden of tijdslimiet is verlopen. Probeer a.u.b. opnieuw." -"Card Verification","Kaart Verificatie" -"Start/Reset Validation...","Begin/Herstel Validatie..." -"Please verify the card with the issuer bank:","Verifieer de kaart a.u.b. met de uitgevende bank:" -"There has been wrong payment information submitted or the time limit has expired. Please, try again.","Er is verkeerde betalingsinformatie verzonden of de tijdslimiet is verlopen. Probeer het a.u.b. opnieuw." -"To ensure the security of your transactions","Om de veiligheid van uw transacties te verzekeren" -"Verified by Visa","Geverifieerd door Visa" -"MasterCard SecureCode","MasterCard SecureCode" -Password,Password -"Test Mode","Test Mode" -"Payment Services","Payment Services" -"3D Secure Credit Card Validation","3D Secure Credit Card Validation" -"Processor ID","Processor ID" -"Merchant ID","Merchant ID" -"This overrides any API URL that may be specified by a payment method.","This overrides any API URL that may be specified by a payment method." -"Debug Mode","Debug Mode" diff --git a/app/code/Magento/Centinel/i18n/pt_BR.csv b/app/code/Magento/Centinel/i18n/pt_BR.csv deleted file mode 100644 index c72f80d7a9436cafe95b674b2107c0bd9a89b359..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/i18n/pt_BR.csv +++ /dev/null @@ -1,42 +0,0 @@ -"3D Secure Card Validation","Validação de Cartão 3D Secure" -"Validation failed.","Falha de validação." -"3D Secure Verification Result","Resultado de Verificação 3D Secure" -"3D Secure Cardholder Validation","Validação de Portador de Cartão 3D Secure" -"3D Secure Electronic Commerce Indicator","Indicador de Comércio Eletrônico 3D Secure" -"3D Secure CAVV","3D Secure CAVV" -"3D Secure XID","3D Secure XID" -"Merchant Liability","Responsabilidade do Comerciante" -"Card Issuer Liability","Responsabilidade do Emissor do Cartão" -Enrolled,Inscritos -"Enrolled but Authentication Unavailable","Inscritos mas Autenticação Não DisponÃvel" -"Not Enrolled","Não Inscrito" -Successful,"Bem sucedido" -Failed,Falha -"Unable to complete","Incapaz de completar" -"Successful attempt","Tentativa bem sucedida" -"Unsupported currency code: %1.","Unsupported currency code: %1." -"Payment information error. Please start over.","Erro de informações de pagamento. Por favor comece de novo." -"Please verify the card with the issuer bank before placing the order.","Por favor verifique o cartão com o banco emissor antes de colocar a ordem." -"This card has failed validation and cannot be used.","A validação do cartão falhou e ele não pode ser utilizado." -"Verification Successful","Sucesso na Verificação" -"Please continue with placing order.","Por favor continuem com a colocação da ordem." -"Verification Failed","Falha de Verificação" -"The card has failed verification with the issuer bank.","O cartão falhou a verificação com o banco emissor." -"Order cannot be placed.","Pedido não pode ser realizado." -"Verification cannot be processed","A verificação não pode ser processada" -"There has been wrong payment information submitted or time limit has expired. Please, try again.","Houve apresentação de informações erradas de pagamento ou prazo expirou. Por favor, tente novamente." -"Card Verification","Verificação de Cartão" -"Start/Reset Validation...","Iniciar/Reiniciar Validação..." -"Please verify the card with the issuer bank:","Por favor verifique o cartão com o banco emissor:" -"There has been wrong payment information submitted or the time limit has expired. Please, try again.","Houve informações de pagamento erradas apresentadas ou o prazo expirou. Por favor tente novamente." -"To ensure the security of your transactions","Para garantir a segurança da sua transação" -"Verified by Visa","Verificado pela Visa" -"MasterCard SecureCode","MasterCard SecureCode" -Password,Password -"Test Mode","Test Mode" -"Payment Services","Payment Services" -"3D Secure Credit Card Validation","3D Secure Credit Card Validation" -"Processor ID","Processor ID" -"Merchant ID","Merchant ID" -"This overrides any API URL that may be specified by a payment method.","This overrides any API URL that may be specified by a payment method." -"Debug Mode","Debug Mode" diff --git a/app/code/Magento/Centinel/i18n/zh_CN.csv b/app/code/Magento/Centinel/i18n/zh_CN.csv deleted file mode 100644 index 225cea16dee0c4754c362cecda720e5266f989e8..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/i18n/zh_CN.csv +++ /dev/null @@ -1,42 +0,0 @@ -"3D Secure Card Validation","3D 安全信用å¡éªŒè¯" -"Validation failed.",验è¯å¤±è´¥ã€‚ -"3D Secure Verification Result","3D 安全验è¯ç»“æžœ" -"3D Secure Cardholder Validation","3D 安全æŒå¡äººéªŒè¯" -"3D Secure Electronic Commerce Indicator","3D 安全电åå•†åŠ¡æŒ‡æ ‡" -"3D Secure CAVV","3D 安全 CAVV" -"3D Secure XID","3D 安全 XID" -"Merchant Liability",商家责任 -"Card Issuer Liability",å‘塿œºæž„法律责任 -Enrolled,登记 -"Enrolled but Authentication Unavailable",已登记但验è¯ä¸å¯ç”¨ -"Not Enrolled",未登记 -Successful,æˆåŠŸ -Failed,已失败 -"Unable to complete",æ— æ³•å®Œæˆ -"Successful attempt",æˆåŠŸå°è¯• -"Unsupported currency code: %1.","Unsupported currency code: %1." -"Payment information error. Please start over.",支付信æ¯é”™è¯¯ã€‚è¯·é‡æ–°å¼€å§‹ã€‚ -"Please verify the card with the issuer bank before placing the order.",在下订å•å‰ï¼Œè¯·ä¸Žå‘å¡è¡ŒéªŒè¯ä¿¡ç”¨å¡ã€‚ -"This card has failed validation and cannot be used.",信用å¡éªŒè¯å¤±è´¥ï¼Œæ— 法使用。 -"Verification Successful",éªŒè¯æˆåŠŸ -"Please continue with placing order.",请继ç»ä¸‹è®¢å•。 -"Verification Failed",验è¯å¤±è´¥ -"The card has failed verification with the issuer bank.",å¡ç‰‡ä¸Žå‘å¡è¡Œçš„验è¯å¤±è´¥ã€‚ -"Order cannot be placed.",æ— æ³•ä¸‹è®¢å•。 -"Verification cannot be processed",验è¯å·¥ä½œæ— æ³•å¤„ç† -"There has been wrong payment information submitted or time limit has expired. Please, try again.",æäº¤çš„æ”¯ä»˜ä¿¡æ¯é”™è¯¯ï¼Œæˆ–æ—¶é—´é™åˆ¶å·²åˆ°ã€‚请é‡è¯•。 -"Card Verification",信用å¡éªŒè¯ -"Start/Reset Validation...",开始/é‡è®¾éªŒè¯... -"Please verify the card with the issuer bank:",请与å‘å¡è¡ŒéªŒè¯ä¿¡ç”¨å¡ï¼š -"There has been wrong payment information submitted or the time limit has expired. Please, try again.",å·²æäº¤é”™è¯¯çš„æ”¯ä»˜ä¿¡æ¯ï¼Œæˆ–æ—¶é—´é™åˆ¶å·²è¿‡ã€‚请é‡è¯•。 -"To ensure the security of your transactions",è¦ç¡®ä¿æ‚¨çš„交易安全 -"Verified by Visa","Visa 已验è¯" -"MasterCard SecureCode","MasterCard 安全代ç " -Password,Password -"Test Mode","Test Mode" -"Payment Services","Payment Services" -"3D Secure Credit Card Validation","3D Secure Credit Card Validation" -"Processor ID","Processor ID" -"Merchant ID","Merchant ID" -"This overrides any API URL that may be specified by a payment method.","This overrides any API URL that may be specified by a payment method." -"Debug Mode","Debug Mode" diff --git a/app/code/Magento/Centinel/view/adminhtml/layout/adminhtml_centinel_index_authenticationcomplete.xml b/app/code/Magento/Centinel/view/adminhtml/layout/adminhtml_centinel_index_authenticationcomplete.xml deleted file mode 100644 index 24bd3da34274c96689956bd59d0627ca2f22327f..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/adminhtml/layout/adminhtml_centinel_index_authenticationcomplete.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/layout_generic.xsd"> - <container name="root"> - <block class="Magento\Centinel\Block\Authentication\Complete" name="page.block" template="authentication/complete.phtml"/> - </container> -</layout> diff --git a/app/code/Magento/Centinel/view/adminhtml/layout/adminhtml_centinel_index_authenticationstart.xml b/app/code/Magento/Centinel/view/adminhtml/layout/adminhtml_centinel_index_authenticationstart.xml deleted file mode 100644 index c7710e5391f00a75a2fa773fd6fcc019e896c80e..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/adminhtml/layout/adminhtml_centinel_index_authenticationstart.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/layout_generic.xsd"> - <container name="root"> - <block class="Magento\Centinel\Block\Authentication\Start" name="page.block" template="authentication/start.phtml"/> - </container> -</layout> diff --git a/app/code/Magento/Centinel/view/adminhtml/layout/sales_order_create_index.xml b/app/code/Magento/Centinel/view/adminhtml/layout/sales_order_create_index.xml deleted file mode 100644 index 2289c87584180cf45d27a6c6f229fe14af0a3c7d..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/adminhtml/layout/sales_order_create_index.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> - <body> - <referenceBlock name="data"> - <block class="Magento\Centinel\Block\Adminhtml\Validation" as="card_validation" name="card_validation" template="order/create/abstract.phtml"> - <block class="Magento\Centinel\Block\Adminhtml\Validation\Form" template="validation/form.phtml" name="centinel.validation.form" as="form"/> - </block> - </referenceBlock> - </body> -</page> diff --git a/app/code/Magento/Centinel/view/adminhtml/layout/sales_order_create_load_block_card_validation.xml b/app/code/Magento/Centinel/view/adminhtml/layout/sales_order_create_load_block_card_validation.xml deleted file mode 100644 index 6da07e72baf68c362ccc84bcb2705efb16f1afbd..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/adminhtml/layout/sales_order_create_load_block_card_validation.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> - <body> - <referenceContainer name="content"> - <block class="Magento\Centinel\Block\Adminhtml\Validation" as="card_validation" name="card_validation" template="order/create/abstract.phtml"> - <block class="Magento\Centinel\Block\Adminhtml\Validation\Form" template="validation/form.phtml" name="form"/> - </block> - </referenceContainer> - </body> -</page> diff --git a/app/code/Magento/Centinel/view/adminhtml/layout/sales_order_create_load_block_data.xml b/app/code/Magento/Centinel/view/adminhtml/layout/sales_order_create_load_block_data.xml deleted file mode 100644 index 0a7d6cead32ae1a48a77b9de214643e82fdaefa8..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/adminhtml/layout/sales_order_create_load_block_data.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> - <body> - <referenceBlock name="data"> - <block class="Magento\Centinel\Block\Adminhtml\Validation" as="card_validation" name="card_validation" template="order/create/abstract.phtml"> - <block class="Magento\Centinel\Block\Adminhtml\Validation\Form" template="validation/form.phtml" name="form"/> - </block> - </referenceBlock> - </body> -</page> diff --git a/app/code/Magento/Centinel/view/adminhtml/layout/sales_order_create_start.xml b/app/code/Magento/Centinel/view/adminhtml/layout/sales_order_create_start.xml deleted file mode 100644 index 5966970282ad3de0827c93588575ed84424029ff..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/adminhtml/layout/sales_order_create_start.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> - <update handle="sales_order_create_index"/> - <body/> -</page> diff --git a/app/code/Magento/Centinel/view/adminhtml/templates/authentication/complete.phtml b/app/code/Magento/Centinel/view/adminhtml/templates/authentication/complete.phtml deleted file mode 100644 index 6d7a00e1d9fd01bbc35cb0b2723cd6b43ad7d5b7..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/adminhtml/templates/authentication/complete.phtml +++ /dev/null @@ -1,21 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -// @codingStandardsIgnoreFile - -?> -<?php if ($block->getIsProcessed()):?> - <?php if ($block->getIsSuccess()):?> - <h1><?php echo __('Verification Successful');?></h1> - <p><?php echo __('Please continue with placing order.')?></p> - <?php else:?> - <h4><?php echo __('Verification Failed');?></h4> - <p><?php echo __('The card has failed verification with the issuer bank.')?> <strong><?php echo __('Order cannot be placed.')?></strong></p> - <?php endif;?> -<?php else:?> - <h4><?php echo __('Verification cannot be processed');?></h4> - <p><?php echo __('There has been wrong payment information submitted or time limit has expired. Please, try again.')?> <strong><?php echo __('Order cannot be placed.')?></strong></p> -<?php endif;?> diff --git a/app/code/Magento/Centinel/view/adminhtml/templates/authentication/start.phtml b/app/code/Magento/Centinel/view/adminhtml/templates/authentication/start.phtml deleted file mode 100644 index fc8b8705c57a37970b67b247c7fcdcfa2a567ad8..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/adminhtml/templates/authentication/start.phtml +++ /dev/null @@ -1,18 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -?> -<form name="validation_form" id="validation_form" action="<?php echo $block->getAcsUrl();?>" method="post"> - <input type="hidden" name="PaReq" value="<?php echo $block->getPaReq()?>" /> - <input type="hidden" name="TermUrl" value="<?php echo $block->getTermUrl()?>" /> - <input type="hidden" name="MD" value="<?php echo $block->getMd()?>" /> -</form> -<script> -//<![CDATA[ -window.onload = function(){ - document.getElementById('validation_form').submit(); -}; -//]]> -</script> diff --git a/app/code/Magento/Centinel/view/adminhtml/templates/order/create/abstract.phtml b/app/code/Magento/Centinel/view/adminhtml/templates/order/create/abstract.phtml deleted file mode 100644 index 802e8c8759f979775296b44c1953a30aedd867ad..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/adminhtml/templates/order/create/abstract.phtml +++ /dev/null @@ -1,14 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -?> - -<div class="admin__fieldset-wrapper-title"> - <span class="title"><?php echo $block->getHeaderText() ?></span> - <div class="actions"><?php echo $block->getButtonsHtml() ?></div> -</div> -<div class="admin__fieldset-wrapper-content"> - <?php echo $block->getChildHtml('', true) ?> -</div> diff --git a/app/code/Magento/Centinel/view/adminhtml/templates/validation/form.phtml b/app/code/Magento/Centinel/view/adminhtml/templates/validation/form.phtml deleted file mode 100644 index 0f6bc0416f1602199d4a7c434d9603b6674a8196..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/adminhtml/templates/validation/form.phtml +++ /dev/null @@ -1,33 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -// @codingStandardsIgnoreFile - -?> - -<div class="centinel"> - <div class="authentication"> - <iframe frameborder="0" border="0" id="<?php echo $block->getContainerId() ?>" src="" style="display:none;" width="100%" height="390" title="<?php echo __('Card Verification')?>"></iframe> - </div> -</div> - -<div class="actions"> - <button onclick="cardValidator.validate()" class="action- scalable" type="button"> - <span><?php echo __('Start/Reset Validation...')?></span> - </button> -</div> - -<script> -require([ - "Magento_Centinel/order_create" -], function(){ - - //<![CDATA[ - cardValidator = new centinelValidator('<?php echo $block->getMethodCode() ?>', '<?php echo $block->getFrameUrl() ?>', '<?php echo $block->getContainerId() ?>'); - //]]> - -}); -</script> diff --git a/app/code/Magento/Centinel/view/adminhtml/web/order_create.js b/app/code/Magento/Centinel/view/adminhtml/web/order_create.js deleted file mode 100644 index 184bfd307a3f0c0bb1286a0b249869713d0934b8..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/adminhtml/web/order_create.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -define(["prototype"], function(){ - -window.centinelValidator = new Class.create(); - -centinelValidator.prototype = { - - initialize : function(method, validationUrl, containerId){ - this.method = method; - this.validationUrl = validationUrl; - this.containerId = containerId; - }, - - validate : function(){ - if (order.paymentMethod != this.method) { - return false; - } - var params = order.getPaymentData(); - params = order.prepareParams(params); - params.json = true; - - new Ajax.Request(this.validationUrl, { - parameters:params, - method:'post', - onSuccess: function(transport) { - var response = transport.responseText.evalJSON(); - if (response.authenticationUrl) { - this.autenticationStart(response.authenticationUrl); - } - if (response.message) { - this.autenticationFinish(response.message); - } - }.bind(this) - }); - }, - - autenticationStart : function(url) { - this.getContainer().src = url; - this.getContainer().style.display = 'block'; - }, - - autenticationFinish : function(message) { - alert(message); - this.getContainer().style.display = 'none'; - }, - - getContainer : function() { - return $(this.containerId); - } - -}; - -}); \ No newline at end of file diff --git a/app/code/Magento/Centinel/view/frontend/layout/centinel_index_authenticationcomplete.xml b/app/code/Magento/Centinel/view/frontend/layout/centinel_index_authenticationcomplete.xml deleted file mode 100644 index c8d40e57f459b07babc1241419922a900749b70e..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/frontend/layout/centinel_index_authenticationcomplete.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/layout_generic.xsd"> - <container name="root"> - <block class="Magento\Centinel\Block\Authentication\Complete" name="page.block" template="authentication/complete.phtml" cacheable="false"/> - </container> -</layout> diff --git a/app/code/Magento/Centinel/view/frontend/layout/centinel_index_authenticationstart.xml b/app/code/Magento/Centinel/view/frontend/layout/centinel_index_authenticationstart.xml deleted file mode 100644 index 5305d4fdb46b78780de398ae9eb213eeb37c8994..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/frontend/layout/centinel_index_authenticationstart.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/layout_generic.xsd"> - <container name="root"> - <block class="Magento\Centinel\Block\Authentication\Start" name="page.block" template="authentication/start.phtml" cacheable="false"/> - </container> -</layout> diff --git a/app/code/Magento/Centinel/view/frontend/layout/checkout_onepage_review.xml b/app/code/Magento/Centinel/view/frontend/layout/checkout_onepage_review.xml deleted file mode 100644 index 6bdbb4f91bf782eb1e9ddc4e7a68af929b7c559d..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/frontend/layout/checkout_onepage_review.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> - <body> - <referenceContainer name="checkout.onepage.review.info.items.before"> - <block class="Magento\Centinel\Block\Authentication" name="centinel.frame" template="authentication.phtml"> - <action method="setAuthenticationStartMode"> - <argument name="mode" xsi:type="string">instant</argument> - </action> - </block> - </referenceContainer> - </body> -</page> diff --git a/app/code/Magento/Centinel/view/frontend/layout/multishipping_checkout_overview.xml b/app/code/Magento/Centinel/view/frontend/layout/multishipping_checkout_overview.xml deleted file mode 100644 index d94c2799038d7df75bbbb2905696b31e9d4733d8..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/frontend/layout/multishipping_checkout_overview.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> - <body> - <referenceContainer name="checkout.multishipping.overview.items.after"> - <block class="Magento\Centinel\Block\Authentication" name="centinel.frame" template="authentication.phtml"> - <action method="setAuthenticationStartMode"> - <argument name="mode" xsi:type="string">window</argument> - </action> - </block> - </referenceContainer> - </body> -</page> diff --git a/app/code/Magento/Centinel/view/frontend/requirejs-config.js b/app/code/Magento/Centinel/view/frontend/requirejs-config.js deleted file mode 100644 index ffffa3738afb241cb0eb73cd2c34cb698fe1a534..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/frontend/requirejs-config.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -var config = { - map: { - '*': { - centinelAuthenticate: 'Magento_Centinel/centinel-authenticate' - } - } -}; \ No newline at end of file diff --git a/app/code/Magento/Centinel/view/frontend/templates/authentication.phtml b/app/code/Magento/Centinel/view/frontend/templates/authentication.phtml deleted file mode 100644 index eadafd6baadf0330a6ff87dc6e1dd6efe2422ed7..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/frontend/templates/authentication.phtml +++ /dev/null @@ -1,26 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -// @codingStandardsIgnoreFile - -?> -<?php if ($block->getAuthenticationStart()):?> - <div class="centinel" id="centinel-authenticate-block" data-mage-init='{"centinelAuthenticate": {"frameUrl": "<?php echo $block->getFrameUrl() ?>"}}'> - <h3><?php echo __('Card Verification')?></h3> - <p><?php echo __('Please verify the card with the issuer bank:') ?></p> - <div class="authentication"> - <iframe id="centinel-authenticate-iframe" frameborder="0" border="0" src="" data-container="iframe" width="100%" height="400" title="<?php echo __('Card Verification')?>"></iframe> - </div> - </div> -<?php else:?> - <script> -require(['jquery'], function(jQuery){ - - jQuery('[data-container="body"]').trigger("paymentAuthentication", {state: "cancel"}); - -}); -</script> -<?php endif;?> diff --git a/app/code/Magento/Centinel/view/frontend/templates/authentication/complete.phtml b/app/code/Magento/Centinel/view/frontend/templates/authentication/complete.phtml deleted file mode 100644 index 7e0f67b8c22f5446597de0fad1d32215b92187ff..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/frontend/templates/authentication/complete.phtml +++ /dev/null @@ -1,24 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -// @codingStandardsIgnoreFile - -?> -<?php if ($block->getIsProcessed()):?> - <?php if ($block->getIsSuccess()):?> - <script> - - parent.jQuery('[data-container="body"]').trigger("paymentAuthentication", {state: "success"}); - - </script> - <?php else:?> - <h4><?php echo __('Verification Failed');?></h4> - <p><?php echo __('The card has failed verification with the issuer bank.')?> <strong><?php echo __('Order cannot be placed.')?></strong></p> - <?php endif;?> -<?php else:?> - <h4><?php echo __('Verification cannot be processed');?></h4> - <p><?php echo __('There has been wrong payment information submitted or the time limit has expired. Please, try again.')?> <strong><?php echo __('Order cannot be placed.')?></strong></p> -<?php endif;?> diff --git a/app/code/Magento/Centinel/view/frontend/templates/authentication/start.phtml b/app/code/Magento/Centinel/view/frontend/templates/authentication/start.phtml deleted file mode 100644 index 22763408138fb4012c66828ff45e7a29c7eaf8bd..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/frontend/templates/authentication/start.phtml +++ /dev/null @@ -1,21 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -?> -<form name="validation-form" id="validation-form" action="<?php echo $block->getAcsUrl();?>" method="post"> - <fieldset> - <input type="hidden" name="PaReq" value="<?php echo $block->getPaReq()?>" /> - <input type="hidden" name="TermUrl" value="<?php echo $block->getTermUrl()?>" /> - <input type="hidden" name="MD" value="<?php echo $block->getMd()?>" /> - </fieldset> -</form> -<script> - - window.onload = function () { - parent.jQuery('[data-container="body"]').trigger("paymentAuthentication", {state: "start"}); - document.getElementById('validation-form').submit(); - } - -</script> diff --git a/app/code/Magento/Centinel/view/frontend/templates/logo.phtml b/app/code/Magento/Centinel/view/frontend/templates/logo.phtml deleted file mode 100644 index f67f720dc7f345c1700dc9448dea20203ed80dd1..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/frontend/templates/logo.phtml +++ /dev/null @@ -1,18 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -// @codingStandardsIgnoreFile - -?> -<div class="field note <?php echo $block->getCode() ?> logos" id="<?php echo $block->getCode() ?>_centinel_logo"> - <label class="label"><span><?php echo __('To ensure the security of your transactions') ?></span></label> - <div class="control"> - <div class="nested"> - <a href="#" title="<?php echo __('Verified by Visa') ?> " data-mage-init='{"popupWindow": {"windowURL":"<?php echo $this->helper('Magento\Centinel\Helper\Data')->getVisaLearnMorePageUrl()?>","windowName":"verifiedByVisa","width":815,"height":600,"centerScreen":1,"location":0,"status":1,"scrollbars":1,"resizable":1}}'><img src="<?php echo $block->getViewFileUrl('Magento_Centinel::images/vbv_ltbg_71x57.png'); ?>" alt="<?php echo __('Verified by Visa') ?>" /></a> - <a href="#" title="<?php echo __('MasterCard SecureCode'); ?>" data-mage-init='{"popupWindow": {"windowURL":"<?php echo $this->helper('Magento\Centinel\Helper\Data')->getMastercardLearnMorePageUrl()?>","windowName":"secureCode","width":600,"height":403,"centerScreen":1,"location":0,"status":1,"scrollbars":1,"resizable":1}}'><img src="<?php echo $block->getViewFileUrl('Magento_Centinel::images/sc_learn_62x34.png'); ?>" alt="<?php echo __('MasterCard SecureCode') ?>" /></a> - </div> - </div> -</div> diff --git a/app/code/Magento/Centinel/view/frontend/web/centinel-authenticate.js b/app/code/Magento/Centinel/view/frontend/web/centinel-authenticate.js deleted file mode 100644 index 701d373ebee0825ba36ab695435c4c94aa69e0f6..0000000000000000000000000000000000000000 --- a/app/code/Magento/Centinel/view/frontend/web/centinel-authenticate.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -/*jshint jquery:true*/ -define([ - "jquery", - "jquery/ui" -], function($){ - "use strict"; - - $.widget('mage.centinelAuthenticate', { - options : { - frameUrl: '', - iframeSelector: '[data-container="iframe"]', - bodySelector: '[data-container="body"]' - }, - - _create : function() { - // listen for the custom event for changing state - this.element.closest(this.options.bodySelector).on("paymentAuthentication", $.proxy(this._paymentmentAthenticationTrigger, this)); - }, - - _init: function() { - this._isAuthenticationStarted = false; - - // show the frame with the appropriate URL - this.element.find(this.options.iframeSelector).prop('src', this.options.frameUrl); - this.element.show(); - }, - - /** - * This method is used to cancel the call to Centinel from a display perspective as it shows the related blocks and hides the frame. - * @public - */ - cancel : function() { - this.element.hide(); - this.element.find(this.options.iframeSelector).prop('src', ''); - this._isAuthenticationStarted = false; - }, - - /** - * This method is used to complete the interaction from Centinel and resets the display so the order can be placed. - * @public - */ - success : function() { - this.element.hide(); - this._isAuthenticationStarted = false; - }, - - /** - * This method processes the paymentAuthentication actions. - */ - _paymentmentAthenticationTrigger : function(event, data) { - if (data.state === 'start') { - this._start(); - } else if (data.state === 'success') { - this.success(); - } else if (data.state === 'cancel') { - this.cancel(); - } - }, - - /** - * This method is used to initiate the call to Centinel from a display perspective as it hides the related blocks and shows the frame. It also sets the URL in the frame, which initiates the interaction with Centinel. - * @private - */ - _start : function() { - this._isAuthenticationStarted = true; - } - }); - - return $.mage.centinelAuthenticate; -}); \ No newline at end of file diff --git a/app/code/Magento/Centinel/view/frontend/web/images/sc_learn_62x34.png b/app/code/Magento/Centinel/view/frontend/web/images/sc_learn_62x34.png deleted file mode 100644 index 54991ada1dd7b0117d3ad55321eb9307ff655d8a..0000000000000000000000000000000000000000 Binary files a/app/code/Magento/Centinel/view/frontend/web/images/sc_learn_62x34.png and /dev/null differ diff --git a/app/code/Magento/Centinel/view/frontend/web/images/vbv_ltbg_71x57.png b/app/code/Magento/Centinel/view/frontend/web/images/vbv_ltbg_71x57.png deleted file mode 100644 index 691741056a4165982dd90bf0ca7ccf03c08bcdcc..0000000000000000000000000000000000000000 Binary files a/app/code/Magento/Centinel/view/frontend/web/images/vbv_ltbg_71x57.png and /dev/null differ diff --git a/app/code/Magento/Multishipping/Model/Payment/Method/Specification/Is3DSecure.php b/app/code/Magento/Multishipping/Model/Payment/Method/Specification/Is3DSecure.php deleted file mode 100644 index 5d2045ed68e95c6121e24e427ac8fbb46953fad9..0000000000000000000000000000000000000000 --- a/app/code/Magento/Multishipping/Model/Payment/Method/Specification/Is3DSecure.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Multishipping\Model\Payment\Method\Specification; - -use Magento\Framework\App\Config\ScopeConfigInterface as StoreConfig; -use Magento\Payment\Model\Config as PaymentConfig; -use Magento\Payment\Model\Method\Specification\AbstractSpecification; - -/** - * 3D secure specification - */ -class Is3DSecure extends AbstractSpecification -{ - /** - * Allow multiple address with 3d secure flag - */ - const FLAG_ALLOW_MULTIPLE_WITH_3DSECURE = 'allow_multiple_with_3dsecure'; - - /**#@+ - * 3D Secure card validation store config paths - */ - const PATH_PAYMENT_3DSECURE = 'payment/%s/enable3ds'; - - const PATH_PAYMENT_CENTINEL = 'payment/%s/centinel'; - - /**#@-*/ - - /** - * Store config - * - * @var StoreConfig - */ - protected $scopeConfig; - - /** - * Construct - * - * @param PaymentConfig $paymentConfig - * @param StoreConfig $scopeConfig - */ - public function __construct(PaymentConfig $paymentConfig, StoreConfig $scopeConfig) - { - parent::__construct($paymentConfig); - $this->scopeConfig = $scopeConfig; - } - - /** - * {@inheritdoc} - */ - public function isSatisfiedBy($paymentMethod) - { - $is3DSecureSupported = isset( - $this->methodsInfo[$paymentMethod][self::FLAG_ALLOW_MULTIPLE_WITH_3DSECURE] - ) && $this->methodsInfo[$paymentMethod][self::FLAG_ALLOW_MULTIPLE_WITH_3DSECURE]; - return $is3DSecureSupported || !$this->is3DSecureEnabled($paymentMethod); - } - - /** - * Is 3DSecure enabled for payment method - * - * @param string $paymentMethod - * @return bool - */ - protected function is3DSecureEnabled($paymentMethod) - { - return $this->scopeConfig->isSetFlag( - sprintf(self::PATH_PAYMENT_3DSECURE, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $paymentMethod) - ) || $this->scopeConfig->isSetFlag( - sprintf(self::PATH_PAYMENT_CENTINEL, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $paymentMethod) - ); - } -} diff --git a/app/code/Magento/Multishipping/Test/Unit/Model/Payment/Method/Specification/Is3DSecureTest.php b/app/code/Magento/Multishipping/Test/Unit/Model/Payment/Method/Specification/Is3DSecureTest.php deleted file mode 100644 index e5829d3c775fd82f5172a5cf22af54b7f23dc68a..0000000000000000000000000000000000000000 --- a/app/code/Magento/Multishipping/Test/Unit/Model/Payment/Method/Specification/Is3DSecureTest.php +++ /dev/null @@ -1,96 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Multishipping\Test\Unit\Model\Payment\Method\Specification; - -/** - * Multishipping specification Test - */ -class Is3DSecureTest extends \PHPUnit_Framework_TestCase -{ - /** - * Object Manager helper - * - * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager - */ - protected $objectManager; - - /** - * Payment config mock - * - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Payment\Model\Config - */ - protected $paymentConfigMock; - - /** - * Store config mock - * - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\App\Config\ScopeConfigInterface - */ - protected $scopeConfigMock; - - public function setUp() - { - $this->paymentConfigMock = $this->getMock('\Magento\Payment\Model\Config', [], [], '', false); - $this->scopeConfigMock = $this->getMock('\Magento\Framework\App\Config\ScopeConfigInterface'); - $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); - } - - /** - * Test isSatisfiedBy method - * - * @param array $methodsInfo - * @param bool $is3DSecureEnabled - * @param bool $result - * @dataProvider methodsDataProvider - */ - public function testIsSatisfiedBy($methodsInfo, $is3DSecureEnabled, $result) - { - $method = 'method-name'; - $methodsInfo = [$method => $methodsInfo]; - - $this->paymentConfigMock->expects( - $this->once() - )->method( - 'getMethodsInfo' - )->will( - $this->returnValue($methodsInfo) - ); - $this->scopeConfigMock->expects( - $this->any() - )->method( - 'isSetFlag' - )->will( - $this->returnValue($is3DSecureEnabled) - ); - - $configSpecification = $this->objectManager->getObject( - 'Magento\Multishipping\Model\Payment\Method\Specification\Is3DSecure', - ['paymentConfig' => $this->paymentConfigMock, 'scopeConfig' => $this->scopeConfigMock] - ); - - $this->assertEquals( - $result, - $configSpecification->isSatisfiedBy($method), - sprintf('Failed payment method test: "%s"', $method) - ); - } - - /** - * Data provider - * - * @return array - */ - public function methodsDataProvider() - { - return [ - [['allow_multiple_with_3dsecure' => 1], true, true], - [['allow_multiple_with_3dsecure' => 1], false, true], - [['allow_multiple_with_3dsecure' => 0], true, false], - [['allow_multiple_with_3dsecure' => 0], false, true], - [['no-flag' => 0], true, false] - ]; - } -} diff --git a/app/code/Magento/Multishipping/etc/frontend/di.xml b/app/code/Magento/Multishipping/etc/frontend/di.xml index adac7cf03e70d3e206c991a7719c9956c1b36588..0320b5cc341c4b6bd030ae4afffdb2248c00cb1e 100644 --- a/app/code/Magento/Multishipping/etc/frontend/di.xml +++ b/app/code/Magento/Multishipping/etc/frontend/di.xml @@ -17,7 +17,6 @@ <arguments> <argument name="specifications" xsi:type="array"> <item name="enabled" xsi:type="string">Magento\Multishipping\Model\Payment\Method\Specification\Enabled</item> - <item name="3dsecure" xsi:type="string">Magento\Multishipping\Model\Payment\Method\Specification\Is3DSecure</item> </argument> </arguments> </virtualType> diff --git a/app/code/Magento/Payment/Model/Method/Cc.php b/app/code/Magento/Payment/Model/Method/Cc.php index 978e75c5840aaeae528aad5111f93b3c77fc75c5..7e9e8c018116910a54dff0dab95c93c4a72ea0a9 100644 --- a/app/code/Magento/Payment/Model/Method/Cc.php +++ b/app/code/Magento/Payment/Model/Method/Cc.php @@ -36,13 +36,6 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod */ protected $_localeDate; - /** - * Centinel service model - * - * @var \Magento\Centinel\Model\Service - */ - protected $_centinelService; - /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry @@ -52,7 +45,6 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\Module\ModuleListInterface $moduleList * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate - * @param \Magento\Centinel\Model\Service $centinelService * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data @@ -67,7 +59,6 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\Module\ModuleListInterface $moduleList, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, - \Magento\Centinel\Model\Service $centinelService, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = [] @@ -85,7 +76,6 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod ); $this->_moduleList = $moduleList; $this->_localeDate = $localeDate; - $this->_centinelService = $centinelService; } /** @@ -240,11 +230,6 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod throw new \Magento\Framework\Exception\LocalizedException($errorMsg); } - //This must be after all validation conditions - if ($this->getIsCentinelValidationEnabled()) { - $this->getCentinelValidator()->validate($this->getCentinelValidationData()); - } - return $this; } @@ -369,128 +354,4 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod { return $this->getConfigData('cctypes', $quote ? $quote->getStoreId() : null) && parent::isAvailable($quote); } - - /** - * Whether centinel service is enabled - * - * @return bool - * @SuppressWarnings(PHPMD.BooleanGetMethodName) - */ - public function getIsCentinelValidationEnabled() - { - return $this->_moduleList->has('Magento_Centinel') && 1 == $this->getConfigData('centinel'); - } - - /** - * Instantiate centinel validator model - * - * @return \Magento\Centinel\Model\Service - */ - public function getCentinelValidator() - { - $this->_centinelService->setIsModeStrict( - $this->getConfigData('centinel_is_mode_strict') - )->setCustomApiEndpointUrl( - $this->getConfigData('centinel_api_url') - )->setStore( - $this->getStore() - )->setIsPlaceOrder( - $this->_isPlaceOrder() - ); - return $this->_centinelService; - } - - /** - * Return data for Centinel validation - * - * @return \Magento\Framework\Object - */ - public function getCentinelValidationData() - { - $info = $this->getInfoInstance(); - $params = new \Magento\Framework\Object(); - $params->setPaymentMethodCode( - $this->getCode() - )->setCardType( - $info->getCcType() - )->setCardNumber( - $info->getCcNumber() - )->setCardExpMonth( - $info->getCcExpMonth() - )->setCardExpYear( - $info->getCcExpYear() - )->setAmount( - $this->_getAmount() - )->setCurrencyCode( - $this->_getCurrencyCode() - )->setOrderNumber( - $this->_getOrderId() - ); - return $params; - } - - /** - * Order increment ID getter (either real from order or a reserved from quote) - * - * @return string - */ - private function _getOrderId() - { - $info = $this->getInfoInstance(); - - if ($this->_isPlaceOrder()) { - return $info->getOrder()->getIncrementId(); - } else { - if (!$info->getQuote()->getReservedOrderId()) { - $info->getQuote()->reserveOrderId(); - } - return $info->getQuote()->getReservedOrderId(); - } - } - - /** - * Grand total getter - * - * @return string - */ - private function _getAmount() - { - $info = $this->getInfoInstance(); - if ($this->_isPlaceOrder()) { - return (double)$info->getOrder()->getQuoteBaseGrandTotal(); - } else { - return (double)$info->getQuote()->getBaseGrandTotal(); - } - } - - /** - * Currency code getter - * - * @return string - */ - private function _getCurrencyCode() - { - $info = $this->getInfoInstance(); - - if ($this->_isPlaceOrder()) { - return $info->getOrder()->getBaseCurrencyCode(); - } else { - return $info->getQuote()->getBaseCurrencyCode(); - } - } - - /** - * Whether current operation is order placement - * - * @return bool - */ - private function _isPlaceOrder() - { - $info = $this->getInfoInstance(); - if ($info instanceof \Magento\Quote\Model\Quote\Payment) { - return false; - } elseif ($info instanceof \Magento\Sales\Model\Order\Payment) { - return true; - } - } } diff --git a/app/code/Magento/Payment/composer.json b/app/code/Magento/Payment/composer.json index 268b2e08e3183fd082b4edbdfeb57352788a13cf..0bd38731466929f4d3ab1e10d61decf4fad62966 100644 --- a/app/code/Magento/Payment/composer.json +++ b/app/code/Magento/Payment/composer.json @@ -6,7 +6,6 @@ "magento/module-config": "0.74.0-beta9", "magento/module-store": "0.74.0-beta9", "magento/module-sales": "0.74.0-beta9", - "magento/module-centinel": "0.74.0-beta9", "magento/module-checkout": "0.74.0-beta9", "magento/module-quote": "0.74.0-beta9", "magento/framework": "0.74.0-beta9", diff --git a/composer.json b/composer.json index 4f3e3fd09aa9f3a1e3c193cd60f213a5bf917c97..c72e684b8ceff55b2ba85cca5159656f01e98204 100644 --- a/composer.json +++ b/composer.json @@ -73,7 +73,6 @@ "magento/module-catalog-search": "self.version", "magento/module-catalog-url-rewrite": "self.version", "magento/module-catalog-widget": "self.version", - "magento/module-centinel": "self.version", "magento/module-checkout": "self.version", "magento/module-checkout-agreements": "self.version", "magento/module-cms": "self.version", diff --git a/composer.lock b/composer.lock index 821b8b89ce17c63fdf6db5e167b6261eba24e45a..dab05ce08381291f92ea19e97576c59f0d311b69 100644 --- a/composer.lock +++ b/composer.lock @@ -1,10 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "b84fdfc407c466b5a784bc2991459388", + "hash": "b5ed1110b17f44d67fdff6770cfae793", "packages": [ { "name": "composer/composer", @@ -685,13 +685,13 @@ "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendCode.git", - "reference": "cfd5951ff4348e4430850560416c7ddb755f95d3" + "url": "https://github.com/zendframework/zend-code.git", + "reference": "0ed94f842ba60cdc900c46a61bdbd7ac95a3e140" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendCode/zipball/cfd5951ff4348e4430850560416c7ddb755f95d3", - "reference": "cfd5951ff4348e4430850560416c7ddb755f95d3", + "url": "https://api.github.com/repos/zendframework/zend-code/zipball/0ed94f842ba60cdc900c46a61bdbd7ac95a3e140", + "reference": "0ed94f842ba60cdc900c46a61bdbd7ac95a3e140", "shasum": "" }, "require": { @@ -700,6 +700,9 @@ }, "require-dev": { "doctrine/common": ">=2.1", + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-stdlib": "self.version" }, "suggest": { @@ -715,7 +718,7 @@ }, "autoload": { "psr-4": { - "Zend\\Code\\": "" + "Zend\\Code\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -723,25 +726,25 @@ "BSD-3-Clause" ], "description": "provides facilities to generate arbitrary code using an object oriented interface", - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-code", "keywords": [ "code", "zf2" ], - "time": "2015-04-01 17:59:08" + "time": "2015-03-31 15:39:14" }, { "name": "zendframework/zend-config", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendConfig.git", - "reference": "8682fe4e2923b383bb6472fc84b5796a07589163" + "url": "https://github.com/zendframework/zend-config.git", + "reference": "95f3a4b3fa85d49e6f060183122de4596fa6d29d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendConfig/zipball/8682fe4e2923b383bb6472fc84b5796a07589163", - "reference": "8682fe4e2923b383bb6472fc84b5796a07589163", + "url": "https://api.github.com/repos/zendframework/zend-config/zipball/95f3a4b3fa85d49e6f060183122de4596fa6d29d", + "reference": "95f3a4b3fa85d49e6f060183122de4596fa6d29d", "shasum": "" }, "require": { @@ -749,6 +752,9 @@ "zendframework/zend-stdlib": "self.version" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-filter": "self.version", "zendframework/zend-i18n": "self.version", "zendframework/zend-json": "self.version", @@ -769,7 +775,7 @@ }, "autoload": { "psr-4": { - "Zend\\Config\\": "" + "Zend\\Config\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -777,31 +783,36 @@ "BSD-3-Clause" ], "description": "provides a nested object property based user interface for accessing this configuration data within application code", - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-config", "keywords": [ "config", "zf2" ], - "time": "2015-04-01 17:59:31" + "time": "2015-03-25 20:55:48" }, { "name": "zendframework/zend-console", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendConsole.git", - "reference": "94ab6663b07e19f20b3319ecf317bd72b6a72dca" + "url": "https://github.com/zendframework/zend-console.git", + "reference": "54823d9ba6f8ce39046384ee5a043b5b3d5f56d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendConsole/zipball/94ab6663b07e19f20b3319ecf317bd72b6a72dca", - "reference": "94ab6663b07e19f20b3319ecf317bd72b6a72dca", + "url": "https://api.github.com/repos/zendframework/zend-console/zipball/54823d9ba6f8ce39046384ee5a043b5b3d5f56d7", + "reference": "54823d9ba6f8ce39046384ee5a043b5b3d5f56d7", "shasum": "" }, "require": { "php": ">=5.3.23", "zendframework/zend-stdlib": "self.version" }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master" + }, "suggest": { "zendframework/zend-filter": "To support DefaultRouteMatcher usage", "zendframework/zend-validator": "To support DefaultRouteMatcher usage" @@ -815,32 +826,32 @@ }, "autoload": { "psr-4": { - "Zend\\Console\\": "" + "Zend\\Console\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-console", "keywords": [ "console", "zf2" ], - "time": "2015-04-01 17:59:48" + "time": "2015-03-25 20:55:48" }, { "name": "zendframework/zend-di", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendDi.git", - "reference": "0811f2a67ad0b50dfb8d602ed67cde0b82249190" + "url": "https://github.com/zendframework/zend-di.git", + "reference": "b9f8de081adecf71a003a569e9ba76c0a4c00bf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendDi/zipball/0811f2a67ad0b50dfb8d602ed67cde0b82249190", - "reference": "0811f2a67ad0b50dfb8d602ed67cde0b82249190", + "url": "https://api.github.com/repos/zendframework/zend-di/zipball/b9f8de081adecf71a003a569e9ba76c0a4c00bf2", + "reference": "b9f8de081adecf71a003a569e9ba76c0a4c00bf2", "shasum": "" }, "require": { @@ -849,6 +860,9 @@ "zendframework/zend-stdlib": "self.version" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-servicemanager": "self.version" }, "suggest": { @@ -863,37 +877,42 @@ }, "autoload": { "psr-4": { - "Zend\\Di\\": "" + "Zend\\Di\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-di", "keywords": [ "di", "zf2" ], - "time": "2015-04-01 18:01:30" + "time": "2015-03-25 20:55:48" }, { "name": "zendframework/zend-escaper", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendEscaper.git", - "reference": "65b3328627362b0be1d5e9067bc846511d1fbc96" + "url": "https://github.com/zendframework/zend-escaper.git", + "reference": "15e5769e4fcdb4bf07ebd76500810e7070e23a97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendEscaper/zipball/65b3328627362b0be1d5e9067bc846511d1fbc96", - "reference": "65b3328627362b0be1d5e9067bc846511d1fbc96", + "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/15e5769e4fcdb4bf07ebd76500810e7070e23a97", + "reference": "15e5769e4fcdb4bf07ebd76500810e7070e23a97", "shasum": "" }, "require": { "php": ">=5.3.23" }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master" + }, "type": "library", "extra": { "branch-alias": { @@ -903,38 +922,43 @@ }, "autoload": { "psr-4": { - "Zend\\Escaper\\": "" + "Zend\\Escaper\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-escaper", "keywords": [ "escaper", "zf2" ], - "time": "2015-04-01 18:02:07" + "time": "2015-03-23 18:29:14" }, { "name": "zendframework/zend-eventmanager", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendEventManager.git", - "reference": "38df5b567d4ff4d22144745c503ba0502d0d5695" + "url": "https://github.com/zendframework/zend-eventmanager.git", + "reference": "58d21c95c7005a527262fd536499195f104e83f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendEventManager/zipball/38df5b567d4ff4d22144745c503ba0502d0d5695", - "reference": "38df5b567d4ff4d22144745c503ba0502d0d5695", + "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/58d21c95c7005a527262fd536499195f104e83f9", + "reference": "58d21c95c7005a527262fd536499195f104e83f9", "shasum": "" }, "require": { "php": ">=5.3.23", "zendframework/zend-stdlib": "self.version" }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master" + }, "type": "library", "extra": { "branch-alias": { @@ -944,32 +968,32 @@ }, "autoload": { "psr-4": { - "Zend\\EventManager\\": "" + "Zend\\EventManager\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-event-manager", "keywords": [ "eventmanager", "zf2" ], - "time": "2015-04-01 18:05:26" + "time": "2015-03-23 18:29:14" }, { "name": "zendframework/zend-filter", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendFilter.git", - "reference": "b13741a88553351fc52472de529b57b580b8f6f1" + "url": "https://github.com/zendframework/zend-filter.git", + "reference": "6d8aed2da81b62a04747346c4370562cdbe34595" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendFilter/zipball/b13741a88553351fc52472de529b57b580b8f6f1", - "reference": "b13741a88553351fc52472de529b57b580b8f6f1", + "url": "https://api.github.com/repos/zendframework/zend-filter/zipball/6d8aed2da81b62a04747346c4370562cdbe34595", + "reference": "6d8aed2da81b62a04747346c4370562cdbe34595", "shasum": "" }, "require": { @@ -977,6 +1001,9 @@ "zendframework/zend-stdlib": "self.version" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-crypt": "self.version", "zendframework/zend-servicemanager": "self.version", "zendframework/zend-uri": "self.version" @@ -996,7 +1023,7 @@ }, "autoload": { "psr-4": { - "Zend\\Filter\\": "" + "Zend\\Filter\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1004,25 +1031,25 @@ "BSD-3-Clause" ], "description": "provides a set of commonly needed data filters", - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-filter", "keywords": [ "filter", "zf2" ], - "time": "2015-04-01 18:09:25" + "time": "2015-03-25 20:55:48" }, { "name": "zendframework/zend-form", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendForm.git", - "reference": "09f5bd46ffbf783df22281898e2175b291bd43a3" + "url": "https://github.com/zendframework/zend-form.git", + "reference": "bca0db55718355d25c2c10fdd41a83561f1c94b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendForm/zipball/09f5bd46ffbf783df22281898e2175b291bd43a3", - "reference": "09f5bd46ffbf783df22281898e2175b291bd43a3", + "url": "https://api.github.com/repos/zendframework/zend-form/zipball/bca0db55718355d25c2c10fdd41a83561f1c94b3", + "reference": "bca0db55718355d25c2c10fdd41a83561f1c94b3", "shasum": "" }, "require": { @@ -1031,6 +1058,9 @@ "zendframework/zend-stdlib": "self.version" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-captcha": "self.version", "zendframework/zend-code": "self.version", "zendframework/zend-eventmanager": "self.version", @@ -1061,32 +1091,32 @@ }, "autoload": { "psr-4": { - "Zend\\Form\\": "" + "Zend\\Form\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-form", "keywords": [ "form", "zf2" ], - "time": "2015-04-01 18:09:25" + "time": "2015-03-28 20:29:18" }, { "name": "zendframework/zend-http", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendHttp.git", - "reference": "ee6220609845b32d1b2873c9ac694aef56d508f5" + "url": "https://github.com/zendframework/zend-http.git", + "reference": "9c6047a0bdb3094d3ea07a215ff929cc47de4deb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendHttp/zipball/ee6220609845b32d1b2873c9ac694aef56d508f5", - "reference": "ee6220609845b32d1b2873c9ac694aef56d508f5", + "url": "https://api.github.com/repos/zendframework/zend-http/zipball/9c6047a0bdb3094d3ea07a215ff929cc47de4deb", + "reference": "9c6047a0bdb3094d3ea07a215ff929cc47de4deb", "shasum": "" }, "require": { @@ -1096,6 +1126,11 @@ "zendframework/zend-uri": "self.version", "zendframework/zend-validator": "self.version" }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master" + }, "type": "library", "extra": { "branch-alias": { @@ -1105,7 +1140,7 @@ }, "autoload": { "psr-4": { - "Zend\\Http\\": "" + "Zend\\Http\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1113,25 +1148,25 @@ "BSD-3-Clause" ], "description": "provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests", - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-http", "keywords": [ "http", "zf2" ], - "time": "2015-04-01 18:09:25" + "time": "2015-03-27 15:46:30" }, { "name": "zendframework/zend-i18n", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendI18n.git", - "reference": "33051775d9a8c341fe3b77d1f3daa0e921e2f4bd" + "url": "https://github.com/zendframework/zend-i18n.git", + "reference": "9aebc5287373a802540d75fe5508417f866c2e52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendI18n/zipball/33051775d9a8c341fe3b77d1f3daa0e921e2f4bd", - "reference": "33051775d9a8c341fe3b77d1f3daa0e921e2f4bd", + "url": "https://api.github.com/repos/zendframework/zend-i18n/zipball/9aebc5287373a802540d75fe5508417f866c2e52", + "reference": "9aebc5287373a802540d75fe5508417f866c2e52", "shasum": "" }, "require": { @@ -1139,6 +1174,9 @@ "zendframework/zend-stdlib": "self.version" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-cache": "self.version", "zendframework/zend-config": "self.version", "zendframework/zend-eventmanager": "self.version", @@ -1167,32 +1205,32 @@ }, "autoload": { "psr-4": { - "Zend\\I18n\\": "" + "Zend\\I18n\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-i18n", "keywords": [ "i18n", "zf2" ], - "time": "2015-04-01 18:09:26" + "time": "2015-03-25 20:55:48" }, { "name": "zendframework/zend-inputfilter", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendInputFilter.git", - "reference": "16856fec61f285e41e5492235220a4dec06ab90f" + "url": "https://github.com/zendframework/zend-inputfilter.git", + "reference": "4b1398f3635fae3cc5e873c5bb067274f3d10a93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendInputFilter/zipball/16856fec61f285e41e5492235220a4dec06ab90f", - "reference": "16856fec61f285e41e5492235220a4dec06ab90f", + "url": "https://api.github.com/repos/zendframework/zend-inputfilter/zipball/4b1398f3635fae3cc5e873c5bb067274f3d10a93", + "reference": "4b1398f3635fae3cc5e873c5bb067274f3d10a93", "shasum": "" }, "require": { @@ -1202,6 +1240,9 @@ "zendframework/zend-validator": "self.version" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-servicemanager": "self.version" }, "suggest": { @@ -1216,32 +1257,32 @@ }, "autoload": { "psr-4": { - "Zend\\InputFilter\\": "" + "Zend\\InputFilter\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-input-filter", "keywords": [ "inputfilter", "zf2" ], - "time": "2015-04-01 18:09:26" + "time": "2015-03-23 18:29:14" }, { "name": "zendframework/zend-json", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendJson.git", - "reference": "76aeb27e4baf39799e5ca3cf6f2fdd6748ee930c" + "url": "https://github.com/zendframework/zend-json.git", + "reference": "2d845e151c1b9a237cf1899ac31e17fb10bd1e3f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendJson/zipball/76aeb27e4baf39799e5ca3cf6f2fdd6748ee930c", - "reference": "76aeb27e4baf39799e5ca3cf6f2fdd6748ee930c", + "url": "https://api.github.com/repos/zendframework/zend-json/zipball/2d845e151c1b9a237cf1899ac31e17fb10bd1e3f", + "reference": "2d845e151c1b9a237cf1899ac31e17fb10bd1e3f", "shasum": "" }, "require": { @@ -1249,6 +1290,9 @@ "zendframework/zend-stdlib": "self.version" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-http": "self.version", "zendframework/zend-server": "self.version" }, @@ -1266,7 +1310,7 @@ }, "autoload": { "psr-4": { - "Zend\\Json\\": "" + "Zend\\Json\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1274,30 +1318,35 @@ "BSD-3-Clause" ], "description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP", - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-json", "keywords": [ "json", "zf2" ], - "time": "2015-04-01 18:09:26" + "time": "2015-03-25 20:55:48" }, { "name": "zendframework/zend-loader", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendLoader.git", - "reference": "6868b8a0c346f17fb97724c3a63aa2cbf6b94865" + "url": "https://github.com/zendframework/zend-loader.git", + "reference": "65de2c7a56f8eee633c6bf1cfab73e45648880d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendLoader/zipball/6868b8a0c346f17fb97724c3a63aa2cbf6b94865", - "reference": "6868b8a0c346f17fb97724c3a63aa2cbf6b94865", + "url": "https://api.github.com/repos/zendframework/zend-loader/zipball/65de2c7a56f8eee633c6bf1cfab73e45648880d4", + "reference": "65de2c7a56f8eee633c6bf1cfab73e45648880d4", "shasum": "" }, "require": { "php": ">=5.3.23" }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master" + }, "type": "library", "extra": { "branch-alias": { @@ -1307,32 +1356,32 @@ }, "autoload": { "psr-4": { - "Zend\\Loader\\": "" + "Zend\\Loader\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-loader", "keywords": [ "loader", "zf2" ], - "time": "2015-04-01 18:09:26" + "time": "2015-03-23 18:29:14" }, { "name": "zendframework/zend-log", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendLog.git", - "reference": "2d5d20fd45470506bdaff727c46dc25fe953146e" + "url": "https://github.com/zendframework/zend-log.git", + "reference": "002e3c810cad7e31e51c9895e9e3cb6fbd312cdd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendLog/zipball/2d5d20fd45470506bdaff727c46dc25fe953146e", - "reference": "2d5d20fd45470506bdaff727c46dc25fe953146e", + "url": "https://api.github.com/repos/zendframework/zend-log/zipball/002e3c810cad7e31e51c9895e9e3cb6fbd312cdd", + "reference": "002e3c810cad7e31e51c9895e9e3cb6fbd312cdd", "shasum": "" }, "require": { @@ -1341,6 +1390,9 @@ "zendframework/zend-stdlib": "self.version" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-console": "self.version", "zendframework/zend-db": "self.version", "zendframework/zend-escaper": "self.version", @@ -1364,7 +1416,7 @@ }, "autoload": { "psr-4": { - "Zend\\Log\\": "" + "Zend\\Log\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1372,31 +1424,36 @@ "BSD-3-Clause" ], "description": "component for general purpose logging", - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-log", "keywords": [ "log", "logging", "zf2" ], - "time": "2015-04-01 18:09:26" + "time": "2015-03-25 20:55:48" }, { "name": "zendframework/zend-math", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendMath.git", - "reference": "634123f83ca90b6613f132d0d100e6b5e9890a29" + "url": "https://github.com/zendframework/zend-math.git", + "reference": "f41fe4acfd809c14f2a802d1aa45dec8fcd2cc73" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendMath/zipball/634123f83ca90b6613f132d0d100e6b5e9890a29", - "reference": "634123f83ca90b6613f132d0d100e6b5e9890a29", + "url": "https://api.github.com/repos/zendframework/zend-math/zipball/f41fe4acfd809c14f2a802d1aa45dec8fcd2cc73", + "reference": "f41fe4acfd809c14f2a802d1aa45dec8fcd2cc73", "shasum": "" }, "require": { "php": ">=5.3.23" }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master" + }, "suggest": { "ext-bcmath": "If using the bcmath functionality", "ext-gmp": "If using the gmp functionality", @@ -1412,32 +1469,32 @@ }, "autoload": { "psr-4": { - "Zend\\Math\\": "" + "Zend\\Math\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-math", "keywords": [ "math", "zf2" ], - "time": "2015-04-01 18:09:27" + "time": "2015-03-23 18:29:14" }, { "name": "zendframework/zend-modulemanager", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendModuleManager.git", - "reference": "cbe16b0eafe734a062ed0182381e64b9c953dccf" + "url": "https://github.com/zendframework/zend-modulemanager.git", + "reference": "af7ae3cd29a1efb73cc66ae1081e606039d5c20f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendModuleManager/zipball/cbe16b0eafe734a062ed0182381e64b9c953dccf", - "reference": "cbe16b0eafe734a062ed0182381e64b9c953dccf", + "url": "https://api.github.com/repos/zendframework/zend-modulemanager/zipball/af7ae3cd29a1efb73cc66ae1081e606039d5c20f", + "reference": "af7ae3cd29a1efb73cc66ae1081e606039d5c20f", "shasum": "" }, "require": { @@ -1446,6 +1503,9 @@ "zendframework/zend-stdlib": "self.version" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-config": "self.version", "zendframework/zend-console": "self.version", "zendframework/zend-loader": "self.version", @@ -1467,32 +1527,32 @@ }, "autoload": { "psr-4": { - "Zend\\ModuleManager\\": "" + "Zend\\ModuleManager\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-module-manager", "keywords": [ "modulemanager", "zf2" ], - "time": "2015-04-01 18:09:27" + "time": "2015-03-23 18:29:14" }, { "name": "zendframework/zend-mvc", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendMvc.git", - "reference": "bfff0f5f9e4d925ee13b8c159c9d6ae7e0db5412" + "url": "https://github.com/zendframework/zend-mvc.git", + "reference": "0b4a4a829b30be510a3f215c4ff00c703ee8b431" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendMvc/zipball/bfff0f5f9e4d925ee13b8c159c9d6ae7e0db5412", - "reference": "bfff0f5f9e4d925ee13b8c159c9d6ae7e0db5412", + "url": "https://api.github.com/repos/zendframework/zend-mvc/zipball/0b4a4a829b30be510a3f215c4ff00c703ee8b431", + "reference": "0b4a4a829b30be510a3f215c4ff00c703ee8b431", "shasum": "" }, "require": { @@ -1503,6 +1563,9 @@ "zendframework/zend-stdlib": "self.version" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-authentication": "self.version", "zendframework/zend-console": "self.version", "zendframework/zend-di": "self.version", @@ -1551,32 +1614,32 @@ }, "autoload": { "psr-4": { - "Zend\\Mvc\\": "" + "Zend\\Mvc\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-mvc", "keywords": [ "mvc", "zf2" ], - "time": "2015-04-01 18:09:27" + "time": "2015-03-26 18:55:14" }, { "name": "zendframework/zend-serializer", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendSerializer.git", - "reference": "a46960854d6326f0036d98c9abc7a79e36e25928" + "url": "https://github.com/zendframework/zend-serializer.git", + "reference": "3c531789a9882a5deb721356a7bd2642b65d4b09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendSerializer/zipball/a46960854d6326f0036d98c9abc7a79e36e25928", - "reference": "a46960854d6326f0036d98c9abc7a79e36e25928", + "url": "https://api.github.com/repos/zendframework/zend-serializer/zipball/3c531789a9882a5deb721356a7bd2642b65d4b09", + "reference": "3c531789a9882a5deb721356a7bd2642b65d4b09", "shasum": "" }, "require": { @@ -1586,6 +1649,9 @@ "zendframework/zend-stdlib": "self.version" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-servicemanager": "self.version" }, "suggest": { @@ -1600,7 +1666,7 @@ }, "autoload": { "psr-4": { - "Zend\\Serializer\\": "" + "Zend\\Serializer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1608,25 +1674,25 @@ "BSD-3-Clause" ], "description": "provides an adapter based interface to simply generate storable representation of PHP types by different facilities, and recover", - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-serializer", "keywords": [ "serializer", "zf2" ], - "time": "2015-04-01 18:09:28" + "time": "2015-03-25 20:55:48" }, { "name": "zendframework/zend-server", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendServer.git", - "reference": "fc73c34490908ba143af3c57c7e166b40c4b9f8e" + "url": "https://github.com/zendframework/zend-server.git", + "reference": "d11ff0bd529d202022823d4accf5983cbd50fc49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendServer/zipball/fc73c34490908ba143af3c57c7e166b40c4b9f8e", - "reference": "fc73c34490908ba143af3c57c7e166b40c4b9f8e", + "url": "https://api.github.com/repos/zendframework/zend-server/zipball/d11ff0bd529d202022823d4accf5983cbd50fc49", + "reference": "d11ff0bd529d202022823d4accf5983cbd50fc49", "shasum": "" }, "require": { @@ -1634,6 +1700,11 @@ "zendframework/zend-code": "self.version", "zendframework/zend-stdlib": "self.version" }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master" + }, "type": "library", "extra": { "branch-alias": { @@ -1643,38 +1714,41 @@ }, "autoload": { "psr-4": { - "Zend\\Server\\": "" + "Zend\\Server\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-server", "keywords": [ "server", "zf2" ], - "time": "2015-04-01 18:09:28" + "time": "2015-03-25 20:55:48" }, { "name": "zendframework/zend-servicemanager", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendServiceManager.git", - "reference": "d3c27c708a148a30608f313a5b7a61a531bd9cb9" + "url": "https://github.com/zendframework/zend-servicemanager.git", + "reference": "57cf99fa5ac08c05a135a8d0d676c52a5e450083" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendServiceManager/zipball/d3c27c708a148a30608f313a5b7a61a531bd9cb9", - "reference": "d3c27c708a148a30608f313a5b7a61a531bd9cb9", + "url": "https://api.github.com/repos/zendframework/zend-servicemanager/zipball/57cf99fa5ac08c05a135a8d0d676c52a5e450083", + "reference": "57cf99fa5ac08c05a135a8d0d676c52a5e450083", "shasum": "" }, "require": { "php": ">=5.3.23" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-di": "self.version" }, "suggest": { @@ -1690,32 +1764,32 @@ }, "autoload": { "psr-4": { - "Zend\\ServiceManager\\": "" + "Zend\\ServiceManager\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-service-manager", "keywords": [ "servicemanager", "zf2" ], - "time": "2015-04-01 18:09:28" + "time": "2015-03-23 18:29:14" }, { "name": "zendframework/zend-soap", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendSoap.git", - "reference": "e42b900798ea95a9063fa4922da976d8b3a8ab6f" + "url": "https://github.com/zendframework/zend-soap.git", + "reference": "a599463aba97ce247faf3fb443e3c7858b46449b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendSoap/zipball/e42b900798ea95a9063fa4922da976d8b3a8ab6f", - "reference": "e42b900798ea95a9063fa4922da976d8b3a8ab6f", + "url": "https://api.github.com/repos/zendframework/zend-soap/zipball/a599463aba97ce247faf3fb443e3c7858b46449b", + "reference": "a599463aba97ce247faf3fb443e3c7858b46449b", "shasum": "" }, "require": { @@ -1725,6 +1799,9 @@ "zendframework/zend-uri": "self.version" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-http": "self.version" }, "suggest": { @@ -1739,38 +1816,41 @@ }, "autoload": { "psr-4": { - "Zend\\Soap\\": "" + "Zend\\Soap\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-soap", "keywords": [ "soap", "zf2" ], - "time": "2015-04-01 18:09:29" + "time": "2015-03-25 20:55:48" }, { "name": "zendframework/zend-stdlib", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendStdlib.git", - "reference": "eab586f4c18af3fa63c977611939f1f4a3cf1030" + "url": "https://github.com/zendframework/zend-stdlib.git", + "reference": "cf05c5ba75606e47ffee91cedc72778da46f74c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/eab586f4c18af3fa63c977611939f1f4a3cf1030", - "reference": "eab586f4c18af3fa63c977611939f1f4a3cf1030", + "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/cf05c5ba75606e47ffee91cedc72778da46f74c3", + "reference": "cf05c5ba75606e47ffee91cedc72778da46f74c3", "shasum": "" }, "require": { "php": ">=5.3.23" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-eventmanager": "self.version", "zendframework/zend-filter": "self.version", "zendframework/zend-serializer": "self.version", @@ -1791,32 +1871,32 @@ }, "autoload": { "psr-4": { - "Zend\\Stdlib\\": "" + "Zend\\Stdlib\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-stdlib", "keywords": [ "stdlib", "zf2" ], - "time": "2015-04-01 18:09:29" + "time": "2015-03-25 20:55:48" }, { "name": "zendframework/zend-text", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendText.git", - "reference": "35f519e20e575a331c2ee554e5a555a59ce4b9e2" + "url": "https://github.com/zendframework/zend-text.git", + "reference": "d962ea25647b20527f3ca34ae225bbc885dabfc7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendText/zipball/35f519e20e575a331c2ee554e5a555a59ce4b9e2", - "reference": "35f519e20e575a331c2ee554e5a555a59ce4b9e2", + "url": "https://api.github.com/repos/zendframework/zend-text/zipball/d962ea25647b20527f3ca34ae225bbc885dabfc7", + "reference": "d962ea25647b20527f3ca34ae225bbc885dabfc7", "shasum": "" }, "require": { @@ -1824,6 +1904,11 @@ "zendframework/zend-servicemanager": "self.version", "zendframework/zend-stdlib": "self.version" }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master" + }, "type": "library", "extra": { "branch-alias": { @@ -1833,32 +1918,32 @@ }, "autoload": { "psr-4": { - "Zend\\Text\\": "" + "Zend\\Text\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-text", "keywords": [ "text", "zf2" ], - "time": "2015-04-01 18:09:29" + "time": "2015-03-25 20:55:48" }, { "name": "zendframework/zend-uri", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendUri.git", - "reference": "53f5b162b293f80de8b951eece8e08be83c4fe16" + "url": "https://github.com/zendframework/zend-uri.git", + "reference": "bd9e625639415376f6a82551c73328448d7bc7d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendUri/zipball/53f5b162b293f80de8b951eece8e08be83c4fe16", - "reference": "53f5b162b293f80de8b951eece8e08be83c4fe16", + "url": "https://api.github.com/repos/zendframework/zend-uri/zipball/bd9e625639415376f6a82551c73328448d7bc7d1", + "reference": "bd9e625639415376f6a82551c73328448d7bc7d1", "shasum": "" }, "require": { @@ -1866,6 +1951,11 @@ "zendframework/zend-escaper": "self.version", "zendframework/zend-validator": "self.version" }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master" + }, "type": "library", "extra": { "branch-alias": { @@ -1875,7 +1965,7 @@ }, "autoload": { "psr-4": { - "Zend\\Uri\\": "" + "Zend\\Uri\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1883,25 +1973,25 @@ "BSD-3-Clause" ], "description": "a component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)", - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-uri", "keywords": [ "uri", "zf2" ], - "time": "2015-04-01 18:09:29" + "time": "2015-03-25 20:55:48" }, { "name": "zendframework/zend-validator", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendValidator.git", - "reference": "eb678d20256f120a72ca27276bbb2875841701ab" + "url": "https://github.com/zendframework/zend-validator.git", + "reference": "45fac2545a0f2eb66d71cb7966feee481e7c475f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendValidator/zipball/eb678d20256f120a72ca27276bbb2875841701ab", - "reference": "eb678d20256f120a72ca27276bbb2875841701ab", + "url": "https://api.github.com/repos/zendframework/zend-validator/zipball/45fac2545a0f2eb66d71cb7966feee481e7c475f", + "reference": "45fac2545a0f2eb66d71cb7966feee481e7c475f", "shasum": "" }, "require": { @@ -1909,6 +1999,9 @@ "zendframework/zend-stdlib": "self.version" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-db": "self.version", "zendframework/zend-filter": "self.version", "zendframework/zend-i18n": "self.version", @@ -1936,7 +2029,7 @@ }, "autoload": { "psr-4": { - "Zend\\Validator\\": "" + "Zend\\Validator\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1944,25 +2037,25 @@ "BSD-3-Clause" ], "description": "provides a set of commonly needed validators", - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-validator", "keywords": [ "validator", "zf2" ], - "time": "2015-04-01 18:09:30" + "time": "2015-03-25 20:55:48" }, { "name": "zendframework/zend-view", "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendView.git", - "reference": "e119b4b5f082af58a96eb206e782b62c193227bf" + "url": "https://github.com/zendframework/zend-view.git", + "reference": "37beb1ad46e530f627b4b6c3716efd728e976ba9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendView/zipball/e119b4b5f082af58a96eb206e782b62c193227bf", - "reference": "e119b4b5f082af58a96eb206e782b62c193227bf", + "url": "https://api.github.com/repos/zendframework/zend-view/zipball/37beb1ad46e530f627b4b6c3716efd728e976ba9", + "reference": "37beb1ad46e530f627b4b6c3716efd728e976ba9", "shasum": "" }, "require": { @@ -1972,6 +2065,9 @@ "zendframework/zend-stdlib": "self.version" }, "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", "zendframework/zend-authentication": "self.version", "zendframework/zend-escaper": "self.version", "zendframework/zend-feed": "self.version", @@ -2010,7 +2106,7 @@ }, "autoload": { "psr-4": { - "Zend\\View\\": "" + "Zend\\View\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2018,12 +2114,12 @@ "BSD-3-Clause" ], "description": "provides a system of helpers, output filters, and variable escaping", - "homepage": "https://github.com/zendframework/zf2", + "homepage": "https://github.com/zendframework/zend-view", "keywords": [ "view", "zf2" ], - "time": "2015-04-01 18:09:30" + "time": "2015-03-25 20:55:48" } ], "packages-dev": [ diff --git a/dev/tests/integration/testsuite/Magento/Centinel/Helper/DataTest.php b/dev/tests/integration/testsuite/Magento/Centinel/Helper/DataTest.php deleted file mode 100644 index 4198c84681aa2e5d53a8c22c363161d63785e281..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Centinel/Helper/DataTest.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -/** - * Test class for \Magento\Centinel\Helper\Data - */ -namespace Magento\Centinel\Helper; - -class DataTest extends \PHPUnit_Framework_TestCase -{ - public function testGetInfoBlock() - { - /** @var $block \Magento\Payment\Helper\Data */ - $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Payment\Helper\Data'); - /** @var $paymentInfo \Magento\Payment\Model\Info */ - $paymentInfo = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Payment\Model\Info' - ); - $paymentInfo->setMethod('checkmo'); - $result = $block->getInfoBlock($paymentInfo); - $this->assertInstanceOf('Magento\OfflinePayments\Block\Info\Checkmo', $result); - } -} diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Centinel/StateFactoryTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Centinel/StateFactoryTest.php deleted file mode 100644 index 60b907404a94cdebe2914668114551bdb8531217..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Centinel/StateFactoryTest.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -/** - * Verifies that the card types defined in payment xml matches the types declared in factory via DI. - * - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Test\Integrity\Magento\Centinel; - -class StateFactoryTest extends \PHPUnit_Framework_TestCase -{ - public function testFactoryTypes() - { - $factoryTypes = $this->_getFactoryTypes(); - $ccTypes = $this->_getCcTypes(); - - $definedTypes = array_intersect($factoryTypes, $ccTypes); - - $this->assertEquals( - $factoryTypes, - $definedTypes, - 'Some factory types are missing from payments config.' . "\nMissing types: " . implode( - ',', - array_diff($factoryTypes, $definedTypes) - ) - ); - } - - /** - * Get factory, find list of types it has - * - * @return array string[] factoryTypes - */ - private function _getFactoryTypes() - { - /** @var \Magento\Centinel\Model\StateFactory $stateFactory */ - $stateFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Centinel\Model\StateFactory' - ); - $reflectionObj = new \ReflectionClass($stateFactory); - $stateMapProp = $reflectionObj->getProperty('_stateClassMap'); - $stateMapProp->setAccessible(true); - $stateClassMap = $stateMapProp->getValue($stateFactory); - $factoryTypes = array_keys($stateClassMap); - return $factoryTypes; - } - - /** - * Get config, find list of types it has - * - * @return array string[] ccTypes - */ - private function _getCcTypes() - { - /** @var \Magento\Payment\Model\Config $paymentConfig */ - $paymentConfig = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Payment\Model\Config' - ); - $ccTypes = array_keys($paymentConfig->getCcTypes()); - return $ccTypes; - } -} diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php index 2a4484282e46a9c4053741d3cd7f11f9a104a8a4..1b4b3fa1b7cea3fa3b2695ebfd528320b1fc76f8 100755 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php @@ -3589,4 +3589,44 @@ return [ ['Magento\Checkout\Controller\Onepage\SaveShippingMethod'], ['Magento\Checkout\Controller\Onepage\ShippingMethod'], ['Magento\Catalog\Model\Product\Gallery\ContentValidator', 'Magento\Framework\Api\ImageContentValidator'], + ['Magento\Centinel\Block\Adminhtml\Validation\Form'], + ['Magento\Centinel\Block\Adminhtml\Validation'], + ['Magento\Centinel\Block\Authentication\Complete'], + ['Magento\Centinel\Block\Authentication\Start'], + ['Magento\Centinel\Block\Authentication'], + ['Magento\Centinel\Block\Logo'], + ['Magento\Centinel\Controller\Adminhtml\Centinel\Index\AuthenticationComplete'], + ['Magento\Centinel\Controller\Adminhtml\Centinel\Index\AuthenticationStart'], + ['Magento\Centinel\Controller\Adminhtml\Centinel\Index\ValidatePaymentData'], + ['Magento\Centinel\Controller\Adminhtml\Centinel\Index'], + ['Magento\Centinel\Controller\Index\AuthenticationComplete'], + ['Magento\Centinel\Controller\Index\AuthenticationStart'], + ['Magento\Centinel\Controller\Index'], + ['Magento\Centinel\Helper\Data'], + ['Magento\Centinel\Model\State\Jcb'], + ['Magento\Centinel\Model\State\Mastercard'], + ['Magento\Centinel\Model\State\Visa'], + ['Magento\Centinel\Model\AbstractState'], + ['Magento\Centinel\Model\Api'], + ['Magento\Centinel\Model\Config'], + ['Magento\Centinel\Model\Observer'], + ['Magento\Centinel\Model\Service'], + ['Magento\Centinel\Model\StateFactory'], + ['Magento\Multishipping\Model\Payment\Method\Specification\Is3DSecure'], + ['CentinelClient'], + ['XMLParser'], + ['Magento\Centinel\Test\Block\Adminhtml\Order\View\Tab\Info'], + ['Magento\Centinel\Test\Block\Onepage\Review'], + ['Magento\Centinel\Test\Block\Authentication'], + ['Magento\Centinel\Test\Fixture\AbstractCreditCard'], + ['Magento\Centinel\Test\Fixture\GuestAuthorizenetInvalidCc'], + ['Magento\Centinel\Test\Fixture\GuestPayPalPayflowProInvalidCc'], + ['Magento\Centinel\Test\Fixture\GuestPayPalPayflowProValidCc'], + ['Magento\Centinel\Test\Fixture\GuestPayPalPaymentsProInvalidCc'], + ['Magento\Centinel\Test\Fixture\GuestPayPalPaymentsProValidCc'], + ['Magento\Centinel\Test\Fixture\RegisteredAuthorizenetValidCc'], + ['Magento\Centinel\Test\TestCase\AbstractCentinelPaymentsTest'], + ['Magento\Centinel\Test\TestCase\CentinelPaymentsInvalidCcTest'], + ['Magento\Centinel\Test\TestCase\CentinelPaymentsValidCcTest'], + ['Magento\Centinel\CreateOrderTest'], ]; diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt index 7e57c255f7d1bda78e9f3570edbf98b578f3fce0..47b334a5237a5338b161d8fb57eb1076868fca01 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt @@ -27,8 +27,6 @@ Magento/CatalogInventory/Model/Source Magento/CatalogSearch/Model/Resource/Helper Magento/CatalogSearch/Model/Resource/Advanced Magento/CatalogSearch/Model/Resource/Search -Magento/Centinel/Controller -Magento/Centinel/Model/State Magento/Checkout/Block/Multishipping Magento/Checkout/Model/Type Magento/Catalog/Model/Template diff --git a/lib/internal/CardinalCommerce/CentinelClient.php b/lib/internal/CardinalCommerce/CentinelClient.php deleted file mode 100644 index c2f19380cbe2e4c34e2fe89ec120d068e97b351a..0000000000000000000000000000000000000000 --- a/lib/internal/CardinalCommerce/CentinelClient.php +++ /dev/null @@ -1,161 +0,0 @@ -<?php -// Distributed by license from CardinalCommerce Corporation -///////////////////////////////////////////////////////////////////////////////////////////// -// CardinalCommerce (http://www.cardinalcommerce.com) -// CentinelClient.php -// Version 1.2 02/17/2005 -// -// Usage -// The CentinelClient class is defined to assist integration efforts with the Centinel -// XML message integration. The class implements helper methods to construct, send, and -// receive XML messages with respect to the Centinel XML Message APIs. -// -///////////////////////////////////////////////////////////////////////////////////////////// - - require("XMLParser.php"); - include "CentinelErrors.php"; - - class CentinelClient { - - var $request ; - var $response ; - var $parser; - - ///////////////////////////////////////////////////////////////////////////////////////////// - // Function Add(name, value) - // - // Add name/value pairs to the Centinel request collection. - ///////////////////////////////////////////////////////////////////////////////////////////// - - - function add($name, $value) { - $this->request[$name] = $this->escapeXML($value); - } - - ///////////////////////////////////////////////////////////////////////////////////////////// - // Function getValue(name) - // - // Retrieve a specific value for the give name within the Centinel response collection. - ///////////////////////////////////////////////////////////////////////////////////////////// - - - function getValue($name) { - if (isset($this->response[$name])) { - return $this->response[$name]; - }else{ - return ""; - } - } - - - ///////////////////////////////////////////////////////////////////////////////////////////// - // Function getRequestXml(name) - // - // Serialize all elements of the request collection into a XML message, and format the required - // form payload according to the Centinel XML Message APIs. The form payload is returned from - // the function. - ///////////////////////////////////////////////////////////////////////////////////////////// - - - function getRequestXml(){ - $queryString = "<CardinalMPI>"; - foreach ($this->request as $name => $value) { - $queryString = $queryString."<".($name).">".($value)."</".($name).">" ; - } - $queryString = $queryString."</CardinalMPI>"; - return "cmpi_msg=".urlencode($queryString); - } - - ///////////////////////////////////////////////////////////////////////////////////////////// - // Function sendHttp(url, "", $timeout) - // - // HTTP POST the form payload to the url using cURL. - // form payload according to the Centinel XML Message APIs. The form payload is returned from - // the function. - ///////////////////////////////////////////////////////////////////////////////////////////// - - function sendHttp($url, $connectTimeout="", $timeout) { - - // verify that the URL uses a supported protocol. - - if( (strpos($url, "http://")=== 0) || (strpos($url, "https://")=== 0) ) { - - //Construct the payload to POST to the url. - - $data = $this->getRequestXml(); - // create a new cURL resource - - $ch = curl_init($url); - - // set URL and other appropriate options - curl_setopt($ch, CURLOPT_POST,1); - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); - curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); - curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); - - // Execute the request. - - $result = curl_exec($ch); - $succeeded = curl_errno($ch) == 0 ? true : false; - - // close cURL resource, and free up system resources - - curl_close($ch); - - // If Communication was not successful set error result, otherwise - - if(!$succeeded) { - - $result = $this->setErrorResponse(CENTINEL_ERROR_CODE_8030, CENTINEL_ERROR_CODE_8030_DESC); - - } - - // Assert that we received an expected Centinel Message in reponse. - - if (strpos($result, "<CardinalMPI>") === false) { - $result = $this->setErrorResponse(CENTINEL_ERROR_CODE_8010, CENTINEL_ERROR_CODE_8010_DESC); - } - - - } else { - $result = $this->setErrorResponse(CENTINEL_ERROR_CODE_8000, CENTINEL_ERROR_CODE_8000_DESC); - } - $parser = new XMLParser; - $parser->deserializeXml($result); - $this->response = $parser->deserializedResponse; - } - - ///////////////////////////////////////////////////////////////////////////////////////////// - // Function setErrorResponse(errorNo, errorDesc) - // - // Initialize an Error response to ensure that parsing will be handled properly. - ///////////////////////////////////////////////////////////////////////////////////////////// - - function setErrorResponse($errorNo, $errorDesc) { - - $resultText = "<CardinalMPI>"; - $resultText = $resultText."<ErrorNo>".($errorNo)."</ErrorNo>" ; - $resultText = $resultText."<ErrorDesc>".($errorDesc)."</ErrorDesc>" ; - $resultText = $resultText."</CardinalMPI>"; - - return $resultText; - } - - ///////////////////////////////////////////////////////////////////////////////////////////// - // Function escapeXML(value) - // - // Escaped string converting all '&' to '&' and all '<' to '<'. Return the escaped value. - ///////////////////////////////////////////////////////////////////////////////////////////// - - function escapeXML($elementValue){ - - $escapedValue = str_replace("&", "&", $elementValue); - $escapedValue = str_replace("<", "<", $escapedValue); - - return $escapedValue; - - } - - } diff --git a/lib/internal/CardinalCommerce/CentinelErrors.php b/lib/internal/CardinalCommerce/CentinelErrors.php deleted file mode 100644 index 2ac2eb1996262b706116844a7e4256a4b087b4ba..0000000000000000000000000000000000000000 --- a/lib/internal/CardinalCommerce/CentinelErrors.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php -// Distributed by license from CardinalCommerce Corporation -///////////////////////////////////////////////////////////////////////////////////////////// -// CardinalCommerce (http://www.cardinalcommerce.com) -// CentinelErrors.php -// Version 1.2 02/17/2005 -// -// Usage -// The Error Numbers and Descriptions are centralized and referenced by the CentinelClient.php. -// -///////////////////////////////////////////////////////////////////////////////////////////// - -defined('CENTINEL_ERROR_CODE_8000') ? : define("CENTINEL_ERROR_CODE_8000", "8000"); -defined('CENTINEL_ERROR_CODE_8000_DESC') ? - : define('CENTINEL_ERROR_CODE_8000_DESC', 'Protocol Not Recogonized, must be http:// or https://'); -defined('CENTINEL_ERROR_CODE_8010') ? : define('CENTINEL_ERROR_CODE_8010', "8010"); -defined('CENTINEL_ERROR_CODE_8010_DESC') ? - : define('CENTINEL_ERROR_CODE_8010_DESC', 'Unable to Communicate with MAPS Server'); -defined('CENTINEL_ERROR_CODE_8020') ? : define('CENTINEL_ERROR_CODE_8020', "8020"); -defined('CENTINEL_ERROR_CODE_8020_DESC') ? - : define('CENTINEL_ERROR_CODE_8020_DESC', 'Error Parsing XML Response'); -defined('CENTINEL_ERROR_CODE_8030') ? : define('CENTINEL_ERROR_CODE_8030', "8030"); -defined('CENTINEL_ERROR_CODE_8030_DESC') ? - : define('CENTINEL_ERROR_CODE_8030_DESC', 'Communication Timeout Encountered'); diff --git a/lib/internal/CardinalCommerce/XMLParser.php b/lib/internal/CardinalCommerce/XMLParser.php deleted file mode 100644 index 9de00ca880a5aa6f41080fa8c5749df9504dee63..0000000000000000000000000000000000000000 --- a/lib/internal/CardinalCommerce/XMLParser.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php -// Distributed by license from CardinalCommerce Corporation -///////////////////////////////////////////////////////////////////////////////////////////// -// CardinalCommerce (http://www.cardinalcommerce.com) -// XMLParser.php -// Version 1.2 02/17/2005 -// -// Usage -// XML Parser class to assist with the parsing of the XML messages received from the MAPS -// Server. Wraps core PHP XML functions. -// -///////////////////////////////////////////////////////////////////////////////////////////// - - class XMLParser{ - - var $xml_parser; - var $deserializedResponse; - var $elementName; - var $elementValue; - - ///////////////////////////////////////////////////////////////////////////////////////////// - // Function XMLParser() - // - // Initialize the XML parser. - ///////////////////////////////////////////////////////////////////////////////////////////// - - function XMLParser() { - $this->xml_parser = xml_parser_create(); - } - - ///////////////////////////////////////////////////////////////////////////////////////////// - // Function startElement(parser, name, attribute) - // - // Start Tag Element Handler - ///////////////////////////////////////////////////////////////////////////////////////////// - - function startElement($parser, $name, $attrs='') { - $this->elementName= $name; - - } - - ///////////////////////////////////////////////////////////////////////////////////////////// - // Function elementData(parser, data) - // - // Element Data Handler - ///////////////////////////////////////////////////////////////////////////////////////////// - - function elementData($parser, $data) { - $this->elementValue .= $data; - - } - - ///////////////////////////////////////////////////////////////////////////////////////////// - // Function endElement(name, value) - // - // End Tag Element Handler - ///////////////////////////////////////////////////////////////////////////////////////////// - - function endElement($parser, $name) { - - $this->deserializedResponse[$this->elementName]= $this->elementValue; - $this->elementName = ""; - $this->elementValue = ""; - } - - ///////////////////////////////////////////////////////////////////////////////////////////// - // Function deserialize(xmlString) - // - // Deserilize the XML reponse message and add each element to the deserializedResponse collection. - // Once complete, then each element reference will be available using the getValue function. - ///////////////////////////////////////////////////////////////////////////////////////////// - - function deserializeXml($responseString) { - - xml_set_object($this->xml_parser, $this); - xml_parser_set_option($this->xml_parser,XML_OPTION_CASE_FOLDING,FALSE); - xml_set_element_handler($this->xml_parser, "startElement", "endElement"); - xml_set_character_data_handler($this->xml_parser, "elementData"); - - if (!xml_parse($this->xml_parser, $responseString)) { - - $this->deserializedResponse["ErrorNo"]= CENTINEL_ERROR_CODE_8020; - $this->deserializedResponse["ErrorDesc"]= CENTINEL_ERROR_CODE_8020_DESC; - } - - xml_parser_free($this->xml_parser); - } - }