diff --git a/Block/Info.php b/Block/Info.php new file mode 100644 index 0000000..924c8f5 --- /dev/null +++ b/Block/Info.php @@ -0,0 +1,30 @@ + mixed) + */ + protected function cardData() { + /** @var array(string => mixed) $r */ + if (!($initialSourceId = $this->tm()->res0('three_d_secure/card'))) { + $r = parent::cardData(); + } + else { + $this->s()->init(); + /** + * 2017-11-12 + * "An initial reusable source for a card which requires a 3D Secure verification": + * https://mage2.pro/t/topic/4893 + */ + $r = lSource::retrieve($initialSourceId); + } + return $r; + } +} \ No newline at end of file diff --git a/Init/Action.php b/Init/Action.php index 5dbfa4c..3baa5d4 100644 --- a/Init/Action.php +++ b/Init/Action.php @@ -2,7 +2,6 @@ namespace Dfe\Stripe\Init; use Df\Core\Exception as DFE; use Df\Payment\W\Event as Ev; -use Dfe\Stripe\Facade\Charge as fCharge; use Dfe\Stripe\Facade\Token as fToken; use Dfe\Stripe\Method as M; use Dfe\Stripe\P\_3DS as p3DS; diff --git a/Settings.php b/Settings.php index c51f5f6..09a5e9a 100644 --- a/Settings.php +++ b/Settings.php @@ -17,6 +17,7 @@ function _3ds() {return dfc($this, function() {return new _3DS($this);});} * @see \Df\Payment\Settings::init() * @used-by account() * @used-by \Df\Payment\Method::action() + * @used-by \Dfe\Stripe\Block\Info::cardData() * @used-by \Dfe\Stripe\Controller\CustomerReturn\Index::isSuccess() * @used-by \Dfe\Stripe\Init\Action::preorder() */ diff --git a/composer.json b/composer.json index be216df..60e613e 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mage2pro/stripe" - ,"version": "2.4.1" + ,"version": "2.4.2" ,"description": "Stripe integration with Magento 2" ,"type": "magento2-module" ,"homepage": "https://mage2.pro/c/stripe" @@ -11,7 +11,7 @@ "homepage": "https://mage2.pro/users/dmitry_fedyuk", "role": "Developer" }] - ,"require": {"mage2pro/core": ">=3.3.5", "mage2pro/phone": ">=1.0.11", "stripe/stripe-php": ">=5.3"} + ,"require": {"mage2pro/core": ">=3.3.6", "mage2pro/phone": ">=1.0.11", "stripe/stripe-php": ">=5.3"} ,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\Stripe\\": ""}} ,"keywords": [ "3D Secure"