Ver Mensaje Individual
  #4 (permalink)  
Antiguo 06/07/2016, 03:10
kolo300
 
Fecha de Ingreso: febrero-2016
Ubicación: Bilbao, BI, EUS
Mensajes: 74
Antigüedad: 8 años, 2 meses
Puntos: 0
Respuesta: Problemas retorno TPV Redsys

Buenas.

Vuelvo a comentar en este tema para no crear otro por el mismo problema.

Sigo teniendo problemas con el retorno a mi web desde la tpv de Redsys.

Igual es que estoy haciendo algo mal ya no lo se. Esta es mi URLOK en el que se supone que si el pago ha ido bien te redirige a este php, que redirigir lo hace pero la pantalla se me queda en blanco y no me hace las operaciones que tendría que hacer:

Código PHP:
Ver original
  1. <?php
  2.     require_once './conexiones.php';                
  3.     include './apiRedsys.php';
  4.    
  5.     session_start();
  6.  
  7.     mysql_connect($dbhost, $dbusername, $dbuserpass);
  8.     mysql_select_db($dbname) or die('Cannot select database');
  9.    
  10.     $miObj = new RedsysAPI;
  11.    
  12.     if(!empty($_POST)){
  13.         $version = $_GET["Ds_SignatureVersion"];
  14.         $datos = $_GET["Ds_MerchantParameters"];
  15.         $signatureRecibida = $_GET["Ds_Signature"];
  16.        
  17.         $decodec = $miObj->decodeMerchantParameters($datos);
  18.         $kc = 'mi clave';
  19.         $firma = $miObj->createMerchantSignatureNotif($kc, $datos);
  20.                
  21.         if($firma === $signatureRecibida){
  22.            
  23.            
  24.             $variable= $_SESSION['variable'];          
  25.             $query = "UPDATE tabla SET pago= 1 WHERE variable LIKE '$variable'";
  26.             mysql_query($query) or die(mysql_error());
  27.             unset($variable);
  28.             echo "<script language='javascript'>alert('PAGO REALIZADO'); document.location=('http://www.miweb.com/es/main.php')</script>";    
  29.         }
  30.     }
  31.        
  32. ?>

Hay algo mal? Esta bien?

Cualquier ayuda ser bienvenida ya que soy incapaz de dar con la tecla que haga que esto funcione de manera correcta.

Un saludo