We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit 3281c8ab authored by Bas Maassen's avatar Bas Maassen Committed by GitHub

Merge pull request #232 from Adyen/PW-342

PW-342 Comment History updates
parents 703b5e20 1580c22d
......@@ -211,23 +211,30 @@ class Result extends \Magento\Framework\App\Action\Action
$type, $authResult, $pspReference, $paymentMethod
);
$history = $this->_orderHistoryFactory->create()
//->setStatus($status)
->setComment($comment)
->setEntityName('order')
->setOrder($order)
;
$history->save();
// needed because then we need to save $order objects
$order->setAdyenResulturlEventCode($authResult);
switch ($authResult) {
case Notification::AUTHORISED:
$result = true;
$this->_adyenLogger->addAdyenResult('Do nothing wait for the notification');
break;
case Notification::PENDING:
// do nothing wait for the notification
$result = true;
if (strpos($paymentMethod,"bankTransfer") !== false){
$comment .= "<br /><br />Waiting for the customer to transfer the money.";
}
elseif($paymentMethod == "sepadirectdebit"){
$comment .= "<br /><br />This request will be send to the bank at the end of the day.";
}
else {
$comment .= "<br /><br />The payment result is not confirmed (yet).
<br />Once the payment is authorised, the order status will be updated accordingly.
<br />If the order is stuck on this status, the payment can be seen as unsuccessful.
<br />The order can be automatically cancelled based on the OFFER_CLOSED notification. Please contact Adyen Support to enable this.";
}
$this->_adyenLogger->addAdyenResult('Do nothing wait for the notification');
break;
case Notification::CANCELLED:
......@@ -250,6 +257,15 @@ class Result extends \Magento\Framework\App\Action\Action
break;
}
$history = $this->_orderHistoryFactory->create()
//->setStatus($status)
->setComment($comment)
->setEntityName('order')
->setOrder($order)
;
$history->save();
return $result;
}
......
......@@ -156,9 +156,10 @@ class Validate3d extends \Magento\Framework\App\Action\Action
} else {
$this->_adyenLogger->addAdyenResult("Customer was redirected to bank for 3D-secure validation.");
$order->addStatusHistoryComment(
__('Customer was redirected to bank for 3D-secure validation.')
)->save();
__('Customer was redirected to bank for 3D-secure validation. Once the shopper authenticated, the order status will be updated accordingly.
<br />Make sure that your notifications are being processed!
<br />If the order is stuck on this status, the shopper abandoned the session. The payment can be seen as unsuccessful.
<br />The order can be automatically cancelled based on the OFFER_CLOSED notification. Please contact Adyen Support to enable this.'))->save();
$this->_view->loadLayout();
$this->_view->getLayout()->initMessages();
$this->_view->renderLayout();
......
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