Skip to content

Commit

Permalink
2.5.3: #59
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Jan 15, 2018
1 parent c1323c3 commit 63c8256
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion W/Event/Source.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace Dfe\Stripe\W\Event;
use Df\Payment\Init\Action as A;
use Df\Payment\W\Exception\Critical;
// 2017-11-08 «A `source.chargeable` event»: https://mage2.pro/t/4889
final class Source extends \Dfe\Stripe\W\Event {
/**
Expand All @@ -23,6 +24,7 @@ final class Source extends \Dfe\Stripe\W\Event {
* @see \Df\Payment\W\Event::checkIgnored()
* @used-by \Df\Payment\W\Action::execute()
* @return false|string
* @throws Critical
*/
function checkIgnored() {return 'card' !== $this->ro('type') ? false : 'source.chargeable [type=card]';}

Expand All @@ -34,12 +36,15 @@ function checkIgnored() {return 'card' !== $this->ro('type') ? false : 'source.c
* https://github.com/mage2pro/stripe/issues/55
* https://mage2.pro/t/5047
* Note 2. "A `source.failed` event (about a failed 3D Secure verification)" https://mage2.pro/t/5048
* 2018-01-16
* "The Stripe extension incorrectly responds to the `source.canceled` webhook notifications":
* https://github.com/mage2pro/stripe/issues/59
* @override
* @see \Df\Payment\W\Event::isSuccessful()
* @used-by \Df\Payment\W\Strategy\ConfirmPending::_handle()
* @return bool
*/
function isSuccessful() {return 'source.failed' !== $this->r('type');}
function isSuccessful() {return 'source.chargeable' === $this->r('type');}

/**
* 2017-11-10
Expand All @@ -48,6 +53,7 @@ function isSuccessful() {return 'source.failed' !== $this->r('type');}
* @used-by \Df\Payment\W\Handler::log()
* @used-by \Df\Payment\W\Strategy\ConfirmPending::_handle()
* @return string|null
* @throws Critical
*/
function statusT() {return dftr($this->ro('type'), [
// 2017-11-10 "An initial reusable source for a card": https://mage2.pro/t/4893
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/stripe"
,"version": "2.5.2"
,"version": "2.5.3"
,"description": "Stripe integration with Magento 2"
,"type": "magento2-module"
,"homepage": "https://mage2.pro/c/stripe"
Expand Down

0 comments on commit 63c8256

Please sign in to comment.