Skip to content

Commit

Permalink
Merge pull request #31 from Affirm/magento_2.3
Browse files Browse the repository at this point in the history
Magento 2.3
  • Loading branch information
AmyBeall authored Jul 1, 2019
2 parents 3320413 + 7caa64f commit dc3e1fd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
23 changes: 22 additions & 1 deletion Controller/Payment/Confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,17 @@
use Magento\Checkout\Model\Session;
use Astound\Affirm\Model\Checkout;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\App\CsrfAwareActionInterface;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\App\Request\InvalidRequestException;


/**
* Class Confirm
*
* @package Astound\Affirm\Controller\Payment
*/
class Confirm extends Action
class Confirm extends Action implements CsrfAwareActionInterface
{
/**
* Checkout session
Expand Down Expand Up @@ -99,6 +103,23 @@ public function __construct(
$this->quote = $checkoutSession->getQuote();
parent::__construct($context);
}

/**
* @inheritDoc
*/
public function createCsrfValidationException(
RequestInterface $request
): ?InvalidRequestException {
return null;
}

/**
* @inheritDoc
*/
public function validateForCsrf(RequestInterface $request): ?bool
{
return true;
}

/**
* Dispatch request
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "affirm/magento2",
"description": "Affirm's extension for the Magento 2 https://www.affirm.com/",
"type": "magento2-module",
"version": "2.1.4",
"version": "2.1.6",
"license": [
"BSD-3-Clause"
],
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Astound_Affirm" setup_version="2.1.4">
<module name="Astound_Affirm" setup_version="2.1.6">
<sequence>
<module name="Magento_Checkout"/>
<module name="Magento_Sales"/>
Expand Down

0 comments on commit dc3e1fd

Please sign in to comment.