We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 49f44f57 authored by Rik ter Beek's avatar Rik ter Beek Committed by attilak

added checks if payment object exists and fix _blank links

parent 096ab11b
......@@ -107,7 +107,9 @@ class Success extends \Magento\Framework\View\Element\Template
public function getBankTransferData()
{
$result = [];
if (!empty($this->getOrder()->getPayment()->getAdditionalInformation('bankTransfer.owner'))) {
if (!empty($this->getOrder()->getPayment()) &&
!empty($this->getOrder()->getPayment()->getAdditionalInformation('bankTransfer.owner'))
) {
$result = $this->getOrder()->getPayment()->getAdditionalInformation();
}
......
......@@ -84,7 +84,9 @@ class Hpp extends AbstractInfo
public function getBankTransferData()
{
$result = [];
if(!empty($this->getInfo()->getOrder()->getPayment()->getAdditionalInformation('bankTransfer.owner'))) {
if (!empty($this->getInfo()->getOrder()->getPayment()) &&
!empty($this->getInfo()->getOrder()->getPayment()->getAdditionalInformation('bankTransfer.owner'))
) {
$result = $this->getInfo()->getOrder()->getPayment()->getAdditionalInformation();
}
......
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