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

Fix for invoice\capture creation for HPP payment

parent b80be0e1
......@@ -90,9 +90,10 @@ class TransactionCapture implements ClientInterface
try {
$response = $service->capture($request);
} catch(\Adyen\AdyenException $e) {
$this->_adyenLogger->error($e); // add this for now not in the lib yet
$response = null;
}
return $response;
}
}
\ No newline at end of file
......@@ -1013,6 +1013,15 @@ class Cron
$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
if (!$this->_isAutoCapture()) {
$this->_order->addStatusHistoryComment(__('Capture Mode set to Manual'));
......@@ -1043,7 +1052,6 @@ class Cron
// validate if amount is total amount
$orderCurrencyCode = $this->_order->getOrderCurrencyCode();
$paymentObj = $this->_order->getPayment();
$amount = $this->_adyenHelper->originalAmount($this->_value, $orderCurrencyCode);
// 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