Skip to content

Commit 5329390

Browse files
committed
MAGETWO-93264: Wrong order status on registered checkout within Braintree Credit Card from Storefront with Signifyd Declined Guarantee
1 parent 0557481 commit 5329390

File tree

1 file changed

+19
-1
lines changed
  • app/code/Magento/Signifyd/Controller/Webhooks

1 file changed

+19
-1
lines changed

app/code/Magento/Signifyd/Controller/Webhooks/Handler.php

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
use Magento\Framework\App\Action\Action;
99
use Magento\Framework\App\Action\Context;
10+
use Magento\Framework\App\Request\InvalidRequestException;
11+
use Magento\Framework\App\RequestInterface;
1012
use Magento\Framework\Exception\LocalizedException;
1113
use Magento\Signifyd\Api\CaseRepositoryInterface;
1214
use Magento\Signifyd\Model\CaseServices\UpdatingServiceFactory;
@@ -21,7 +23,7 @@
2123
*
2224
* @see https://www.signifyd.com/docs/api/#/reference/webhooks/
2325
*/
24-
class Handler extends Action
26+
class Handler extends Action implements \Magento\Framework\App\CsrfAwareActionInterface
2527
{
2628
/**
2729
* Event topic of test webhook request.
@@ -136,4 +138,20 @@ public function execute()
136138
$this->logger->critical($e);
137139
}
138140
}
141+
142+
/**
143+
* @inheritDoc
144+
*/
145+
public function createCsrfValidationException(RequestInterface $request): ?InvalidRequestException
146+
{
147+
return null;
148+
}
149+
150+
/**
151+
* @inheritDoc
152+
*/
153+
public function validateForCsrf(RequestInterface $request): ?bool
154+
{
155+
return true;
156+
}
139157
}

0 commit comments

Comments
 (0)