Version Notes
A new realise of method
Download this release
Release Info
Developer | Marcelo Guevara |
Extension | Tigo_Tmoney |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.1.1
- app/code/local/Tigo/Tmoney/Block/Status.php +12 -0
- app/code/local/Tigo/Tmoney/Model/Crontmoney.php +4 -4
- app/code/local/Tigo/Tmoney/Model/Paymethod.php +20 -13
- app/code/local/Tigo/Tmoney/etc/config.xml +1 -1
- app/code/local/Tigo/Tmoney/etc/system.xml +8 -1
- app/design/frontend/base/default/template/tigo/tmoney/status.phtml +1 -1
- package.xml +3 -3
app/code/local/Tigo/Tmoney/Block/Status.php
CHANGED
@@ -45,4 +45,16 @@ class Tigo_Tmoney_Block_Status extends Mage_Core_Block_Template{
|
|
45 |
protected function _getCheckout() {
|
46 |
return Mage::getSingleton('checkout/session');
|
47 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
45 |
protected function _getCheckout() {
|
46 |
return Mage::getSingleton('checkout/session');
|
47 |
}
|
48 |
+
/*
|
49 |
+
* Timer
|
50 |
+
*/
|
51 |
+
function getTimer(){
|
52 |
+
$tigomoney = Mage::getModel('tmoney/paymethod');
|
53 |
+
$timer = trim($tigomoney->getTimer());
|
54 |
+
$result = $timer;
|
55 |
+
if($timer == ''){
|
56 |
+
$result = 60;
|
57 |
+
}
|
58 |
+
return $result;
|
59 |
+
}
|
60 |
}
|
app/code/local/Tigo/Tmoney/Model/Crontmoney.php
CHANGED
@@ -39,7 +39,7 @@ class Tigo_Tmoney_Model_Crontmoney {
|
|
39 |
->addAttributeToFilter('status', array('eq' => 'pending'))
|
40 |
->addAttributeToSort('increment_id', 'desc')->load();
|
41 |
|
42 |
-
Mage::Log(' - time: '. intval($timeout_our).' - min: '.$timeout_min , null, 'tigobusiness-tigomoney-cron.log');
|
43 |
|
44 |
foreach($orders as $order){
|
45 |
$infoPayment = $order->getPayment();
|
@@ -59,10 +59,10 @@ class Tigo_Tmoney_Model_Crontmoney {
|
|
59 |
$time_order = mktime(intval($time_[0]) + intval($timeout_our), intval($time_[1]) + intval($timeout_min), $time_[2], $date_[1], $date_[0], $date_[2]);
|
60 |
|
61 |
if(trim($paymentMethod) == $module_code){
|
62 |
-
Mage::Log('Data error: '.$order->getIncrementId().' - '.$order->getStoreId() , null, 'tigobusiness-tigomoney-cron.log');
|
63 |
|
64 |
-
$data_money = $tigomoneyb_->
|
65 |
-
Mage::Log('Data ---- result ---- error: '.print_r($data_money, true) , null, 'tigobusiness-tigomoney-cron.log');
|
66 |
if(trim($data_money[0]) != 0 and trim($data_money[0]) != ''){
|
67 |
if((intval($date_[0]) == intval($current_date[0])) and (intval($date_[1]) == intval($current_date[1])) and (intval($date_[2]) == intval($current_date[2]))){
|
68 |
if($time_current >= $time_order){
|
39 |
->addAttributeToFilter('status', array('eq' => 'pending'))
|
40 |
->addAttributeToSort('increment_id', 'desc')->load();
|
41 |
|
42 |
+
//Mage::Log(' - time: '. intval($timeout_our).' - min: '.$timeout_min , null, 'tigobusiness-tigomoney-cron.log');
|
43 |
|
44 |
foreach($orders as $order){
|
45 |
$infoPayment = $order->getPayment();
|
59 |
$time_order = mktime(intval($time_[0]) + intval($timeout_our), intval($time_[1]) + intval($timeout_min), $time_[2], $date_[1], $date_[0], $date_[2]);
|
60 |
|
61 |
if(trim($paymentMethod) == $module_code){
|
62 |
+
//Mage::Log('Data error: '.$order->getIncrementId().' - '.$order->getStoreId() , null, 'tigobusiness-tigomoney-cron.log');
|
63 |
|
64 |
+
$data_money = $tigomoneyb_->verifyCron($order->getIncrementId(), $order->getStoreId());
|
65 |
+
//Mage::Log('Data ---- result ---- error: '.print_r($data_money, true) , null, 'tigobusiness-tigomoney-cron.log');
|
66 |
if(trim($data_money[0]) != 0 and trim($data_money[0]) != ''){
|
67 |
if((intval($date_[0]) == intval($current_date[0])) and (intval($date_[1]) == intval($current_date[1])) and (intval($date_[2]) == intval($current_date[2]))){
|
68 |
if($time_current >= $time_order){
|
app/code/local/Tigo/Tmoney/Model/Paymethod.php
CHANGED
@@ -69,14 +69,14 @@ class Tigo_Tmoney_Model_Paymethod extends Mage_Payment_Model_Method_Abstract{
|
|
69 |
/*Verify by cron job*/
|
70 |
public function setParamKeyTigoCron($storeID){
|
71 |
try {
|
72 |
-
$this->urlTransaction = Mage::getStoreConfig('
|
73 |
-
$this->pubKey = Mage::getStoreConfig('
|
74 |
-
$this->priKey = Mage::getStoreConfig('
|
75 |
|
76 |
-
$this->proxyusername = Mage::getStoreConfig('
|
77 |
-
$this->proxypassword = Mage::getStoreConfig('
|
78 |
-
$this->proxyhost = Mage::getStoreConfig('
|
79 |
-
$this->proxyport = Mage::getStoreConfig('
|
80 |
} catch (Exception $ex) {
|
81 |
Mage::Log('Error setParamKeyTigoCron: '.$ex->getMessage(), null, 'tigobusiness-tigomoney.log');
|
82 |
}
|
@@ -473,9 +473,9 @@ class Tigo_Tmoney_Model_Paymethod extends Mage_Payment_Model_Method_Abstract{
|
|
473 |
public function verifyCron($id, $storeID){
|
474 |
$result = '';
|
475 |
try{
|
476 |
-
Mage::Log('the status of Cronjob: '.$id.' - '. $storeID, null, '
|
477 |
$this->setParamKeyTigoCron($storeID);
|
478 |
-
Mage::Log('the status -- of Cronjob: '.Mage::getStoreConfig('
|
479 |
$pubk = $this->pubKey;// Identify key
|
480 |
$prik = $this->priKey;//Encrypt Key
|
481 |
|
@@ -487,7 +487,7 @@ class Tigo_Tmoney_Model_Paymethod extends Mage_Payment_Model_Method_Abstract{
|
|
487 |
$connect['proxyport'] = $this->proxyport;
|
488 |
$connect['urlTransaction'] = $this->urlTransaction;
|
489 |
|
490 |
-
//Mage::Log('Error data Verify: '.$pubk.' ---- '.$prik, null, '
|
491 |
|
492 |
$response = '';
|
493 |
$cleanr = '';
|
@@ -500,11 +500,11 @@ class Tigo_Tmoney_Model_Paymethod extends Mage_Payment_Model_Method_Abstract{
|
|
500 |
'key' => trim($pubk),
|
501 |
'parametros' => trim($cleanr)
|
502 |
);
|
503 |
-
//Mage::Log('Error Param Verify: '.print_r($param, true), null, '
|
504 |
$result = $this->wsAction('consultarEstado', $param, $connect);
|
505 |
-
//Mage::Log('Error result Verify: '.print_r($result, true), null, '
|
506 |
} catch (Exception $ex){
|
507 |
-
Mage::Log('Error Verify: '.$ex->getMessage(), null, '
|
508 |
}
|
509 |
return $result;
|
510 |
}
|
@@ -590,4 +590,11 @@ class Tigo_Tmoney_Model_Paymethod extends Mage_Payment_Model_Method_Abstract{
|
|
590 |
}
|
591 |
return $result;
|
592 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
593 |
}
|
69 |
/*Verify by cron job*/
|
70 |
public function setParamKeyTigoCron($storeID){
|
71 |
try {
|
72 |
+
$this->urlTransaction = Mage::getStoreConfig('payment/tmoney/submit_url', $storeID);//url to have a gateway to connect to LOGIC CORE
|
73 |
+
$this->pubKey = Mage::getStoreConfig('payment/tmoney/key_id', $storeID);//user to validate the connection
|
74 |
+
$this->priKey = Mage::getStoreConfig('payment/tmoney/key_encrypt', $storeID);//password to connect the connection
|
75 |
|
76 |
+
$this->proxyusername = Mage::getStoreConfig('payment/tmoney/proxyusername', $storeID);
|
77 |
+
$this->proxypassword = Mage::getStoreConfig('payment/tmoney/proxypassword', $storeID);
|
78 |
+
$this->proxyhost = Mage::getStoreConfig('payment/tmoney/proxyhost', $storeID);
|
79 |
+
$this->proxyport = Mage::getStoreConfig('payment/tmoney/proxyport', $storeID);
|
80 |
} catch (Exception $ex) {
|
81 |
Mage::Log('Error setParamKeyTigoCron: '.$ex->getMessage(), null, 'tigobusiness-tigomoney.log');
|
82 |
}
|
473 |
public function verifyCron($id, $storeID){
|
474 |
$result = '';
|
475 |
try{
|
476 |
+
//Mage::Log('the status of Cronjob: '.$id.' - '. $storeID, null, 'prepago-tigomoney.log');
|
477 |
$this->setParamKeyTigoCron($storeID);
|
478 |
+
//Mage::Log('the status -- of Cronjob: '.Mage::getStoreConfig('prepago_tmoney/tmoney/submit_url', $storeID), null, 'prepago-tigomoney.log');
|
479 |
$pubk = $this->pubKey;// Identify key
|
480 |
$prik = $this->priKey;//Encrypt Key
|
481 |
|
487 |
$connect['proxyport'] = $this->proxyport;
|
488 |
$connect['urlTransaction'] = $this->urlTransaction;
|
489 |
|
490 |
+
//Mage::Log('Error data Verify: '.$pubk.' ---- '.$prik, null, 'prepago-tigomoney.log');
|
491 |
|
492 |
$response = '';
|
493 |
$cleanr = '';
|
500 |
'key' => trim($pubk),
|
501 |
'parametros' => trim($cleanr)
|
502 |
);
|
503 |
+
//Mage::Log('Error Param Verify: '.print_r($param, true), null, 'prepago-tigomoney.log');
|
504 |
$result = $this->wsAction('consultarEstado', $param, $connect);
|
505 |
+
//Mage::Log('Error result Verify Cron: '.print_r($result, true), null, 'prepago-tigomoney.log');
|
506 |
} catch (Exception $ex){
|
507 |
+
Mage::Log('Error Verify: '.$ex->getMessage(), null, 'prepago-tigomoney.log');
|
508 |
}
|
509 |
return $result;
|
510 |
}
|
590 |
}
|
591 |
return $result;
|
592 |
}
|
593 |
+
|
594 |
+
/**
|
595 |
+
* Get the Timer in the Status page
|
596 |
+
*/
|
597 |
+
public function getTimer(){
|
598 |
+
return $this->getConfigData('timer');
|
599 |
+
}
|
600 |
}
|
app/code/local/Tigo/Tmoney/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Tigo_Tmoney>
|
5 |
-
<version>1.1.
|
6 |
</Tigo_Tmoney>
|
7 |
</modules>
|
8 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Tigo_Tmoney>
|
5 |
+
<version>1.1.1</version>
|
6 |
</Tigo_Tmoney>
|
7 |
</modules>
|
8 |
|
app/code/local/Tigo/Tmoney/etc/system.xml
CHANGED
@@ -102,7 +102,14 @@
|
|
102 |
<show_in_website>1</show_in_website>
|
103 |
<show_in_store>1</show_in_store>
|
104 |
</message>
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
<timeout translate="label">
|
107 |
<label>Tiempo de vida (horas)</label>
|
108 |
<frontend_type>text</frontend_type>
|
102 |
<show_in_website>1</show_in_website>
|
103 |
<show_in_store>1</show_in_store>
|
104 |
</message>
|
105 |
+
<timer>
|
106 |
+
<label>Tiempo de espera en a pagina de Estado en segundos</label>
|
107 |
+
<frontend_type>text</frontend_type>
|
108 |
+
<sort_order>12</sort_order>
|
109 |
+
<show_in_default>1</show_in_default>
|
110 |
+
<show_in_website>1</show_in_website>
|
111 |
+
<show_in_store>1</show_in_store>
|
112 |
+
</timer>
|
113 |
<timeout translate="label">
|
114 |
<label>Tiempo de vida (horas)</label>
|
115 |
<frontend_type>text</frontend_type>
|
app/design/frontend/base/default/template/tigo/tmoney/status.phtml
CHANGED
@@ -29,7 +29,7 @@
|
|
29 |
</div>
|
30 |
<script type="text/javascript">
|
31 |
var $j = jQuery.noConflict();
|
32 |
-
var contV =
|
33 |
$j(document).ready(function(){
|
34 |
var timer = setInterval(function () {
|
35 |
if(contV > 0) {
|
29 |
</div>
|
30 |
<script type="text/javascript">
|
31 |
var $j = jQuery.noConflict();
|
32 |
+
var contV = <?php echo $this->getTimer(); ?>;
|
33 |
$j(document).ready(function(){
|
34 |
var timer = setInterval(function () {
|
35 |
if(contV > 0) {
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Tigo_Tmoney</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license>GLP</license>
|
7 |
<channel>community</channel>
|
@@ -11,8 +11,8 @@
|
|
11 |
<notes>A new realise of method</notes>
|
12 |
<authors><author><name>Marcelo Guevara</name><user>guechamagu</user><email>guechamagu@yahoo.es</email></author></authors>
|
13 |
<date>2016-11-18</date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magelocal"><dir name="Tigo"><dir name="Tmoney"><dir name="Block"><file name="Back.php" hash="cdaffbf839a93aff1fa7471671166835"/><file name="Error.php" hash="6af34ad72eb449a4c6b5097189f72b47"/><file name="Form.php" hash="cd75b30291b4ac8d20e525d965b8ccec"/><file name="Info.php" hash="9e5d6e5ad0d3507203522f4e57e0a742"/><file name="Pagepaymod.php" hash="34440d6165db0457a49e501bb1446972"/><file name="Redirect.php" hash="749717f3d5118bbbc2e57437432b1deb"/><file name="Status.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.4.0</min><max>5.7.5</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Tigo_Tmoney</name>
|
4 |
+
<version>1.1.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GLP</license>
|
7 |
<channel>community</channel>
|
11 |
<notes>A new realise of method</notes>
|
12 |
<authors><author><name>Marcelo Guevara</name><user>guechamagu</user><email>guechamagu@yahoo.es</email></author></authors>
|
13 |
<date>2016-11-18</date>
|
14 |
+
<time>22:01:39</time>
|
15 |
+
<contents><target name="magelocal"><dir name="Tigo"><dir name="Tmoney"><dir name="Block"><file name="Back.php" hash="cdaffbf839a93aff1fa7471671166835"/><file name="Error.php" hash="6af34ad72eb449a4c6b5097189f72b47"/><file name="Form.php" hash="cd75b30291b4ac8d20e525d965b8ccec"/><file name="Info.php" hash="9e5d6e5ad0d3507203522f4e57e0a742"/><file name="Pagepaymod.php" hash="34440d6165db0457a49e501bb1446972"/><file name="Redirect.php" hash="749717f3d5118bbbc2e57437432b1deb"/><file name="Status.php" hash="c0b8910fad9d7d44e46f340073ef6a7d"/><file name="Success.php" hash="977d233e303a1ab8c91304ff9f0edd4d"/></dir><dir name="Helper"><file name="Checkout.php" hash="b2299336f8e7201c34253d183d64ac12"/><file name="Data.php" hash="1e006469a70f3f9b28038709fef4c71c"/></dir><dir name="Model"><file name="Crontmoney.php" hash="198592bddfd813f60ff952336ddcb847"/><file name="Paymethod.php" hash="81748805e8f67dcb2bf45384a1f4feed"/><dir name="Resource"><dir name="Tigomoney"><file name="Collection.php" hash="bd8c70dae1fff2520ee86bce35b2c60c"/></dir><file name="Tigomoney.php" hash="6af60f3dcbcb18905c3b06e4f84a2c3a"/></dir><file name="Tigomoney.php" hash="a1307a5da66df189626df4140d80ea1f"/></dir><dir name="controllers"><file name="IndexController.php" hash="2960917b3566fcbbdf26d01c34b5b23b"/></dir><dir name="etc"><file name="config.xml" hash="b56e458cbacb16fa7244d3bf83210afd"/><file name="system.xml" hash="256e52a6daa91273cd5b295d2da1f582"/></dir><dir name="sql"><dir name="tmoney_setup"><file name="mysql4-install-1.1.0.php" hash="ef0555d9ca742f8b2173f10a939bc82d"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Tigo_Tmoney.xml" hash="b36d6f42f9b8b0c94d98ff3f4bd5dc05"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="tigo_tmoney.xml" hash="d4dfbbda65621b14e6555bc8fb4c73ed"/></dir><dir name="template"><dir name="tigo"><dir name="tmoney"><file name="back.phtml" hash="3bac4ec3f73d2e7020ee239e4642fa55"/><file name="error.phtml" hash="1f2f09c5289fd906e8098b4c80368dc1"/><file name="form.phtml" hash="77d3d2d01e1535dc4cd338e3f050cc69"/><file name="paymod.phtml" hash="863045041bde54258c7b96e0c84b9236"/><file name="status.phtml" hash="474fe1df9acd1cb339bbcd55e95d3ff2"/><file name="success.phtml" hash="b53ccf75869ff462143c6cd0b0801373"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="tmoney"><dir name="css"><file name="tigomoney.css" hash="b6336a3d9941c004b0d595aac1a40792"/><file name="tigomoney.css.map" hash="bcaeaebcd22313629de35b1661ea4f05"/></dir><dir name="img"><file name="MasterCard_Logo.svg.png" hash="cf017c3df4b4b6ce716a19b6d146a93c"/><file name="Visa.svg.png" hash="a27755ba80948dd6bcc5a7bcf4e29e91"/><file name="Visa_Mastercard.png" hash="e1fdf8418d6f2908ed37e83b0bd10d7c"/><file name="bg-img-mymodal.png" hash="3ef20adacfd6e085f37576c2a89b5ac3"/><file name="delete-icon.jpg" hash="fc0fe22212ec63960e9deccce514c11a"/><file name="error.png" hash="1d41afb46293a2bfffc12c9726eea0e9"/><file name="row-bottom.png" hash="03d8d76e10c43a6705ebe485b2bbbfa3"/><file name="row-left.png" hash="6ac679ce36df09282d53f1846b6f3773"/><file name="success.png" hash="afa20fa5203554353d6e1d19092ad812"/><file name="tigomoney-phone.png" hash="e22d84ff9fa92b3e9bf8b412afa83f32"/><file name="visa_mastercard.jpg" hash="b6a8ae54a0c8eb16f8e97ea1fba8ed70"/></dir><dir name="scss"><file name="tigomoney.scss" hash="cbb7f44108ec867582db238196321354"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="nusoap"><file name="aesecb.php" hash="e15b8586a10f9f412d88615040a3e191"/><file name="class.nusoap_base.php" hash="0b69f7414080c51318eaf0666a75caa8"/><file name="class.soap_fault.php" hash="a8f5a9a4e7dd155548b7c65bb78803c9"/><file name="class.soap_parser.php" hash="4e1e1dce71e32eafe4f5c840ddba59e1"/><file name="class.soap_server.php" hash="5192ee6089797b2d5c89b29cb285475d"/><file name="class.soap_transport_http.php" hash="dc62ca14a7602865c8afafb4b6fa1650"/><file name="class.soap_val.php" hash="0a42c13026e8d7c834363d71b092746f"/><file name="class.soapclient.php" hash="1d9a6d977ae88ca09faedf2aa94f6b06"/><file name="class.wsdl.php" hash="74b663bc33638081ee77278487e15cfd"/><file name="class.wsdlcache.php" hash="4b29ee6819f0a7a396090b25c30bae6c"/><file name="class.xmlschema.php" hash="db262b852109780fd3f63909d785be67"/><file name="nusoap.php" hash="0824d2ec824d9591cbab4fc60ace2441"/><file name="nusoapmime.php" hash="be4d186701bcd823144bd797aff9ba26"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.4.0</min><max>5.7.5</max></php></required></dependencies>
|
18 |
</package>
|