Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/06/2012, 01:46
Hendrix_Lorquino
 
Fecha de Ingreso: junio-2012
Mensajes: 11
Antigüedad: 11 años, 10 meses
Puntos: 0
ceca.jar Pasarela de pago CajaAstur

Hola,Gracias de antemano al que me pueda ayudar....

Tengo que implantar una pasarela de pago en cajaAstur, está en jsp, el problema es que me da fallo en -->TPV3 tpv = new TPV3(CLAVE_ENCRIPTACION); .a la hora de crear el objeto da un error como que no encuentra la clase del objeto, compila bien en Eclipse pero la ejecucion no funciona...OOs dejo el codigo por si sirve de algo.


[FONT="Book Antiqua"]--CLASE FIRMA
package tpv;

import es.ceca.TPV3.*;

public class Firma {
public static String MERCHANT_ID = "082108630";
public static String ACQUIRER_BIN = "0000554002";
public static String TERMINAL_ID = "000000003";
public static String CLAVE_ENCRIPTACION = "87401456";
public static String TIPO_MONEDA = "978";
public static String EXPONENTE = "2";

private static Firma instance = new Firma();

private Firma(){

}

public static String calcular(String Operacion, String Importe, String referencia)
{

try{
TPV3 tpv = new TPV3(CLAVE_ENCRIPTACION);

return tpv.calcularFirma(Firma.MERCHANT_ID,Firma.ACQUIRER _BIN,Firma.TERMINAL_ID,Operacion,Importe,Firma.TIP O_MONEDA,Firma.EXPONENTE,referencia);

} catch(Exception e){
String a ="";
a="";
}
return "";
}

}



--CLASES DATOS
package tpv;

public class Datos {

public static String MERCHANT_ID = "082108630";
public static String ACQUIRER_BIN = "0000554002";
public static String TERMINAL_ID = "000000003";
public static String CLAVE_ENCRIPTACION = "87401456";
public static String TIPO_MONEDA = "978";
public static String EXPONENTE = "2";
public static String URL_OK = "http://www.realbetisbalompie.es/";
public static String URL_ERROR = "http://sevillafc.es/nuevaweb/";


}


--JSP COMPRAR

<%@page import="tpv.Datos"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%

String numeroOperacion = request.getParameter("Operación");
String importe = request.getParameter("importe");
String referencia = request.getParameter("referencia");

String firma = tpv.Firma.calcular("20", "100", "25");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

<style type="text/css">

<!--

.Estilo1 {
font-size: 16px;
color: #414a61;
font-family: Arial, Helvetica, sans-serif;
}
.Estilo2 {
color: #414a61;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
}
.Estilo3 {font-family: Verdana, Arial, Helvetica, sans-serif}
</style>

<FORM ACTION="https://pgw.ceca.es/cgi-bin/tpvanular" METHOD="POST" ENCTYPE="application/x-www-form-urlencoded">
<INPUT NAME="MerchantID" TYPE=hidden VALUE="<%=Datos.MERCHANT_ID %>">
<INPUT NAME="AcquirerBIN" TYPE=hidden VALUE="<%=Datos.ACQUIRER_BIN %>">
<INPUT NAME="TerminalID" TYPE=hidden VALUE="<%=Datos.TERMINAL_ID %>">
<INPUT NAME="Firma" TYPE=hidden VALUE="<%=firma %>">
<INPUT NAME="Num_operacion" TYPE=hidden VALUE="<%=numeroOperacion %>">
<INPUT NAME="Importe" TYPE=hidden VALUE="<%=importe %>">
<INPUT NAME="referencia" TYPE=hidden VALUE="<%=referencia %>">
<INPUT NAME="TipoMoneda" TYPE=hidden VALUE="<%=Datos.TIPO_MONEDA %>">
<INPUT NAME="Exponente" TYPE=hidden VALUE="<%=Datos.EXPONENTE %>">
<INPUT NAME="TipoMoneda" TYPE=hidden VALUE="<%=Datos.TIPO_MONEDA %>">
<INPUT NAME="URL_OK" TYPE=hidden VALUE="<%=Datos.URL_OK %>">
<INPUT NAME="URL_ERROR" TYPE=hidden VALUE="<%=Datos.URL_ERROR %>">
<INPUT NAME="Pago_Soportado" TYPE=hidden VALUE="SSL">
<CENTER>
<INPUT TYPE="submit" VALUE="Enviar">
<INPUT TYPE="reset" VALUE="Borrar">
</CENTER>
</FORM>


Gracias!!