Version Notes
Versão estável.
Os bugs devem ser reportador na área de Issues no github do projeto em https://github.com/r-martins/PagSeguro-Magento-Transparente
Download this release
Release Info
Developer | Ricardo Martins |
Extension | RicardoMartins_PagSeguro |
Version | 2.0.3 |
Comparing to | |
See all releases |
Code changes from version 2.0.2 to 2.0.3
- app/code/community/RicardoMartins/PagSeguro/Helper/Data.php +1 -1
- app/code/community/RicardoMartins/PagSeguro/Model/Abstract.php +4 -3
- app/code/community/RicardoMartins/PagSeguro/controllers/NotificationController.php +4 -0
- app/code/community/RicardoMartins/PagSeguro/etc/config.xml +1 -1
- package.xml +4 -4
app/code/community/RicardoMartins/PagSeguro/Helper/Data.php
CHANGED
@@ -83,7 +83,7 @@ class RicardoMartins_PagSeguro_Helper_Data extends Mage_Core_Helper_Abstract
|
|
83 |
}
|
84 |
}
|
85 |
|
86 |
-
if($this->getLicenseType()=='app'
|
87 |
return Mage::getStoreConfig(self::XML_PATH_PAYMENT_PAGSEGURO_WS_URL_APP) . $amend;
|
88 |
}
|
89 |
|
83 |
}
|
84 |
}
|
85 |
|
86 |
+
if($this->getLicenseType()=='app' && $useapp){
|
87 |
return Mage::getStoreConfig(self::XML_PATH_PAYMENT_PAGSEGURO_WS_URL_APP) . $amend;
|
88 |
}
|
89 |
|
app/code/community/RicardoMartins/PagSeguro/Model/Abstract.php
CHANGED
@@ -93,7 +93,7 @@ class RicardoMartins_PagSeguro_Model_Abstract extends Mage_Payment_Model_Method_
|
|
93 |
public function getNotificationStatus($notificationCode)
|
94 |
{
|
95 |
$helper = Mage::helper('ricardomartins_pagseguro');
|
96 |
-
$url = $helper->getWsUrl('transactions/notifications/' . $notificationCode);
|
97 |
$client = new Zend_Http_Client($url);
|
98 |
$client->setParameterGet(array(
|
99 |
'token'=>$helper->getToken(),
|
@@ -187,11 +187,12 @@ class RicardoMartins_PagSeguro_Model_Abstract extends Mage_Payment_Model_Method_
|
|
187 |
$helper->writeLog('Parametros sendo enviados para API (/transactions): '. var_export($params,true));
|
188 |
|
189 |
$ch = curl_init();
|
190 |
-
curl_setopt($ch,CURLOPT_URL, $helper->getWsUrl('transactions'));
|
191 |
curl_setopt($ch,CURLOPT_POST, count($params));
|
192 |
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
|
193 |
curl_setopt($ch,CURLOPT_POSTFIELDS, $params_string);
|
194 |
-
|
|
|
195 |
try{
|
196 |
$response = curl_exec($ch);
|
197 |
curl_close($ch);
|
93 |
public function getNotificationStatus($notificationCode)
|
94 |
{
|
95 |
$helper = Mage::helper('ricardomartins_pagseguro');
|
96 |
+
$url = $helper->getWsUrl('transactions/notifications/' . $notificationCode, false);
|
97 |
$client = new Zend_Http_Client($url);
|
98 |
$client->setParameterGet(array(
|
99 |
'token'=>$helper->getToken(),
|
187 |
$helper->writeLog('Parametros sendo enviados para API (/transactions): '. var_export($params,true));
|
188 |
|
189 |
$ch = curl_init();
|
190 |
+
curl_setopt($ch,CURLOPT_URL, $helper->getWsUrl('transactions', $useapp));
|
191 |
curl_setopt($ch,CURLOPT_POST, count($params));
|
192 |
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
|
193 |
curl_setopt($ch,CURLOPT_POSTFIELDS, $params_string);
|
194 |
+
curl_setopt($ch,CURLOPT_TIMEOUT, 45);
|
195 |
+
|
196 |
try{
|
197 |
$response = curl_exec($ch);
|
198 |
curl_close($ch);
|
app/code/community/RicardoMartins/PagSeguro/controllers/NotificationController.php
CHANGED
@@ -7,6 +7,10 @@ class RicardoMartins_PagSeguro_NotificationController extends Mage_Core_Controll
|
|
7 |
*/
|
8 |
public function indexAction()
|
9 |
{
|
|
|
|
|
|
|
|
|
10 |
/** @var RicardoMartins_PagSeguro_Model_Abstract $model */
|
11 |
Mage::helper('ricardomartins_pagseguro')->writeLog('Notificação recebida do pagseguro com os parametros:'. var_export($this->getRequest()->getParams(),true));
|
12 |
$model = Mage::getModel('ricardomartins_pagseguro/abstract');
|
7 |
*/
|
8 |
public function indexAction()
|
9 |
{
|
10 |
+
$helper = Mage::helper('ricardomartins_pagseguro');
|
11 |
+
if($helper->isSandbox()){
|
12 |
+
$this->getResponse()->setHeader('access-control-allow-origin','https://sandbox.pagseguro.uol.com.br');
|
13 |
+
}
|
14 |
/** @var RicardoMartins_PagSeguro_Model_Abstract $model */
|
15 |
Mage::helper('ricardomartins_pagseguro')->writeLog('Notificação recebida do pagseguro com os parametros:'. var_export($this->getRequest()->getParams(),true));
|
16 |
$model = Mage::getModel('ricardomartins_pagseguro/abstract');
|
app/code/community/RicardoMartins/PagSeguro/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<RicardoMartins_PagSeguro>
|
5 |
-
<version>2.0.
|
6 |
</RicardoMartins_PagSeguro>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<RicardoMartins_PagSeguro>
|
5 |
+
<version>2.0.3</version>
|
6 |
</RicardoMartins_PagSeguro>
|
7 |
</modules>
|
8 |
<global>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>RicardoMartins_PagSeguro</name>
|
4 |
-
<version>2.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>MIT</license>
|
7 |
<channel>community</channel>
|
@@ -13,9 +13,9 @@ Os dados do cartão são enviados para o site do pagseguro de forma segu
|
|
13 |

|
14 |
Os bugs devem ser reportador na área de Issues no github do projeto em https://github.com/r-martins/PagSeguro-Magento-Transparente</notes>
|
15 |
<authors><author><name>Ricardo Martins</name><user>MAG001517858</user><email>ricardo@ricardomartins.info</email></author></authors>
|
16 |
-
<date>2015-
|
17 |
-
<time>
|
18 |
-
<contents><target name="magecommunity"><dir name="RicardoMartins"><dir name="PagSeguro"><dir name="Block"><dir name="Form"><dir name="Cc"><file name="Dob.php" hash="ed45c9f5576c289897eb5c86a46c6d85"/></dir><file name="Cc.php" hash="3ec300291bfb59a545bfb99a23f2d670"/><file name="Directpayment.php" hash="937273e541d362f353b2bde87c041631"/><dir name="Info"><file name="Cc.php" hash="ef4952bfb9d12dae0b6ce13afeb0d1bb"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="
|
19 |
<compatible/>
|
20 |
<dependencies><required><php><min>5.2.1</min><max>5.6.16</max></php></required></dependencies>
|
21 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>RicardoMartins_PagSeguro</name>
|
4 |
+
<version>2.0.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>MIT</license>
|
7 |
<channel>community</channel>
|
13 |

|
14 |
Os bugs devem ser reportador na área de Issues no github do projeto em https://github.com/r-martins/PagSeguro-Magento-Transparente</notes>
|
15 |
<authors><author><name>Ricardo Martins</name><user>MAG001517858</user><email>ricardo@ricardomartins.info</email></author></authors>
|
16 |
+
<date>2015-03-01</date>
|
17 |
+
<time>16:18:18</time>
|
18 |
+
<contents><target name="magecommunity"><dir name="RicardoMartins"><dir name="PagSeguro"><dir name="Block"><dir name="Form"><dir name="Cc"><file name="Dob.php" hash="ed45c9f5576c289897eb5c86a46c6d85"/></dir><file name="Cc.php" hash="3ec300291bfb59a545bfb99a23f2d670"/><file name="Directpayment.php" hash="937273e541d362f353b2bde87c041631"/><dir name="Info"><file name="Cc.php" hash="ef4952bfb9d12dae0b6ce13afeb0d1bb"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="86aaa614abfce783a8316bc5bc12dd65"/><file name="Internal.php" hash="fbf64a95060a3d2f47ef44bde57a5c70"/><file name="Params.php" hash="08810ebf498d274f0eadf07fc9ca6a24"/></dir><dir name="Model"><file name="Abstract.php" hash="ff297c28947c929bb44f98e63c474d76"/><file name="Observer.php" hash="e709c92bc86416ffdcfe2fda5b8a4d37"/><dir name="Payment"><file name="Cc.php" hash="e90824569c405dd113afbc45ee9b6f17"/></dir><dir name="Source"><dir name="Customer"><dir name="Address"><dir name="Attributes"><file name="Optional.php" hash="f25cdc6fe64c4e815cc9550e1d8f0977"/></dir><file name="Attributes.php" hash="01b0c102f051ec79fcf09feef3c79a63"/></dir><file name="Attributes.php" hash="4632cc4e9a67ef1d2633058def2c2e03"/><file name="Cpf.php" hash="fae15336acbf15a9bf43f7ae5e3fc9f2"/><file name="Dob.php" hash="ec1b44beafb11cd5dc30b8fe1aea2a74"/></dir><file name="Paymentmethods.php" hash="5ea1877c9f73a6dec6bc91900309a5a5"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Customer"><file name="Groups.php" hash="9649812c9f20e055ed1cb9fd92fbe656"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="f4678d73ebdfa7419870d74ca7f651f7"/><file name="NotificationController.php" hash="ec75706a308d334fad9232d0a193833f"/><file name="TestController.php" hash="dc8831ab4de2bd10d62a3ff9b6397add"/></dir><dir name="etc"><file name="config.xml" hash="f41208109b6868907170fc01f58d32f7"/><file name="system.xml" hash="1241d9220e774cb9a76beb3d7052bab6"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="RicardoMartins_PagSeguro.xml" hash="82d8294eccac1fb4047f27566b0c9f2a"/></dir></target><target name="magelocale"><dir name="pt_BR"><file name="RicardoMartins_PagSeguro.csv" hash="84a6cc4fb73769ac822c9e8e22b8cec8"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="pagseguro"><dir><dir name="selo"><file name="selo01_160x90.gif" hash="e6729bb969abb20588f134f7d29ea0ec"/><file name="selo01_200x60.gif" hash="e91ed131018bae7d9abc2cc1a72f539b"/><file name="selo01_300x60.gif" hash="13b07e35250b30a61c86c98815e3310c"/><file name="selo02_160x90.gif" hash="4e65530d2c42bae4e5fab617a4d0afdf"/><file name="selo02_200x60.gif" hash="ba629a85cef8982423c7679a4875283c"/><file name="selo02_300x60.gif" hash="5827aca40455f22caffee1392917f16c"/><file name="selo03_160x90.gif" hash="e3c69ace0991d7841728c6203fc305bf"/><file name="selo03_200x60.gif" hash="63135b65df64a70629748d66f5c0c453"/><file name="selo03_300x60.gif" hash="e88f1529f2d27d4732cd7c374752618e"/><file name="selo04_160x90.gif" hash="8e71cb1942c15427ba96ac21aacdb9d6"/><file name="selo04_200x60.gif" hash="f08b80b40541e35491a8d966cb420c78"/><file name="selo04_300x60.gif" hash="43f9fc4ad730111654777c26059e9fbf"/></dir></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="ricardomartins_pagseguro"><dir><dir name="form"><dir name="cc"><file name="dob.phtml" hash="0ea9d4ff767a43d1393ddf1e2882a5da"/></dir><file name="cc.phtml" hash="fef544ca8afd619526b9ea2a9d19e7e5"/><file name="directpayment.phtml" hash="f270246e0c95fedbb86b3337e2f033eb"/><dir name="info"><file name="cc.phtml" hash="0a3aa78e0775cd51bb7a168b813dd466"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="template"><dir name="ricardomartins_pagseguro"><dir><dir name="form"><file name="directpayment.phtml" hash="d7f02da712e3bb310a6f785ebc36e3d3"/><dir name="info"><file name="cc.phtml" hash="0a3aa78e0775cd51bb7a168b813dd466"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="pagseguro"><file name="pagseguro.js" hash="7307814157df2a927163ead731232e6c"/></dir></dir></target></contents>
|
19 |
<compatible/>
|
20 |
<dependencies><required><php><min>5.2.1</min><max>5.6.16</max></php></required></dependencies>
|
21 |
</package>
|