Skip to content

Commit

Permalink
Fix Bug - Erro na verificacao do retorno
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosbrasil committed Jul 10, 2011
2 parents 83c12e3 + ee9f065 commit 61fb3f5
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Cielo.class.php
@@ -1,9 +1,9 @@
<?php
/**
* Classe para utilizar gateway locaweb com pagamentos CIELO
* @AUTOR: Marcos Brasil / markus.prologic@gmail.com
* @DATE: 10/06/2011
* @VERSION: 0.1alpha
* @AUTHOR Marcos Brasil / markus.prologic@gmail.com
* @DATE 10/07/2011
* @VERSION 0.1.1
*/
class Cielo {

Expand Down Expand Up @@ -208,7 +208,7 @@ public function registraTransacao()
}

// Se nao ocorreu erro exibe parametros
if (isset($retorno_codigo_erro) || $retorno_codigo_erro == '') {
if (!isset($retorno_codigo_erro) || $retorno_codigo_erro == '') {
$_SESSION['tid'] = $retorno_tid; // - grava o tid em um session para posterior uso

$return['status'] = true;
Expand Down Expand Up @@ -324,8 +324,8 @@ public function capturaTransacao($tid = null)
$retorno_url_autenticacao = $nodeURLAutenticacao->nodeValue;
}

// Se n�o ocorreu erro exibe par�metros
if (isset($retorno_codigo_erro) || $retorno_codigo_erro == '') {
// Se nao ocorreu erro exibe parametros
if (!isset($retorno_codigo_erro) || $retorno_codigo_erro == '') {

$return['status'] = true;
$return['retorno_tid'] = $retorno_tid;
Expand Down Expand Up @@ -451,8 +451,8 @@ public function autorizaTransacao($tid = null)
$retorno_url_autenticacao = $nodeURLAutenticacao->nodeValue;
}

// Se n�o ocorreu erro exibe par�metros
if (isset($retorno_codigo_erro) || $retorno_codigo_erro == '') {
// Se nao ocorreu erro exibe parametros
if (!isset($retorno_codigo_erro) || $retorno_codigo_erro == '') {
$return['return'] = true;
$return['retorno_tid'] = $retorno_tid;
$return['retorno_pan'] = $retorno_pan;
Expand Down Expand Up @@ -628,7 +628,7 @@ public function consultaTransacao($tid = null)
}

// Se nao ocorreu erro exibe parametros
if (isset($retorno_codigo_erro) || $retorno_codigo_erro == '') {
if (!isset($retorno_codigo_erro) || $retorno_codigo_erro == '') {
// - transacao
$return['status'] = true;
$return['retorno_tid'] = $retorno_tid;
Expand Down Expand Up @@ -775,8 +775,8 @@ public function cancelaTransacao($tid = null)
}

// Se não ocorreu erro exibe parâmetros
if ($retorno_codigo_erro == '') {
$return['status'] = true;
if (!isset($retorno_codigo_erro) || $retorno_codigo_erro == '') {
$return['status'] = true;

// - Transacao
$return['retorno_tid'] = $retorno_tid;
Expand Down

0 comments on commit 61fb3f5

Please sign in to comment.