Version Notes
- Change the api URL and set demo-key feature
Download this release
Release Info
Developer | Eupago |
Extension | Eupago_MB |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- app/code/community/Eupago/Multibanco/Block/Onepage/Success.phtml +0 -2
- app/code/community/Eupago/Multibanco/Block/Success.php +0 -1
- app/code/community/Eupago/Multibanco/Model/Process.php +12 -1
- app/code/community/Eupago/Multibanco/etc/config.xml +1 -1
- app/code/community/Eupago/Multibanco/etc/system.xml +6 -2
- app/design/frontend/base/default/template/multibanco/checkout/success.phtml +0 -2
- package.xml +5 -5
app/code/community/Eupago/Multibanco/Block/Onepage/Success.phtml
CHANGED
@@ -24,8 +24,6 @@
|
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
|
27 |
-
echo "dasdasdasas";
|
28 |
-
|
29 |
?>
|
30 |
|
31 |
<div class="page-title">
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
|
|
|
|
|
27 |
?>
|
28 |
|
29 |
<div class="page-title">
|
app/code/community/Eupago/Multibanco/Block/Success.php
CHANGED
@@ -3,7 +3,6 @@ class Eupago_Multibanco_Block_Success extends Mage_Checkout_Block_Onepage_Succes
|
|
3 |
{
|
4 |
protected function _construct()
|
5 |
{
|
6 |
-
echo "passou aki";
|
7 |
parent::_construct();
|
8 |
$this->setTemplate('multibanco/checkout/success.phtml');
|
9 |
}
|
3 |
{
|
4 |
protected function _construct()
|
5 |
{
|
|
|
6 |
parent::_construct();
|
7 |
$this->setTemplate('multibanco/checkout/success.phtml');
|
8 |
}
|
app/code/community/Eupago/Multibanco/Model/Process.php
CHANGED
@@ -43,11 +43,22 @@ class Eupago_Multibanco_Model_Process extends Mage_Payment_Model_Method_Abstract
|
|
43 |
$query = $conn->query("SELECT eupago_referencia FROM $sales_flat_quote_payment WHERE quote_id =$quote_id");
|
44 |
$referencia = $query->fetchColumn();
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
if ($referencia == "") {
|
48 |
if(class_exists('SOAPClient')){
|
49 |
$arraydados = array("chave" => $chave_api, "valor" => $order_value, "id" => $id); //cada canal tem a sua chave
|
50 |
-
$client = @new SoapClient(
|
51 |
$result = $client->gerarReferenciaMB($arraydados);
|
52 |
$query = "UPDATE $sales_flat_order_payment SET eupago_montante = $order_value, eupago_entidade = $result->entidade, eupago_referencia = $result->referencia WHERE parent_id =$entity";
|
53 |
$query = "UPDATE $sales_flat_quote_payment SET eupago_montante = $order_value, eupago_entidade = $result->entidade, eupago_referencia = $result->referencia WHERE quote_id =$quote_id";
|
43 |
$query = $conn->query("SELECT eupago_referencia FROM $sales_flat_quote_payment WHERE quote_id =$quote_id");
|
44 |
$referencia = $query->fetchColumn();
|
45 |
|
46 |
+
|
47 |
+
if($chave_api){
|
48 |
+
$demo = explode("-",$chave_api);
|
49 |
+
if($demo['0']=='demo'){
|
50 |
+
$url = 'https://replica.eupago.pt/replica.eupagov3.wsdl';
|
51 |
+
}
|
52 |
+
else {
|
53 |
+
$url ='https://seguro.eupago.pt/eupagov3.wsdl';
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
|
58 |
if ($referencia == "") {
|
59 |
if(class_exists('SOAPClient')){
|
60 |
$arraydados = array("chave" => $chave_api, "valor" => $order_value, "id" => $id); //cada canal tem a sua chave
|
61 |
+
$client = @new SoapClient($url, array('cache_wsdl' => WSDL_CACHE_NONE)); // chamada do servi�o SOAP
|
62 |
$result = $client->gerarReferenciaMB($arraydados);
|
63 |
$query = "UPDATE $sales_flat_order_payment SET eupago_montante = $order_value, eupago_entidade = $result->entidade, eupago_referencia = $result->referencia WHERE parent_id =$entity";
|
64 |
$query = "UPDATE $sales_flat_quote_payment SET eupago_montante = $order_value, eupago_entidade = $result->entidade, eupago_referencia = $result->referencia WHERE quote_id =$quote_id";
|
app/code/community/Eupago/Multibanco/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Eupago_Multibanco>
|
5 |
-
<version>1.0.
|
6 |
</Eupago_Multibanco>
|
7 |
</modules>
|
8 |
<frontend>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Eupago_Multibanco>
|
5 |
+
<version>1.0.3</version>
|
6 |
</Eupago_Multibanco>
|
7 |
</modules>
|
8 |
<frontend>
|
app/code/community/Eupago/Multibanco/etc/system.xml
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
<show_in_website>1</show_in_website>
|
13 |
<show_in_store>1</show_in_store>
|
14 |
<fields>
|
15 |
-
<active translate="label">
|
16 |
<label>Ativo</label>
|
17 |
<frontend_type>select</frontend_type>
|
18 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -20,7 +20,7 @@
|
|
20 |
<show_in_default>1</show_in_default>
|
21 |
<show_in_website>1</show_in_website>
|
22 |
<show_in_store>1</show_in_store>
|
23 |
-
</active>
|
24 |
<order_status translate="label">
|
25 |
<label>Estado da Encomenda</label>
|
26 |
<frontend_type>select</frontend_type>
|
@@ -50,6 +50,7 @@
|
|
50 |
</title>
|
51 |
<chave translate="label">
|
52 |
<label>Chave da API</label>
|
|
|
53 |
<frontend_type>text</frontend_type>
|
54 |
<sort_order>25</sort_order>
|
55 |
<show_in_default>1</show_in_default>
|
@@ -117,5 +118,8 @@
|
|
117 |
</multibanco>
|
118 |
</groups>
|
119 |
</payment>
|
|
|
|
|
|
|
120 |
</sections>
|
121 |
</config>
|
12 |
<show_in_website>1</show_in_website>
|
13 |
<show_in_store>1</show_in_store>
|
14 |
<fields>
|
15 |
+
<active translate="label">
|
16 |
<label>Ativo</label>
|
17 |
<frontend_type>select</frontend_type>
|
18 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
20 |
<show_in_default>1</show_in_default>
|
21 |
<show_in_website>1</show_in_website>
|
22 |
<show_in_store>1</show_in_store>
|
23 |
+
</active>
|
24 |
<order_status translate="label">
|
25 |
<label>Estado da Encomenda</label>
|
26 |
<frontend_type>select</frontend_type>
|
50 |
</title>
|
51 |
<chave translate="label">
|
52 |
<label>Chave da API</label>
|
53 |
+
<comment>Se ainda não tiver uma chave <![CDATA[ <a target="_blank" href="https://eupago.pt/registo?magento#registo_form">clique aqui</a> ]]></comment>
|
54 |
<frontend_type>text</frontend_type>
|
55 |
<sort_order>25</sort_order>
|
56 |
<show_in_default>1</show_in_default>
|
118 |
</multibanco>
|
119 |
</groups>
|
120 |
</payment>
|
121 |
+
<info>
|
122 |
+
<label><![CDATA[Pagamento para Países Específicos]]></label>
|
123 |
+
</info>
|
124 |
</sections>
|
125 |
</config>
|
app/design/frontend/base/default/template/multibanco/checkout/success.phtml
CHANGED
@@ -24,8 +24,6 @@
|
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
|
27 |
-
echo "dasdasdasas";
|
28 |
-
|
29 |
?>
|
30 |
|
31 |
<div class="page-title">
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
|
|
|
|
|
27 |
?>
|
28 |
|
29 |
<div class="page-title">
|
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>
|
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="
|
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.3</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>- Change the api URL and set demo-key feature</notes>
|
12 |
<authors><author><name>euPago</name><user>euPago</user><email>dev@eupago.pt</email></author></authors>
|
13 |
+
<date>2016-01-12</date>
|
14 |
+
<time>14:38:31</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="10b196f1ac33b6d0d060ab4d94467657"/><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="10b196f1ac33b6d0d060ab4d94467657"/><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="10b196f1ac33b6d0d060ab4d94467657"/><file name="GerarRef.php" hash="a7e966a5dd1e47544cd8aaea3b460238"/><file name="PaymentAction.php" hash="d37848a985083e38e966ec081aa4c02b"/><file name="Process.php" hash="10b196f1ac33b6d0d060ab4d94467657"/><dir name="Mysgl4"><file name="Setup.php" hash=""/></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="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="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>
|