Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request Sylius#7419 from psihius/patch-2
Payment state update for NotifyNullAction
  • Loading branch information
pjedrzejewski committed Feb 8, 2017
2 parents 49f8e4b + 9ec17f4 commit 06fbc7a
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -55,8 +55,18 @@ public function onExecute(Context $context)
*/
public function onPostExecute(Context $context)
{
if ($context->getPrevious()) {
$previousStack = $context->getPrevious();
$previousStackSize = count($previousStack);

if ($previousStackSize > 1) {
return;
}

if ($previousStackSize === 1) {
$previousActionClassName = get_class($previousStack[0]->getAction());
if (false === stripos($previousActionClassName, 'NotifyNullAction')) {
return;
}
}

/** @var Generic $request */
Expand Down

0 comments on commit 06fbc7a

Please sign in to comment.