diff --git a/app/code/Magento/Payment/Model/Method/Adapter.php b/app/code/Magento/Payment/Model/Method/Adapter.php index eea91dca83124..e2d7229d7a747 100644 --- a/app/code/Magento/Payment/Model/Method/Adapter.php +++ b/app/code/Magento/Payment/Model/Method/Adapter.php @@ -507,12 +507,14 @@ private function executeCommand($commandCode, array $arguments = []) return null; } + $payment = null; if (isset($arguments['payment'])) { + $payment = $arguments['payment']; $arguments['payment'] = $this->paymentDataObjectFactory->create($arguments['payment']); } if ($this->commandExecutor !== null) { - return $this->commandExecutor->executeByCode($commandCode, $arguments); + return $this->commandExecutor->executeByCode($commandCode, $payment, $arguments); } if ($this->commandPool === null) {