Version Notes
Minor bug fixes.
This plugin is only compatible to Magento's checkout type OnePage.
Download this release
Release Info
| Developer | PagBrasil |
| Extension | PagBrasil |
| Version | 2.2.1 |
| Comparing to | |
| See all releases | |
Code changes from version 2.2.0 to 2.2.1
- app/code/community/Mzcart/Pagbrasil/Model/Acc.php +2 -1
- app/design/frontend/base/default/template/pagbrasil/form.phtml +0 -39
- app/design/frontend/base/default/template/pagbrasil/info.phtml +0 -32
- app/design/frontend/base/default/template/pagbrasil/payment-ajax.phtml +0 -94
- app/design/frontend/base/default/template/pagbrasil/payment-single-col.phtml +0 -96
- app/design/frontend/base/default/template/pagbrasil/payment.phtml +72 -58
- package.xml +4 -4
app/code/community/Mzcart/Pagbrasil/Model/Acc.php
CHANGED
|
@@ -40,7 +40,8 @@ class Mzcart_Pagbrasil_Model_Acc extends Mzcart_Pagbrasil_Model_Abstract
|
|
| 40 |
'pbtoken' => Mage::getStoreConfig(Mzcart_Pagbrasil_Helper_Data::XML_PATH_PAGBRASIL_TOKEN, $_order->getStoreId()),
|
| 41 |
'cc_installments' => 0,
|
| 42 |
'url_return' => Mage::getUrl('pagbrasil/processing/return'),
|
| 43 |
-
'cc_auth' => Mage::getStoreConfig("payment/pagbrasil_acc/preauth") == '1' ? '1' : ''
|
|
|
|
| 44 |
);
|
| 45 |
$params = array_merge($params, $this->_getCommonFields());
|
| 46 |
return $params;
|
| 40 |
'pbtoken' => Mage::getStoreConfig(Mzcart_Pagbrasil_Helper_Data::XML_PATH_PAGBRASIL_TOKEN, $_order->getStoreId()),
|
| 41 |
'cc_installments' => 0,
|
| 42 |
'url_return' => Mage::getUrl('pagbrasil/processing/return'),
|
| 43 |
+
'cc_auth' => Mage::getStoreConfig("payment/pagbrasil_acc/preauth") == '1' ? '1' : '',
|
| 44 |
+
'responsive' => '1'
|
| 45 |
);
|
| 46 |
$params = array_merge($params, $this->_getCommonFields());
|
| 47 |
return $params;
|
app/design/frontend/base/default/template/pagbrasil/form.phtml
DELETED
|
@@ -1,39 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
| 11 |
-
* If you did not receive a copy of the license and are unable to
|
| 12 |
-
* obtain it through the world-wide-web, please send an email
|
| 13 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 14 |
-
*
|
| 15 |
-
* DISCLAIMER
|
| 16 |
-
*
|
| 17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
| 18 |
-
* versions in the future. If you wish to customize Magento for your
|
| 19 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
| 20 |
-
*
|
| 21 |
-
* @category design
|
| 22 |
-
* @package base_default
|
| 23 |
-
* @copyright Copyright (c) 2009 Mzcart Medien GmbH & Co. KG (http://www.phoenix-medien.de)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
?>
|
| 27 |
-
<?php $_code = $this->getMethodCode(); ?>
|
| 28 |
-
<ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none">
|
| 29 |
-
<li>
|
| 30 |
-
<?php echo Mage::helper('pagbrasil')->__('You will be redirected to our secure payment page when you place an order.') ?>
|
| 31 |
-
</li>
|
| 32 |
-
<?php if ($_img = $this->getPaymentImageSrc($_code)): ?>
|
| 33 |
-
<li>
|
| 34 |
-
<div style="padding:10px 15px 15px;">
|
| 35 |
-
<img src="<?php echo $_img ?>" alt="" /><br />
|
| 36 |
-
</div>
|
| 37 |
-
</li>
|
| 38 |
-
<?php endif; ?>
|
| 39 |
-
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/pagbrasil/info.phtml
DELETED
|
@@ -1,32 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
| 11 |
-
* If you did not receive a copy of the license and are unable to
|
| 12 |
-
* obtain it through the world-wide-web, please send an email
|
| 13 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 14 |
-
*
|
| 15 |
-
* DISCLAIMER
|
| 16 |
-
*
|
| 17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
| 18 |
-
* versions in the future. If you wish to customize Magento for your
|
| 19 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
| 20 |
-
*
|
| 21 |
-
* @category design
|
| 22 |
-
* @package base_default
|
| 23 |
-
* @copyright Copyright (c) 2009 Mzcart Medien GmbH & Co. KG (http://www.phoenix-medien.de)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
?>
|
| 27 |
-
<?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?><br />
|
| 28 |
-
<?php if ($this->getInfo()->getLastTransId() == ''): ?>
|
| 29 |
-
<em><?php echo Mage::helper('pagbrasil')->__('You will be redirected to our secure payment page when you place an order.') ?></em>
|
| 30 |
-
<?php else: ?>
|
| 31 |
-
<?php echo Mage::helper('pagbrasil')->__('PagBrasil Transaction ID: %s', $this->escapeHtml($this->getInfo()->getLastTransId())) ?><br />
|
| 32 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/pagbrasil/payment-ajax.phtml
DELETED
|
@@ -1,94 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
| 11 |
-
* If you did not receive a copy of the license and are unable to
|
| 12 |
-
* obtain it through the world-wide-web, please send an email
|
| 13 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 14 |
-
*
|
| 15 |
-
* DISCLAIMER
|
| 16 |
-
*
|
| 17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
| 18 |
-
* versions in the future. If you wish to customize Magento for your
|
| 19 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
| 20 |
-
*
|
| 21 |
-
* @category design
|
| 22 |
-
* @package base_default
|
| 23 |
-
* @copyright Copyright (c) 2009 Mzcart Medien GmbH & Co. KG (http://www.phoenix-medien.de)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
?>
|
| 27 |
-
<div class="page-head">
|
| 28 |
-
<h3><?php echo Mage::helper('pagbrasil')->__('Payment') ?></h3>
|
| 29 |
-
</div>
|
| 30 |
-
<?php
|
| 31 |
-
// var_dump($this->getPagbrasilMethod());
|
| 32 |
-
if($this->getPagbrasilMethod() == 'pagbrasil_bb') {
|
| 33 |
-
$bburl = $this->getBbUrl();
|
| 34 |
-
$srcstr = ($bburl == false) ? '' : ' src="' . $bburl .'" ';
|
| 35 |
-
// var_dump($srcstr);
|
| 36 |
-
}
|
| 37 |
-
?>
|
| 38 |
-
<table style="width:100%;">
|
| 39 |
-
<tr>
|
| 40 |
-
<td style="width:75%">
|
| 41 |
-
<?php if($this->getPagbrasilMethod() != 'pagbrasil_obt') { ?>
|
| 42 |
-
|
| 43 |
-
<iframe id="tpagbrasilframe" name="tpagbrasilframe" frameborder=0 style="width:100%; height:600px;" <?php echo $srcstr;?> ></iframe>
|
| 44 |
-
|
| 45 |
-
<?php } else { ?>
|
| 46 |
-
|
| 47 |
-
<p/>
|
| 48 |
-
<p/>
|
| 49 |
-
<p/>
|
| 50 |
-
<p><?php echo Mage::helper('pagbrasil')->__("Please select the bank to checkout");?></p>
|
| 51 |
-
<form name="pagbrasil" id="pagbrasil_place_form" target="tpagbrasilframe" action="<?php echo $this->getFormAction();?>" method="POST">
|
| 52 |
-
<?php if (is_array($this->getFormData())): ?>
|
| 53 |
-
<?php foreach ($this->getFormData() as $name => $value): ?>
|
| 54 |
-
<?php if ($name == 'payment_method') continue; ?>
|
| 55 |
-
<input type="hidden" name="<?php echo $name; ?>" value="<?php echo $value; ?>"/>
|
| 56 |
-
<?php endforeach; ?>
|
| 57 |
-
<?php endif; ?>
|
| 58 |
-
<select name="payment_method" id="payment_method" >
|
| 59 |
-
<?php foreach ($this->getObtBanks() as $k => $v): ?>
|
| 60 |
-
<option value="<?php echo $k; ?>"><?php echo $v; ?></option>
|
| 61 |
-
<?php endforeach; ?>
|
| 62 |
-
</select>
|
| 63 |
-
<br />
|
| 64 |
-
<br />
|
| 65 |
-
<input id="paymentbtn" type="submit" value="<?php echo Mage::helper('pagbrasil')->__("Proceed to bank checkout");?>" class="button" />
|
| 66 |
-
|
| 67 |
-
</form>
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
<?php } ?>
|
| 71 |
-
</td>
|
| 72 |
-
</tr>
|
| 73 |
-
</table>
|
| 74 |
-
|
| 75 |
-
<?php if ($this->getPagbrasilMethod() == 'pagbrasil_acc') { //credit card payment?>
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
<form name="pagbrasil" id="pagbrasil_place_form" target="tpagbrasilframe" action="<?php echo $this->getFormAction();?>" method="POST">
|
| 79 |
-
<?php if (is_array($this->getFormData())): ?>
|
| 80 |
-
<?php foreach ($this->getFormData() as $name => $value): ?>
|
| 81 |
-
<input type="hidden" name="<?php echo $name; ?>" value="<?php echo $value; ?>"/>
|
| 82 |
-
<?php endforeach; ?>
|
| 83 |
-
<?php endif; ?>
|
| 84 |
-
</form>
|
| 85 |
-
|
| 86 |
-
<script type="text/javascript">
|
| 87 |
-
//<![CDATA[
|
| 88 |
-
var paymentform = document.getElementById('pagbrasil_place_form');
|
| 89 |
-
window.onload = paymentform.submit();
|
| 90 |
-
//]]>
|
| 91 |
-
</script>
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/pagbrasil/payment-single-col.phtml
DELETED
|
@@ -1,96 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
| 11 |
-
* If you did not receive a copy of the license and are unable to
|
| 12 |
-
* obtain it through the world-wide-web, please send an email
|
| 13 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 14 |
-
*
|
| 15 |
-
* DISCLAIMER
|
| 16 |
-
*
|
| 17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
| 18 |
-
* versions in the future. If you wish to customize Magento for your
|
| 19 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
| 20 |
-
*
|
| 21 |
-
* @category design
|
| 22 |
-
* @package base_default
|
| 23 |
-
* @copyright Copyright (c) 2009 Mzcart Medien GmbH & Co. KG (http://www.phoenix-medien.de)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
?>
|
| 27 |
-
<div class="page-head">
|
| 28 |
-
<h3><?php echo Mage::helper('pagbrasil')->__('Payment') ?></h3>
|
| 29 |
-
</div>
|
| 30 |
-
<?php
|
| 31 |
-
// var_dump($this->getPagbrasilMethod());
|
| 32 |
-
if($this->getPagbrasilMethod() == 'pagbrasil_bb') {
|
| 33 |
-
$bburl = $this->getBbUrl();
|
| 34 |
-
$srcstr = ($bburl == false) ? '' : ' src="' . $bburl .'" ';
|
| 35 |
-
// var_dump($srcstr);
|
| 36 |
-
}
|
| 37 |
-
?>
|
| 38 |
-
|
| 39 |
-
<table style="width:100%;">
|
| 40 |
-
<tr>
|
| 41 |
-
<td>
|
| 42 |
-
|
| 43 |
-
<iframe id="tpagbrasilframe" name="tpagbrasilframe" frameborder="0" style="width:100%; height:600px;border:none" <?php echo $srcstr;?> ></iframe>
|
| 44 |
-
|
| 45 |
-
<?php if($this->getPagbrasilMethod() == 'pagbrasil_obt') { ?>
|
| 46 |
-
|
| 47 |
-
<p/>
|
| 48 |
-
<p/>
|
| 49 |
-
<p/>
|
| 50 |
-
<p><?php echo Mage::helper('pagbrasil')->__("Please select the bank to checkout");?></p>
|
| 51 |
-
<form name="pagbrasil" id="pagbrasil_place_form" target="tpagbrasilframe" action="<?php echo Mage::getUrl('pagbrasil/processing/bank') ?>" method="POST">
|
| 52 |
-
<?php if (is_array($this->getFormData())): ?>
|
| 53 |
-
<?php foreach ($this->getFormData() as $name => $value): ?>
|
| 54 |
-
<?php if ($name == 'payment_method') continue; ?>
|
| 55 |
-
<input type="hidden" name="<?php echo $name; ?>" value="<?php echo $value; ?>"/>
|
| 56 |
-
<?php endforeach; ?>
|
| 57 |
-
<?php endif; ?>
|
| 58 |
-
<select name="payment_method" id="payment_method" >
|
| 59 |
-
<?php foreach ($this->getObtBanks() as $k => $v): ?>
|
| 60 |
-
<option value="<?php echo $k; ?>"><?php echo $v; ?></option>
|
| 61 |
-
<?php endforeach; ?>
|
| 62 |
-
</select>
|
| 63 |
-
<br />
|
| 64 |
-
<br />
|
| 65 |
-
<input id="paymentbtn" type="submit" value="<?php echo Mage::helper('pagbrasil')->__("Proceed to bank checkout");?>" class="button" />
|
| 66 |
-
|
| 67 |
-
</form>
|
| 68 |
-
|
| 69 |
-
<?php } ?>
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
</td>
|
| 73 |
-
</tr>
|
| 74 |
-
</table>
|
| 75 |
-
|
| 76 |
-
<?php if ($this->getPagbrasilMethod() == 'pagbrasil_acc') { //credit card payment ?>
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
<form name="pagbrasil" id="pagbrasil_place_form" target="tpagbrasilframe" action="<?php echo $this->getFormAction();?>" method="POST">
|
| 80 |
-
<?php if (is_array($this->getFormData())): ?>
|
| 81 |
-
<?php foreach ($this->getFormData() as $name => $value): ?>
|
| 82 |
-
<input type="hidden" name="<?php echo $name; ?>" value="<?php echo $value; ?>"/>
|
| 83 |
-
<?php endforeach; ?>
|
| 84 |
-
<?php endif; ?>
|
| 85 |
-
</form>
|
| 86 |
-
|
| 87 |
-
<script type="text/javascript">
|
| 88 |
-
//<![CDATA[
|
| 89 |
-
var paymentform = document.getElementById('pagbrasil_place_form');
|
| 90 |
-
window.onload = paymentform.submit();
|
| 91 |
-
//]]>
|
| 92 |
-
</script>
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
<?php } ?>
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/pagbrasil/payment.phtml
CHANGED
|
@@ -65,49 +65,97 @@ if($this->getPagbrasilMethod() == 'pagbrasil_bb')
|
|
| 65 |
if($this->getPagbrasilMethod() == 'pagbrasil_acc')
|
| 66 |
{
|
| 67 |
?>
|
| 68 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
<img src="<?php echo $this->getSkinUrl("images/pagbrasil/loading.gif");?>" />
|
| 70 |
</iframe>
|
| 71 |
-
|
| 72 |
-
<?php
|
| 73 |
-
}
|
| 74 |
-
elseif($this->getPagbrasilMethod() == 'pagbrasil_obt')
|
| 75 |
-
{
|
| 76 |
-
?>
|
| 77 |
-
<p><?php echo Mage::helper('pagbrasil')->__("Please select the bank to checkout");?></p>
|
| 78 |
-
<form name="pagbrasil_obt" id="pagbrasil_obt" action="<?php echo Mage::getUrl('pagbrasil/processing/bank');?>" method="POST">
|
| 79 |
<?php
|
| 80 |
if(is_array($this->getFormData()))
|
| 81 |
{
|
| 82 |
foreach ($this->getFormData() as $name => $value)
|
| 83 |
{
|
| 84 |
-
if ($name == 'payment_method')
|
| 85 |
-
{
|
| 86 |
-
continue;
|
| 87 |
-
}
|
| 88 |
?>
|
| 89 |
-
<input type="hidden" name="<?php echo $name
|
| 90 |
<?php
|
| 91 |
}
|
| 92 |
?>
|
| 93 |
<?php
|
| 94 |
}
|
| 95 |
?>
|
| 96 |
-
|
| 97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
<?php
|
| 99 |
-
|
| 100 |
{
|
| 101 |
-
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
<?php
|
| 104 |
}
|
| 105 |
?>
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
</form>
|
| 112 |
<script type="text/javascript">
|
| 113 |
//<![CDATA[
|
|
@@ -121,37 +169,3 @@ if($this->getPagbrasilMethod() == 'pagbrasil_bb')
|
|
| 121 |
</tr>
|
| 122 |
</table>
|
| 123 |
|
| 124 |
-
<?php
|
| 125 |
-
if ($this->getPagbrasilMethod() == 'pagbrasil_acc') //credit card payment
|
| 126 |
-
{
|
| 127 |
-
?>
|
| 128 |
-
<form name="pagbrasil" id="pagbrasil_place_form" target="tpagbrasilframe" action="<?php echo $this->getFormAction();?>" method="POST">
|
| 129 |
-
<?php
|
| 130 |
-
if(is_array($this->getFormData()))
|
| 131 |
-
{
|
| 132 |
-
?>
|
| 133 |
-
<?php
|
| 134 |
-
foreach ($this->getFormData() as $name => $value)
|
| 135 |
-
{
|
| 136 |
-
?>
|
| 137 |
-
<input type="hidden" name="<?php echo $name; ?>" value="<?php echo $value; ?>"/>
|
| 138 |
-
<?php
|
| 139 |
-
}
|
| 140 |
-
?>
|
| 141 |
-
<?php
|
| 142 |
-
}
|
| 143 |
-
?>
|
| 144 |
-
</form>
|
| 145 |
-
|
| 146 |
-
<script type="text/javascript">
|
| 147 |
-
//<![CDATA[
|
| 148 |
-
var paymentform = document.getElementById('pagbrasil_place_form');
|
| 149 |
-
window.onload = paymentform.submit();
|
| 150 |
-
//]]>
|
| 151 |
-
</script>
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
<?php
|
| 155 |
-
}
|
| 156 |
-
?>
|
| 157 |
-
|
| 65 |
if($this->getPagbrasilMethod() == 'pagbrasil_acc')
|
| 66 |
{
|
| 67 |
?>
|
| 68 |
+
<script type="text/javascript">
|
| 69 |
+
//<![CDATA[
|
| 70 |
+
function iframeResize()
|
| 71 |
+
{
|
| 72 |
+
iframe = document.getElementById("tpagbrasilframe");
|
| 73 |
+
w = iframe.parentNode.offsetWidth;
|
| 74 |
+
|
| 75 |
+
if(w <= 200)
|
| 76 |
+
iframe.style.height = "620px";
|
| 77 |
+
else if(w <= 220)
|
| 78 |
+
iframe.style.height = "595px";
|
| 79 |
+
else if(w <= 249)
|
| 80 |
+
iframe.style.height = "550px";
|
| 81 |
+
else if(w <= 306)
|
| 82 |
+
iframe.style.height = "535px";
|
| 83 |
+
else if(w <= 367)
|
| 84 |
+
iframe.style.height = "495px";
|
| 85 |
+
else if(w <= 588)
|
| 86 |
+
iframe.style.height = "430px";
|
| 87 |
+
else
|
| 88 |
+
iframe.style.height = "280px";
|
| 89 |
+
}
|
| 90 |
+
window.onresize = function()
|
| 91 |
+
{
|
| 92 |
+
iframeResize();
|
| 93 |
+
}
|
| 94 |
+
//]]>
|
| 95 |
+
</script>
|
| 96 |
+
<iframe id="tpagbrasilframe" name="tpagbrasilframe" frameborder="0" scrolling="no" style="width:100%;border:none;background:url(''); " onload="iframeResize();" >
|
| 97 |
<img src="<?php echo $this->getSkinUrl("images/pagbrasil/loading.gif");?>" />
|
| 98 |
</iframe>
|
| 99 |
+
<form name="pagbrasil" id="pagbrasil_place_form" target="tpagbrasilframe" action="<?php echo $this->getFormAction();?>" method="POST">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
<?php
|
| 101 |
if(is_array($this->getFormData()))
|
| 102 |
{
|
| 103 |
foreach ($this->getFormData() as $name => $value)
|
| 104 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
?>
|
| 106 |
+
<input type="hidden" name="<?php echo $name; ?>" value="<?php echo $value; ?>"/>
|
| 107 |
<?php
|
| 108 |
}
|
| 109 |
?>
|
| 110 |
<?php
|
| 111 |
}
|
| 112 |
?>
|
| 113 |
+
</form>
|
| 114 |
+
|
| 115 |
+
<script type="text/javascript">
|
| 116 |
+
//<![CDATA[
|
| 117 |
+
var paymentform = document.getElementById('pagbrasil_place_form');
|
| 118 |
+
window.onload = paymentform.submit();
|
| 119 |
+
//]]>
|
| 120 |
+
</script>
|
| 121 |
+
<?php
|
| 122 |
+
}
|
| 123 |
+
elseif($this->getPagbrasilMethod() == 'pagbrasil_obt')
|
| 124 |
+
{
|
| 125 |
+
?>
|
| 126 |
+
<p><?php echo Mage::helper('pagbrasil')->__("Please select the bank to checkout");?></p>
|
| 127 |
+
<form name="pagbrasil_obt" id="pagbrasil_obt" action="<?php echo Mage::getUrl('pagbrasil/processing/bank');?>" method="POST">
|
| 128 |
<?php
|
| 129 |
+
if(is_array($this->getFormData()))
|
| 130 |
{
|
| 131 |
+
foreach ($this->getFormData() as $name => $value)
|
| 132 |
+
{
|
| 133 |
+
if ($name == 'payment_method')
|
| 134 |
+
{
|
| 135 |
+
continue;
|
| 136 |
+
}
|
| 137 |
+
?>
|
| 138 |
+
<input type="hidden" name="<?php echo $name;?>" value="<?php echo $value;?>"/>
|
| 139 |
+
<?php
|
| 140 |
+
}
|
| 141 |
+
?>
|
| 142 |
<?php
|
| 143 |
}
|
| 144 |
?>
|
| 145 |
+
<select name="payment_method" id="payment_method" class="validate-select">
|
| 146 |
+
<option value=""><?php echo Mage::helper('pagbrasil')->__("Please select your bank");?></option>
|
| 147 |
+
<?php
|
| 148 |
+
foreach ($this->getObtBanks() as $k => $v)
|
| 149 |
+
{
|
| 150 |
+
?>
|
| 151 |
+
<option value="<?php echo $k; ?>"><?php echo $v; ?></option>
|
| 152 |
+
<?php
|
| 153 |
+
}
|
| 154 |
+
?>
|
| 155 |
+
</select>
|
| 156 |
+
<br />
|
| 157 |
+
<br />
|
| 158 |
+
<input id="paymentbtn" type="submit" value="<?php echo Mage::helper('pagbrasil')->__("Proceed to bank checkout");?>" class="button" />
|
| 159 |
</form>
|
| 160 |
<script type="text/javascript">
|
| 161 |
//<