Version Notes
bug fix:
backend orders email
Download this release
Release Info
Developer | Eupago |
Extension | Eupago_MB |
Version | 1.0.6 |
Comparing to | |
See all releases |
Code changes from version 1.0.5 to 1.0.6
app/code/community/Eupago/Multibanco/Model/PaymentAction.php
CHANGED
@@ -40,6 +40,5 @@ class Eupago_Multibanco_Model_PaymentAction
|
|
40 |
'label' => Mage::helper('multibanco')->__('Order')
|
41 |
),
|
42 |
);
|
43 |
-
echo ("passou no payment action");
|
44 |
}
|
45 |
}
|
40 |
'label' => Mage::helper('multibanco')->__('Order')
|
41 |
),
|
42 |
);
|
|
|
43 |
}
|
44 |
}
|
app/code/community/Eupago/Multibanco/Model/Process.php
CHANGED
@@ -31,33 +31,37 @@ class Eupago_Multibanco_Model_Process extends Mage_Payment_Model_Method_Abstract
|
|
31 |
$order = $observer->getEvent()->getOrder();
|
32 |
$id = $observer->getEvent()->getOrder()->getIncrementId();
|
33 |
$order_value = $observer->getEvent()->getOrder()->getGrandTotal();
|
|
|
34 |
$entity = $observer->getEvent()->getOrder()->getId();
|
35 |
$sales_flat_order_payment = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_payment');
|
36 |
$sales_flat_quote_payment = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_payment');
|
37 |
|
38 |
-
$resource = Mage::getSingleton('core/resource');
|
39 |
-
$writeConnection = $resource->getConnection('core_write');
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
61 |
}
|
62 |
return;
|
63 |
}
|
31 |
$order = $observer->getEvent()->getOrder();
|
32 |
$id = $observer->getEvent()->getOrder()->getIncrementId();
|
33 |
$order_value = $observer->getEvent()->getOrder()->getGrandTotal();
|
34 |
+
|
35 |
$entity = $observer->getEvent()->getOrder()->getId();
|
36 |
$sales_flat_order_payment = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_payment');
|
37 |
$sales_flat_quote_payment = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_payment');
|
38 |
|
39 |
+
$resource = Mage::getSingleton('core/resource');
|
40 |
+
$writeConnection = $resource->getConnection('core_write');
|
41 |
+
$quote_id = $order->getQuoteId();
|
42 |
+
|
43 |
+
$payment_method =$order->getPayment()->getMethodInstance()->getCode();
|
44 |
+
|
45 |
+
$_SESSION['admin_quote_eupago_id'] = $quote_id;
|
46 |
+
|
47 |
+
if($payment_method == "multibanco"){
|
48 |
+
if ($quote_id != "" ) {
|
49 |
+
$conn = Mage::getSingleton('core/resource')->getConnection('core_read');
|
50 |
+
$query = $conn->query("SELECT eupago_referencia FROM $sales_flat_quote_payment WHERE quote_id =$quote_id");
|
51 |
+
$referencia = $query->fetchColumn();
|
52 |
+
if ($referencia == "") {
|
53 |
+
$this->geraReferencia($chave_api, $order_value, $id, $entity, $writeConnection, $sales_flat_order_payment, $sales_flat_quote_payment, $quote_id);
|
54 |
+
} else {
|
55 |
+
$query = $conn->query("SELECT eupago_entidade FROM $sales_flat_quote_payment WHERE quote_id =$quote_id");
|
56 |
+
$entidade = $query->fetchColumn();
|
57 |
+
$query = $conn->query("SELECT eupago_montante FROM $sales_flat_quote_payment WHERE quote_id =$quote_id");
|
58 |
+
$montante = $query->fetchColumn();
|
59 |
+
$query = "UPDATE $sales_flat_order_payment SET eupago_montante = $montante, eupago_entidade = $entidade, eupago_referencia = $referencia WHERE parent_id =$entity";
|
60 |
+
$writeConnection->query($query);
|
61 |
+
$query = "UPDATE $sales_flat_quote_payment SET eupago_montante = $montante, eupago_entidade = $entidade, eupago_referencia = $referencia WHERE quote_id =$quote_id";
|
62 |
+
$writeConnection->query($query);
|
63 |
+
}
|
64 |
+
}
|
65 |
}
|
66 |
return;
|
67 |
}
|
app/design/frontend/base/default/template/multibanco/info/info.phtml
CHANGED
@@ -4,11 +4,17 @@
|
|
4 |
<td><table width="100%" border="0" cellspacing="1" cellpadding="0">
|
5 |
|
6 |
<?php
|
|
|
7 |
$referencia = "";
|
8 |
-
$
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
10 |
$conn = Mage::getSingleton('core/resource')->getConnection('core_read');
|
11 |
-
|
12 |
if ($quote_id != "") {
|
13 |
|
14 |
$sales_flat_quote_payment = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_payment');
|
4 |
<td><table width="100%" border="0" cellspacing="1" cellpadding="0">
|
5 |
|
6 |
<?php
|
7 |
+
//////////// REVER ISTO
|
8 |
$referencia = "";
|
9 |
+
if(isset($_SESSION['admin_quote_eupago_id'])){
|
10 |
+
$quote_id = $_SESSION['admin_quote_eupago_id'];
|
11 |
+
}else{
|
12 |
+
$orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
|
13 |
+
$quote_id = Mage::getSingleton('checkout/session')->getQuoteId();
|
14 |
+
}
|
15 |
+
//////////////////
|
16 |
$conn = Mage::getSingleton('core/resource')->getConnection('core_read');
|
17 |
+
|
18 |
if ($quote_id != "") {
|
19 |
|
20 |
$sales_flat_quote_payment = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_payment');
|
package.xml
CHANGED
@@ -1,20 +1,19 @@
|
|
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 |
-
|
13 |
-
- generate invoice when the order is payed</notes>
|
14 |
<authors><author><name>euPago</name><user>euPago</user><email>dev@eupago.pt</email></author></authors>
|
15 |
-
<date>2016-
|
16 |
-
<time>
|
17 |
-
<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="
|
18 |
<compatible/>
|
19 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Eupago_MB</name>
|
4 |
+
<version>1.0.6</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:
|
12 |
+
backend orders email</notes>
|
|
|
13 |
<authors><author><name>euPago</name><user>euPago</user><email>dev@eupago.pt</email></author></authors>
|
14 |
+
<date>2016-04-01</date>
|
15 |
+
<time>15:17:45</time>
|
16 |
+
<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="e7411607f6723e59ed676a4e0bb4e743"/><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="e7411607f6723e59ed676a4e0bb4e743"/><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="e7411607f6723e59ed676a4e0bb4e743"/><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="e7411607f6723e59ed676a4e0bb4e743"/><dir name="Mysgl4"><file name="Setup.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir><dir name="controllers"><file name="CallbackController.php" hash="2997ccbeeb97ac25a4abe1c93de5dbf0"/><file name="CallbackController.php" hash="2997ccbeeb97ac25a4abe1c93de5dbf0"/><file name="CallbackController.php" hash="2997ccbeeb97ac25a4abe1c93de5dbf0"/><file name="CallbackController.php" hash="2997ccbeeb97ac25a4abe1c93de5dbf0"/></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="8426f6164c184d809c25f0cd35c3f3c1"/><file name="success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/><file name="success.phtml" hash="8426f6164c184d809c25f0cd35c3f3c1"/></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="d07d4de8c50d4d5bb6ca7ea7e897a3b9"/><file name="info.phtml" hash="d07d4de8c50d4d5bb6ca7ea7e897a3b9"/><file name="info.phtml" hash="d07d4de8c50d4d5bb6ca7ea7e897a3b9"/></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>
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
19 |
</package>
|