Commit 716459b1 authored by Rik ter Beek's avatar Rik ter Beek

Fix for invoice\capture creation for HPP payment

parent b80be0e1
...@@ -90,6 +90,7 @@ class TransactionCapture implements ClientInterface ...@@ -90,6 +90,7 @@ class TransactionCapture implements ClientInterface
try { try {
$response = $service->capture($request); $response = $service->capture($request);
} catch(\Adyen\AdyenException $e) { } catch(\Adyen\AdyenException $e) {
$this->_adyenLogger->error($e); // add this for now not in the lib yet
$response = null; $response = null;
} }
......
...@@ -1013,6 +1013,15 @@ class Cron ...@@ -1013,6 +1013,15 @@ class Cron
$this->_order->setState(\Magento\Sales\Model\Order::STATE_NEW); $this->_order->setState(\Magento\Sales\Model\Order::STATE_NEW);
} }
$paymentObj = $this->_order->getPayment();
// set pspReference as transactionId
$paymentObj->setCcTransId($this->_pspReference);
$paymentObj->setLastTransId($this->_pspReference);
// set transaction
$paymentObj->setTransactionId($this->_pspReference);
//capture mode //capture mode
if (!$this->_isAutoCapture()) { if (!$this->_isAutoCapture()) {
$this->_order->addStatusHistoryComment(__('Capture Mode set to Manual')); $this->_order->addStatusHistoryComment(__('Capture Mode set to Manual'));
...@@ -1043,7 +1052,6 @@ class Cron ...@@ -1043,7 +1052,6 @@ class Cron
// validate if amount is total amount // validate if amount is total amount
$orderCurrencyCode = $this->_order->getOrderCurrencyCode(); $orderCurrencyCode = $this->_order->getOrderCurrencyCode();
$paymentObj = $this->_order->getPayment();
$amount = $this->_adyenHelper->originalAmount($this->_value, $orderCurrencyCode); $amount = $this->_adyenHelper->originalAmount($this->_value, $orderCurrencyCode);
// add to order payment // add to order payment
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment