Version Notes
- Bug fix : generate mb reference only when the method is selected.
Download this release
Release Info
Developer | Eupago |
Extension | Eupago_MB |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.4
app/code/community/Eupago/Multibanco/Model/Process.php
CHANGED
@@ -27,7 +27,8 @@ class Eupago_Multibanco_Model_Process extends Mage_Payment_Model_Method_Abstract
|
|
27 |
public function orderObserver($observer) {
|
28 |
|
29 |
$chave_api = $this->getConfigData('chave');
|
30 |
-
|
|
|
31 |
$id = $observer->getEvent()->getOrder()->getIncrementId();
|
32 |
$order_value = $observer->getEvent()->getOrder()->getGrandTotal();
|
33 |
$entity = $observer->getEvent()->getOrder()->getId();
|
@@ -38,7 +39,7 @@ class Eupago_Multibanco_Model_Process extends Mage_Payment_Model_Method_Abstract
|
|
38 |
$writeConnection = $resource->getConnection('core_write');
|
39 |
$quote_id = Mage::getSingleton('checkout/session')->getQuoteId();
|
40 |
|
41 |
-
if ($quote_id != "") {
|
42 |
$conn = Mage::getSingleton('core/resource')->getConnection('core_read');
|
43 |
$query = $conn->query("SELECT eupago_referencia FROM $sales_flat_quote_payment WHERE quote_id =$quote_id");
|
44 |
$referencia = $query->fetchColumn();
|
27 |
public function orderObserver($observer) {
|
28 |
|
29 |
$chave_api = $this->getConfigData('chave');
|
30 |
+
$order = $observer->getEvent()->getOrder();
|
31 |
+
$payment_method_code = $order->getPayment()->getMethodInstance()->getCode();
|
32 |
$id = $observer->getEvent()->getOrder()->getIncrementId();
|
33 |
$order_value = $observer->getEvent()->getOrder()->getGrandTotal();
|
34 |
$entity = $observer->getEvent()->getOrder()->getId();
|
39 |
$writeConnection = $resource->getConnection('core_write');
|
40 |
$quote_id = Mage::getSingleton('checkout/session')->getQuoteId();
|
41 |
|
42 |
+
if ($quote_id != "" && $payment_method_code == 'multibanco') {
|
43 |
$conn = Mage::getSingleton('core/resource')->getConnection('core_read');
|
44 |
$query = $conn->query("SELECT eupago_referencia FROM $sales_flat_quote_payment WHERE quote_id =$quote_id");
|
45 |
$referencia = $query->fetchColumn();
|
app/design/frontend/base/default/template/multibanco/checkout/success.phtml
CHANGED
@@ -77,47 +77,41 @@ if ($order->getPayment()->getMethod() == 'multibanco') {
|
|
77 |
$query = $conn->query("SELECT eupago_montante FROM $sales_flat_order_payment WHERE parent_id=$order->entity_id");
|
78 |
$valor = $query->fetchColumn();
|
79 |
$valor = number_format($valor,'2',',','');
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
<
|
87 |
-
<
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
</
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
</div>
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
</p>
|
121 |
|
122 |
<div class="buttons-set">
|
123 |
<button type="button" class="button" title="<?php echo $this->__('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
|
77 |
$query = $conn->query("SELECT eupago_montante FROM $sales_flat_order_payment WHERE parent_id=$order->entity_id");
|
78 |
$valor = $query->fetchColumn();
|
79 |
$valor = number_format($valor,'2',',','');
|
80 |
+
?>
|
81 |
+
<p> Para pagar esta encomenda através da Rede de Caixas Automáticas Multibanco e introduza os seguintes dados:
|
82 |
+
<div align='center'>
|
83 |
+
|
84 |
+
<table style="margin-top: 10px;border: 1px solid #000;" width="450px" cellspacing="0" align="center">
|
85 |
+
<tr>
|
86 |
+
<td colspan="2" style="height:25px;vertical-align:center; text-align:center">
|
87 |
+
<img src="https://seguro.eupago.pt/repositorio/imagens/eupagomultibanco.png" alt="euPago Multibanco" height="25" />
|
88 |
+
</td>
|
89 |
+
</tr>
|
90 |
+
<tr>
|
91 |
+
<td colspan="2" style="height:25px;vertical-align:center;background-color:#3a87ad;font-size:small;text-align:center;color:#ebebeb;">
|
92 |
+
Multibanco (Pagamento de Compras\Serviços)</td>
|
93 |
+
</tr>
|
94 |
+
<tr>
|
95 |
+
<td align="left" style="font-size:small;font-weight:bold;padding-left:15px;">Entidade:</td>
|
96 |
+
<td align="left" style="font-size:small;"><?php echo $entidade; ?></td>
|
97 |
+
</tr>
|
98 |
+
<tr>
|
99 |
+
<td align="left" style="font-size:small;font-weight:bold;padding-left:15px;">Referência:</td>
|
100 |
+
<td align="left" style="font-size:small;"><?php echo $referencia; ?> </td>
|
101 |
+
</tr>
|
102 |
+
<tr>
|
103 |
+
<td align="left" style="font-size:small;font-weight:bold;padding-left:15px;">Valor:</td>
|
104 |
+
<td align="left" style="font-size:small;"><?php echo $valor; ?> EUR </td>
|
105 |
+
</tr>
|
106 |
+
<tr>
|
107 |
+
<td colspan="2" style="height:30px;vertical-align:center;background-color:#3a87ad;font-size:small;text-align:center;color:#ebebeb;">O talão emitido pela caixa automática faz de prova de pagamento.<br/>Conserve-o.</td>
|
108 |
+
</tr>
|
109 |
+
</table>
|
110 |
+
|
111 |
+
</div>
|
112 |
+
|
113 |
+
</p>
|
114 |
+
<?}?>
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|
116 |
<div class="buttons-set">
|
117 |
<button type="button" class="button" title="<?php echo $this->__('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Eupago_MB</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Modulo de pagamento que gera referencias multibanco.</summary>
|
10 |
<description>Modulo de pagamento por Entidade e Referencia Multibanco</description>
|
11 |
-
<notes>-
|
12 |
<authors><author><name>euPago</name><user>euPago</user><email>dev@eupago.pt</email></author></authors>
|
13 |
-
<date>2016-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Eupago"><dir name="Multibanco"><dir name="Block"><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/><dir name="Onepage"><file name="Success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/><file name="Success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/><file name="Success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/></dir><file name="Success.php" hash="60fc3720de3d31488f5850e8e7c27a3e"/><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/><file name="Success.php" hash="60fc3720de3d31488f5850e8e7c27a3e"/><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/><file name="Success.php" hash="60fc3720de3d31488f5850e8e7c27a3e"/><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/></dir><dir name="Helper"><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/></dir><dir name="Model"><dir name="Convert"><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/></dir><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><dir name="Mysql4"><file name="Setup.php" hash="da156d537188951a4f6eccc0adf96f06"/><file name="Setup.php" hash="da156d537188951a4f6eccc0adf96f06"/><file name="Setup.php" hash="da156d537188951a4f6eccc0adf96f06"/></dir><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Eupago_MB</name>
|
4 |
+
<version>1.0.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Modulo de pagamento que gera referencias multibanco.</summary>
|
10 |
<description>Modulo de pagamento por Entidade e Referencia Multibanco</description>
|
11 |
+
<notes>- Bug fix : generate mb reference only when the method is selected.</notes>
|
12 |
<authors><author><name>euPago</name><user>euPago</user><email>dev@eupago.pt</email></author></authors>
|
13 |
+
<date>2016-02-23</date>
|
14 |
+
<time>11:45:55</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Eupago"><dir name="Multibanco"><dir name="Block"><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/><dir name="Onepage"><file name="Success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/><file name="Success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/><file name="Success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/></dir><file name="Success.php" hash="60fc3720de3d31488f5850e8e7c27a3e"/><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/><file name="Success.php" hash="60fc3720de3d31488f5850e8e7c27a3e"/><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/><file name="Success.php" hash="60fc3720de3d31488f5850e8e7c27a3e"/><file name="Form.php" hash="b10bbd2ac4230fb7b5b23163bba5497d"/><file name="Info.php" hash="6b2e8bc2cb50cd10921632d72d283e91"/></dir><dir name="Helper"><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/><file name="Data.php" hash="08f64400e4204040eced048d885fe3da"/></dir><dir name="Model"><dir name="Convert"><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/><file name="Order.php" hash="10fb9abcee863b4a809cd46d39fa0121"/><file name="Quote.php" hash="371acecf7ee5300f3bf9f363ca2c6e39"/></dir><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><dir name="Mysql4"><file name="Setup.php" hash="da156d537188951a4f6eccc0adf96f06"/><file name="Setup.php" hash="da156d537188951a4f6eccc0adf96f06"/><file name="Setup.php" hash="da156d537188951a4f6eccc0adf96f06"/></dir><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="851e215b16b593e143c381a507c33a8c"/><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="851e215b16b593e143c381a507c33a8c"/><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="851e215b16b593e143c381a507c33a8c"/><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="851e215b16b593e143c381a507c33a8c"/><dir name="Mysgl4"><file name="Setup.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir><dir name="controllers"><file name="CallbackController.php" hash="7fbf35d729e2446cec747a6db5cb773d"/><file name="CallbackController.php" hash="7fbf35d729e2446cec747a6db5cb773d"/><file name="CallbackController.php" hash="7fbf35d729e2446cec747a6db5cb773d"/><file name="CallbackController.php" hash="7fbf35d729e2446cec747a6db5cb773d"/></dir><dir name="etc"><file name="config.xml" hash="404d711c7bc519c720764c09a8fa39aa"/><file name="system.xml" hash="4831e23e9cde731f15fcd14015103102"/><file name="config.xml" hash="404d711c7bc519c720764c09a8fa39aa"/><file name="system.xml" hash="4831e23e9cde731f15fcd14015103102"/><file name="config.xml" hash="404d711c7bc519c720764c09a8fa39aa"/><file name="system.xml" hash="4831e23e9cde731f15fcd14015103102"/><file name="config.xml" hash="404d711c7bc519c720764c09a8fa39aa"/><file name="system.xml" hash="4831e23e9cde731f15fcd14015103102"/></dir><dir name="sql"><dir name="multibanco_setup"><file name="mysql4-install-1.0.0.php" hash="9f00ec506a0a94d8863cf14e3673d9ef"/><file name="mysql4-install-1.0.0.php" hash="9f00ec506a0a94d8863cf14e3673d9ef"/><file name="mysql4-install-1.0.0.php" hash="9f00ec506a0a94d8863cf14e3673d9ef"/><file name="mysql4-install-1.0.0.php" hash="9f00ec506a0a94d8863cf14e3673d9ef"/><file name="mysql4-install-1.0.0.php" hash="9f00ec506a0a94d8863cf14e3673d9ef"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eupago_Multibanco.xml" hash="79392e90e1f4e79aa0362ea7957930c3"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="multibanco"><dir name="form"><file name="form.phtml" hash="a9bed52032750b6d5b01d09306f63cc1"/><file name="mark.phtml" hash="59b0d4028051a96a8c54d5b33b67c8fd"/><file name="form.phtml" hash="a9bed52032750b6d5b01d09306f63cc1"/><file name="mark.phtml" hash="59b0d4028051a96a8c54d5b33b67c8fd"/><file name="form.phtml" hash="a9bed52032750b6d5b01d09306f63cc1"/><file name="mark.phtml" hash="59b0d4028051a96a8c54d5b33b67c8fd"/></dir><dir name="info"><file name="info.phtml" hash="fa6321e93aaf8d3849b6b5219a8b8987"/><dir name="pdf"><file name="info.phtml" hash="30d8927be3ac9f8ec898b21a58d1c574"/><file name="info.phtml" hash="30d8927be3ac9f8ec898b21a58d1c574"/><file name="info.phtml" hash="30d8927be3ac9f8ec898b21a58d1c574"/><file name="info.phtml" hash="30d8927be3ac9f8ec898b21a58d1c574"/></dir><file name="info.phtml" hash="fa6321e93aaf8d3849b6b5219a8b8987"/><file name="info.phtml" hash="fa6321e93aaf8d3849b6b5219a8b8987"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="multibanco"><dir name="checkout"><file name="success.phtml" hash="e7aa839cf547ab6e965acccff8a1373b"/><file name="success.phtml" hash="e7aa839cf547ab6e965acccff8a1373b"/><file name="success.phtml" hash="e7aa839cf547ab6e965acccff8a1373b"/></dir><dir name="form"><file name="form.phtml" hash="a9bed52032750b6d5b01d09306f63cc1"/><file name="mark.phtml" hash="59b0d4028051a96a8c54d5b33b67c8fd"/><file name="form.phtml" hash="a9bed52032750b6d5b01d09306f63cc1"/><file name="mark.phtml" hash="59b0d4028051a96a8c54d5b33b67c8fd"/><file name="form.phtml" hash="a9bed52032750b6d5b01d09306f63cc1"/><file name="mark.phtml" hash="59b0d4028051a96a8c54d5b33b67c8fd"/></dir><dir name="info"><file name="info.phtml" hash="e723851ebf60f894f37154dd89d7ff4e"/><file name="info.phtml" hash="e723851ebf60f894f37154dd89d7ff4e"/><file name="info.phtml" hash="e723851ebf60f894f37154dd89d7ff4e"/></dir></dir></dir><dir name="layout"><file name="multibanco.xml" hash="969c55bcef9cc469e66d53283a31c200"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="multibanco"><file name="eupagomultibanco.png" hash="0b8ff29352f558fc8e756339a337a885"/><file name="eupagomultibanco.png" hash="0b8ff29352f558fc8e756339a337a885"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="multibanco"><file name="eupagomultibanco.png" hash="0ca321915123d5a712fb2b4f6744278a"/><file name="mb_mark.gif" hash="bbfd7b49dc892a72a8a87d8d1ae3e4ee"/><file name="eupagomultibanco.png" hash="0ca321915123d5a712fb2b4f6744278a"/><file name="mb_mark.gif" hash="bbfd7b49dc892a72a8a87d8d1ae3e4ee"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|