Skip to content

Commit

Permalink
Hotfix for vaulted cards.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Canning committed Jun 5, 2019
1 parent 3430bca commit b826fc9
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions Gateway/Request/CvvDataBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Exception;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\Filesystem\DriverInterface;
use Magento\Payment\Gateway\Request\BuilderInterface;
use Magento\Braintree\Gateway\Config\Config;
use Psr\Log\LoggerInterface;
Expand All @@ -16,41 +15,33 @@
class CvvDataBuilder implements BuilderInterface
{
/**
* @var RequestInterface
* @var RequestInterface $request
*/
private $request;

/**
* @var Config
* @var Config $config
*/
private $config;

/**
* @var DriverInterface
*/
private $driver;

/**
* @var LoggerInterface
* @var LoggerInterface $logger
*/
private $logger;

/**
* CvvDataBuilder constructor.
* @param RequestInterface $request
* @param Config $config
* @param DriverInterface $driver
* @param LoggerInterface $logger
*/
public function __construct(
RequestInterface $request,
Config $config,
DriverInterface $driver,
LoggerInterface $logger
) {
$this->request = $request;
$this->config = $config;
$this->driver = $driver;
$this->logger = $logger;
}

Expand All @@ -64,7 +55,7 @@ public function build(array $buildSubject): array
}

try {
$input = $this->driver->fileGetContents('php://input');
$input = file_get_contents('php://input'); // @codingStandardsIgnoreLine
if ($input) {
$input = json_decode($input, true);
if (!empty($input['paymentMethod']['additional_data']['cvv'])) {
Expand Down

0 comments on commit b826fc9

Please sign in to comment.