Response.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. declare(strict_types=1);
  8. namespace Magento\Authorizenet\Controller\Directpost\Payment;
  9. use Magento\Framework\App\CsrfAwareActionInterface;
  10. use Magento\Framework\App\Request\InvalidRequestException;
  11. use Magento\Framework\App\RequestInterface;
  12. use Magento\Authorizenet\Controller\Directpost\Payment;
  13. use Magento\Framework\App\Action\HttpGetActionInterface;
  14. use Magento\Framework\App\Action\HttpPostActionInterface;
  15. /**
  16. * Class Response
  17. * @deprecated 100.3.1 Authorize.net is removing all support for this payment method
  18. */
  19. class Response extends Payment implements CsrfAwareActionInterface, HttpGetActionInterface, HttpPostActionInterface
  20. {
  21. /**
  22. * @inheritDoc
  23. */
  24. public function createCsrfValidationException(
  25. RequestInterface $request
  26. ): ?InvalidRequestException {
  27. return null;
  28. }
  29. /**
  30. * @inheritDoc
  31. */
  32. public function validateForCsrf(RequestInterface $request): ?bool
  33. {
  34. return true;
  35. }
  36. /**
  37. * Response action.
  38. *
  39. * Action for Authorize.net SIM Relay Request.
  40. *
  41. * @return \Magento\Framework\Controller\ResultInterface
  42. */
  43. public function execute()
  44. {
  45. $this->_responseAction('frontend');
  46. return $this->resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_PAGE);
  47. }
  48. }