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 |
//<![CDATA[
|
169 |
</tr>
|
170 |
</table>
|
171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>PagBrasil</name>
|
4 |
-
<version>2.2.
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
@@ -52,9 +52,9 @@ Or visit our website www.pagbrasil.com</description>
|
|
52 |

|
53 |
This plugin is only compatible to Magento's checkout type OnePage.</notes>
|
54 |
<authors><author><name>PagBrasil</name><user>PagBrasil</user><email>support@pagbrasil.com</email></author></authors>
|
55 |
-
<date>2015-
|
56 |
-
<time>
|
57 |
-
<contents><target name="magecommunity"><dir name="Mzcart"><dir name="Pagbrasil"><dir name="Block"><file name="Form.php" hash="ba94fcaafb4e285e04e05cb910ffa417"/><file name="Info.php" hash="3124b6b54fe204541371f73fe244fd9c"/><file name="Payment.php" hash="c37ce4f038ddf9d07b194ae8bd358cfa"/><file name="Redirect.php" hash="dcb5b438b357ef72247b9949e3894939"/></dir><dir name="Helper"><file name="Data.php" hash="91dc606b4f412f5fa4c21fe6bbd6258a"/></dir><dir name="Model"><file name="Abstract.php" hash="f5146720c1ed8d914748476d83d31183"/><file name="Acc.php" hash="
|
58 |
<compatible/>
|
59 |
<dependencies><required><php><min>5.2.0</min><max>5.5.0</max></php></required></dependencies>
|
60 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>PagBrasil</name>
|
4 |
+
<version>2.2.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
52 |

|
53 |
This plugin is only compatible to Magento's checkout type OnePage.</notes>
|
54 |
<authors><author><name>PagBrasil</name><user>PagBrasil</user><email>support@pagbrasil.com</email></author></authors>
|
55 |
+
<date>2015-06-08</date>
|
56 |
+
<time>18:21:44</time>
|
57 |
+
<contents><target name="magecommunity"><dir name="Mzcart"><dir name="Pagbrasil"><dir name="Block"><file name="Form.php" hash="ba94fcaafb4e285e04e05cb910ffa417"/><file name="Info.php" hash="3124b6b54fe204541371f73fe244fd9c"/><file name="Payment.php" hash="c37ce4f038ddf9d07b194ae8bd358cfa"/><file name="Redirect.php" hash="dcb5b438b357ef72247b9949e3894939"/></dir><dir name="Helper"><file name="Data.php" hash="91dc606b4f412f5fa4c21fe6bbd6258a"/></dir><dir name="Model"><file name="Abstract.php" hash="f5146720c1ed8d914748476d83d31183"/><file name="Acc.php" hash="54929843632c803c8c4672d7dbc8c15c"/><file name="Bb.php" hash="e92c6b31e3b1ef1d3ae8b6b013ada7e6"/><file name="Event.php" hash="548fb8c163d24c9628ce78c12652c187"/><file name="Obt.php" hash="98a85c14af2b0135d26978a009c846e7"/></dir><dir name="controllers"><file name="ProcessingController.php" hash="e9002a1eba32f51d044af0f8c9608e85"/></dir><dir name="etc"><file name="config.xml" hash="67632770c0cd477550ebb1c10bc9db41"/><file name="system.xml" hash="d8663ac53ddbea9fdeec6c86f90dda4a"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="pagbrasil.xml" hash="0dfc4e1e75fa4d8385e130d3fa746920"/></dir><dir name="template"><dir name="pagbrasil"><file name="payment.phtml" hash="d7b531d247a4ee238796c177d13a395c"/><file name="redirect.phtml" hash="99811d651f215827bbd85db9ade1824b"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Mzcart_Pagbrasil.csv" hash="a0eddefab5bd2dd016a3a0621c965a3a"/></dir><dir name="pt_BR"><file name="Mzcart_Pagbrasil.csv" hash="180c6f081be434452c437cdc16465c58"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="pagbrasil"><file name="Thumbs.db" hash="01a92737de4b94181521fb8e47f61c24"/><file name="loading.gif" hash="e27e38e1eac6c9e8736bf8d63044289c"/><file name="pagbrasil_acc.gif" hash="d0c923e9530e02ef737de436b8cdb347"/><file name="pagbrasil_bb.gif" hash="c918b6473bd26fc8b7f98bfe94551430"/><file name="pagbrasil_obt.gif" hash="dfe033cd9116b6bd3bf015eeff63d35b"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mzcart_Pagbrasil.xml" hash="755c1aa1443bef3423a3c68272e5a72e"/></dir></target></contents>
|
58 |
<compatible/>
|
59 |
<dependencies><required><php><min>5.2.0</min><max>5.5.0</max></php></required></dependencies>
|
60 |
</package>
|