Skip to content

Commit

Permalink
Merge pull request #444 from Adyen/develop
Browse files Browse the repository at this point in the history
Release 4.1.0
  • Loading branch information
cyattilakiss authored May 10, 2019
2 parents dc96f65 + d093080 commit e2b3882
Show file tree
Hide file tree
Showing 115 changed files with 4,095 additions and 4,739 deletions.
39 changes: 37 additions & 2 deletions Block/Checkout/Success.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ protected function _toHtml()
'boleto_pdf_url' => $this->getBoletoPdfUrl()
]
);
return parent::_toHtml();
}
return '';
return parent::_toHtml();
}

/**
Expand All @@ -105,6 +104,42 @@ public function getBoletoPdfUrl()
return null;
}

/**
* Get Banktransfer additional data
*
* @return array|string[]
*/
public function getBankTransferData()
{
$result = [];
if (!empty($this->getOrder()->getPayment()) &&
!empty($this->getOrder()->getPayment()->getAdditionalInformation('bankTransfer.owner'))
) {
$result = $this->getOrder()->getPayment()->getAdditionalInformation();
}

return $result;
}

/**
* Get multibanco additional data
*
* @return array|string[]
*/
public function getMultibancoData()
{
$result = [];
if (!empty($this->getOrder()->getPayment()) &&
!empty($this->getOrder()->getPayment()->getAdditionalInformation('comprafacil.entity'))
) {
$result = $this->getOrder()->getPayment()->getAdditionalInformation();
}

return $result;
}



/**
* @return \Magento\Sales\Model\Order
*/
Expand Down
62 changes: 0 additions & 62 deletions Block/Form/Sepa.php

This file was deleted.

41 changes: 38 additions & 3 deletions Block/Info/Hpp.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,48 @@ class Hpp extends AbstractInfo
protected $_template = 'Adyen_Payment::info/adyen_hpp.phtml';

/**
* Check if Payment method selection is configured on Adyen or Magento
* Get all Banktransfer related data
*
* @return array
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function getBankTransferData()
{
$result = [];
if (!empty($this->getInfo()->getOrder()->getPayment()) &&
!empty($this->getInfo()->getOrder()->getPayment()->getAdditionalInformation('bankTransfer.owner'))
) {
$result = $this->getInfo()->getOrder()->getPayment()->getAdditionalInformation();
}

return $result;
}

/**
* Get all multibanco related data
*
* @return array
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function getMultibancoData()
{
$result = [];
if (!empty($this->getInfo()->getOrder()->getPayment()) &&
!empty($this->getInfo()->getOrder()->getPayment()->getAdditionalInformation('comprafacil.entity'))
) {
$result = $this->getInfo()->getOrder()->getPayment()->getAdditionalInformation();
}

return $result;
}

/**
* @return mixed
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function isPaymentSelectionOnAdyen()
public function getOrder()
{
return $this->_adyenHelper->getAdyenHppConfigDataFlag('payment_selection_on_adyen');
return $this->getInfo()->getOrder();
}

/**
Expand Down
32 changes: 0 additions & 32 deletions Block/Info/Sepa.php

This file was deleted.

Loading

0 comments on commit e2b3882

Please sign in to comment.