diff --git a/Block/Info.php b/Block/Info.php index 0350169..ebab43c 100644 --- a/Block/Info.php +++ b/Block/Info.php @@ -3,25 +3,6 @@ // 2016-05-23 /** @final Unable to use the PHP «final» keyword here because of the M2 code generation. */ class Info extends \Df\Payment\Block\Info { - /** - * 2016-05-23 - * @return string - */ - final function cardNumber() {return dfc($this, function() {return implode( - '********', $this->iia(self::CARD_F6, self::CARD_L2) - );});} - - /** - * 2016-05-23 - * @override - * @see \Magento\Framework\View\Element\Template::getTemplate() - * @see \Magento\Payment\Block\Info::$_template - * @return string - */ - final function getTemplate() {return - 'frontend' === $this->getArea() ? 'Dfe_TwoCheckout::info.phtml' : parent::getTemplate() - ;} - /** * 2016-05-21 * @override @@ -33,38 +14,29 @@ final protected function prepare() { "https://{$this->isTest('sandbox.2checkout.com/sandbox', 'www.2checkout.com/va')}/" ,"sales/detail?sale_id={$this->iia(self::SALE_ID)}" )); - $this->si('Card Number', $this->cardNumber()); + $this->si('Card Number', implode('········', $this->iia(self::CARD_F6, self::CARD_L2))); } /** * 2016-07-13 * @override * @see \Df\Payment\Block\Info::testModeLabel() - * @used-by \Df\Payment\Block\Info::markTestMode() + * @used-by \Df\Payment\Block\Info::_prepareSpecificInformation() * @return string */ final protected function testModeLabel() {return 'Sandbox';} - /** - * 2016-07-29 - * @override - * @see \Df\Payment\Block\Info::testModeLabelLong() - * @used-by \Df\Payment\Block\Info::title() - * @return string - */ - final protected function testModeLabelLong() {return 'Sandbox Mode';} - /** * 2016-05-21 + * @used-by prepare() * @used-by \Dfe\TwoCheckout\Method::charge() - * @used-by \Dfe\TwoCheckout\Block\Info::_prepareSpecificInformation() */ const CARD_F6 = 'first_six_digits'; /** * 2016-05-21 + * @used-by prepare() * @used-by \Dfe\TwoCheckout\Method::charge() - * @used-by \Dfe\TwoCheckout\Block\Info::_prepareSpecificInformation() */ const CARD_L2 = 'last_two_digits'; diff --git a/composer.json b/composer.json index 3553e0e..fb8dde0 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mage2pro/2checkout" - ,"version": "1.4.13" + ,"version": "1.4.14" ,"description": "The «2Checkout» payment extension for Magento 2." ,"type": "magento2-module" ,"homepage": "https://mage2.pro/c/extensions/2checkout" @@ -11,7 +11,7 @@ "homepage": "https://mage2.pro/users/dmitry_fedyuk", "role": "Developer" }] - ,"require": {"mage2pro/core": ">=2.9.10", "2checkout/2checkout-php": "*"} + ,"require": {"mage2pro/core": ">=2.9.23", "2checkout/2checkout-php": "*"} ,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\TwoCheckout\\": ""}} ,"keywords": [ "2Checkout" diff --git a/view/frontend/templates/info.phtml b/view/frontend/templates/info.phtml deleted file mode 100644 index 6630ae5..0000000 --- a/view/frontend/templates/info.phtml +++ /dev/null @@ -1,6 +0,0 @@ - -
-
title(); ?>
-
cardNumber(); ?>
-
-getChildHtml()?>