Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/03/2011, 12:52
vaughann
 
Fecha de Ingreso: junio-2008
Mensajes: 42
Antigüedad: 15 años, 10 meses
Puntos: 0
Virtuemart TPV Banesto

Hola

Estoy intentando integrar el pago por TPV de Banesto pero me da errores.
He añadido un nuevo metodo de pago, en general he puesto HTML y en configuracion el archivo que me manda Banesto.
Banesto me da este codigo como ejemplo:
Código:
<HTML>
<HEAD>
  <TITLE>PhP Form Example</TITLE>
</HEAD>
<BODY>

<?PHP
// If form is submitted with all required data then show the form
// else show error page
empty($Formulario) ?							
	  ShowForm($coste,$moneda,$prod) :
	  ShowError();
exit;
?>

<?PHP


function ShowError () {
	echo "<html><head><title>Results</title></head><body><table width=100% height=50%><tr><td><p><h2><center>Compruebe que todos los datos del formulario son correctos!!</center></h2></p></td></tr></table></body></html>\n";
} # End of function ShowError

function ShowForm ($coste,$moneda,$producto) {
// Posted data
global $HTTP_POST_VARS;

// Valores constantes del comercio
$url_tpvv='http://pruebas.pagoseguro.com.es/cgi-bin/totalizacion';
$nombre_comercio='CIEMPOCHEF_PRUEBAS';
$referencia=date('ymdHis');
$coste='1.00';
$moneda='EUR';

// Now, print the HTML script
echo "<html><head><title>Comercio Simulador</title></head>
<script language=JavaScript>
function calc() { 
vent=window.open('','tpv','width=725,height=600,scrollbars=no,resizable=yes,status=yes,menubar=no,location=no');
document.forms[0].submit();}
</script>
<body bgcolor=white>
<form name=compra action=$url_tpvv method=post target=tpv>
<pre>
<table>
<tr><td>
<h2>Página de prueba.</h2>
</td></tr><tr><td>
Comercio: <font color=blue>$nombre_comercio</font>
</td></tr><tr><td>
Referencia: <font color=blue>$referencia</font>
</td></tr><tr><td>
Importe: <font color=blue>$coste</font>
</td></tr><tr><td>";



echo "</td>
</tr><tr><td>
<input type=hidden name=coste value='$coste'>
</td></tr><tr><td>
<input type=hidden name=moneda value='$moneda'>
</td></tr><tr><td>
<input type=hidden name=referencia  value='$referencia'>
</td></tr><tr><td>
<input type=hidden name=nombre_comercio value='$nombre_comercio'>
</td></tr><tr><td>
</td></tr>
</table>
<center><a href='javascript:calc()'><img src='/tpvirtual.jpg' border=0 ALT='TPV Virtual'></a></center>
</pre>
</form>										  
</body></html>";
} # End of function ShowForm
?>
Por un lado hay que modificar $coste ya que pone que se cobrara 1.00 euros en lugar del precio del procuto, por lo que ahi lo modifico por $db->f("order_total");
Al hacre esto, entonces me aparece el siguiente error:
Fatal error: Call to a member function f() on a non-object in /home/ciempoch/public_html/components/com_virtuemart/themes/default/templates/pages/checkout.thankyou.tpl.php(61) : eval()'d code on line 31

¿Que puede ser? me estoy volviendo locooooo

Última edición por vaughann; 27/03/2011 a las 12:53 Razón: completar informacion