We will be off on April 7th (Monday) for public holiday in our country

Commit 5842e362 authored by Ángel Campos's avatar Ángel Campos Committed by GitHub

Fix boleto URL in customer order and admin (#728)

* Fix for Boleto PDF URL in customer order and admin views

* Move function to block class

* Move function to block class

* Move function to block class
parent f872e3c2
......@@ -29,4 +29,14 @@ class Boleto extends AbstractInfo
* @var string
*/
protected $_template = 'Adyen_Payment::info/adyen_boleto.phtml';
/**
* @param $data string
* @return string
*/
public function getPaymentActionData($data)
{
$paymentAction = $this->getMethod()->getInfoInstance()->getAdditionalInformation('action');
return !empty($paymentAction[$data]) ? $paymentAction[$data] : '';
}
}
......@@ -73,9 +73,9 @@ $_isDemoMode = $block->isDemoMode();
</div>
<?php endif; ?>
<?php if($_info->getAdditionalInformation('expirationDate') != ""): ?>
<?php if(!empty($block->getPaymentActionData('expiresAt'))): ?>
<div>
<?php echo __('Expiration Date: %1', $_info->getAdditionalInformation('expirationDate')) ?>
<?php echo __('Expiration Date: %1', $block->getPaymentActionData('expiresAt')) ?>
</div>
<?php endif; ?>
......@@ -85,9 +85,9 @@ $_isDemoMode = $block->isDemoMode();
</div>
<?php endif; ?>
<?php if($_info->getAdditionalInformation('url') != ""): ?>
<?php if(!empty($block->getPaymentActionData('downloadUrl'))): ?>
<div>
<a target="_blank" href="<?php echo $_info->getAdditionalInformation('url'); ?>"><?php echo __('PDF Url'); ?></a>
<a target="_blank" href="<?php echo $block->getPaymentActionData('downloadUrl'); ?>"><?php echo __('PDF Url'); ?></a>
</div>
<?php endif; ?>
......
......@@ -33,5 +33,5 @@ $_info = $this->getInfo();
<dt class="title"><?php echo $_info->getAdditionalInformation('boleto_type'); ?></dt>
<dt class="title"><?php echo $_info->getAdditionalInformation('firstname'); ?></dt>
<dt class="title"><?php echo $_info->getAdditionalInformation('lastname'); ?></dt>
<dt class="title"><a target="_blank" href="<?php echo $this->getMethod()->getInfoInstance()->getAdditionalInformation('url'); ?>"><?php echo __("Click here to download Boleto PDF."); ?></a></dt>
<dt class="title"><a target="_blank" href="<?php echo $this->getPaymentActionData('downloadUrl'); ?>"><?php echo __("Click here to download Boleto PDF."); ?></a></dt>
</dl>
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