-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAprobado_ITC.asp
363 lines (316 loc) · 13.6 KB
/
Aprobado_ITC.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
<%
Dim XML_out
XML_out = Request.form("xml")
Dim oHTTP
Dim oRexXML
Dim TimeOut
Dim lsRecXML
Dim lsTXRec
Dim lsDataRec
Dim lsURLRec
Dim lsDataConfirmaenPortal
Dim lsURLConfirmaenPortal
Dim CodRetREPago
Dim Status
Dim lsServerLocal
Dim direc
Dim oXML
Dim Conn
Dim RecSet
Dim SQL
LogTransac "Recepcion XML",XML_out,BancoEstandar
'response.write("*** xml 4 ***")
'reponse.write(
'response.Write(replace(replace(XML_out, "<", "["),">","]")
'response.write("*** xml 4 ***")
'response.End()
If (XML_out = "") Then
'LogTransac "Error al Recepcionar XML desde Banco", "XML Vacio",BancoEstandar
SendError -1, "Error al Recepcionar XML desde Banco [XML Vacio]"
Else
Set oXML = Server.CreateObject("MSXML2.DOMDocument")
oXML.validateOnParse = True
If Not(oXML.loadXML(XML_out)) Then
'LogTransac "XML recepcionado desde banco no válido", oXML.parseError.reason,BancoEstandar
SendError -2, "XML recepcionado desde banco no válido [" & oXML.parseError.reason & "]"
Else
IdTrxServipag = BuscaParametros("Servipag/IdTrxServipag")
IdTxCliente = BuscaParametros("Servipag/IdTxCliente")
EstadoPago = BuscaParametros("Servipag/EstadoPago")
Mensaje = BuscaParametros("Servipag/Mensaje")
end if
end if
'----------------------------------------------------------------------------------------------------
' Log de Transacciones.
'----------------------------------------------------------------------------------------------------
Sub LogTransac(psContexto,psParametro,botonEstandar)
Dim dia
Dim mes
Dim ano
Dim archivo
Dim fs
Dim fname
dia = Day(Date)
mes = Month(Date)
ano = Year(Date)
If (dia < 10) Then
dia = "0" & dia
End If
If (mes < 10) Then
mes = "0" & mes
End If
archivo = "xx_BPE_Comprobante_" & botonEstandar &"." & ano & mes & dia & ".log"
'response.Write(archivo)
'response.Write(Server.MapPath(archivo))
Dim miConn
Set miConn = Server.CreateObject("ADODB.Connection")
miConn.Open "Driver={SQL Server};Server=leo;Database=ITC;Uid=matricula;Pwd=dtb01s"
'oConn.Open "Driver={SQL Server};" & _
' "Server=MyServerName;" & _
' "Database=myDatabaseName;" & _
' "Uid=;" & _
' "Pwd="
Dim StrSql
StrSql = "Insert Into log(miLog) Values ('xml4:" + psContexto + "') "
miConn.Execute StrSql
miConn.Close
Set miConn = Nothing
'Set fs = Server.CreateObject("Scripting.FileSystemObject")
'Set fname = fs.OpenTextFile(Server.MapPath(archivo), 8, True)
'fname.Write(Now & VbTab & boton_Log & VbTab & Mid(psContexto & Space(40),1,40) & " : " & VbTab & psParametro & VbCrLf)
'fname.Close
'Set fname = Nothing
'Set fs = Nothing
End Sub
'--------------------------------------------------------------------------------
' Busca Parametros Con Estructura Fija Dentro De Un XML.
'--------------------------------------------------------------------------------
Function BuscaParametros(StrStruct)
Dim NodeList
Dim Node
Set NodeList = oXML.selectNodes(StrStruct)
For Each Node In NodeList
BuscaParametros = Node.Text
Next
End Function
'--------------------------------------------------------------------------------
' Busca Servidor de instalacion
'--------------------------------------------------------------------------------
Dim Direc_Ini
Dim var_servidor
'Direc_Ini = "C:/simulador_bpe/simuladorBPE.ini"
var_servidor = "200.54.71.237" 'LeeIni(Direc_Ini,"servidor")
'------------------------------------------------------------------------------------------------------------------
' Lee ini
'------------------------------------------------------------------------------------------------------------------
Function LeeIni(archivo,linea)
Const fsoLectura = 1
Dim objFSO
Dim objTextStream
Dim Key
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(archivo) Then
Set objTextStream = objFSO.OpenTextFile(archivo, fsoLectura,true)
Do While not objTextStream.AtEndOfStream
Key = Split(objTextStream.ReadLine, "=")
If Key(0) = linea Then
LeeIni = Key(1)
Exit Do
End If
loop
objTextStream.Close
Set objTextStream = Nothing
Else
LogTransac "Archivo Servidor", "Archivo de Token de direccion, no existe"
LeeIni = "No Existe Archivo"
End if
End Function
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Pago de cuotas</title>
<link href="estilos.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="css/tablas.css" type="text/css" />
<script type="text/JavaScript">
<!--
//compt = setTimeout('self.close();', 5000);
compt = setTimeout("window.open('', '_parent', ''); window.close();", 5000);
function MM_swapImgRestore() { //v3.0
var i, x, a = document.MM_sr; for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
}
function MM_preloadImages() { //v3.0
var d = document; if (d.images) {
if (!d.MM_p) d.MM_p = new Array();
var i, j = d.MM_p.length, a = MM_preloadImages.arguments; for (i = 0; i < a.length; i++)
if (a[i].indexOf("#") != 0) { d.MM_p[j] = new Image; d.MM_p[j++].src = a[i]; }
}
}
function MM_findObj(n, d) { //v4.01
var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
}
if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
if (!x && d.getElementById) x = d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i, j = 0, x, a = MM_swapImage.arguments; document.MM_sr = new Array; for (i = 0; i < (a.length - 2); i += 3)
if ((x = MM_findObj(a[i])) != null) { document.MM_sr[j++] = x; if (!x.oSrc) x.oSrc = x.src; x.src = a[i + 2]; }
}
//function cerrar() {
// window.opener = null;
// window.close();
// return false;
//}
function cerrar() {
window.open('', '_parent', '');
window.close();
}
//-->
</script>
<style type="text/css">
<!--
.style1 {font-size: 24px}
.style2 {
font-size: 12px
}
-->
</style>
</head>
<body onload="" link="#717274" vlink="#717274" alink="#717274">
<!--<table width="772" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="img/top-right.gif">
<img src="img/spacerhoriz.gif" width="15" height="10" />
</td>
<td background="img/top.gif">
<img src="img/spacerhoriz.gif" width="16" height="10" />
</td>
<td background="img/top-left.gif">
<img src="img/spacerhoriz.gif" width="15" height="15" />
</td>
</tr>
<tr>
<td width="5" background="img/left.gif">
</td>
<td bordercolor="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFCC00">
<tr>
<td height="24" colspan="4" background="img/top-amarillo.gif">
</td>
</tr>
<tr>
<td width="4" height="100" rowspan="7" bgcolor="#717274">
<img src="img/spacerhoriz.gif" width="4" height="10" />
</td>
<td height="27" colspan="2" background="img/titulo.gif" bgcolor="#E1E6EA">
<span class="titulo_blanco_bold">Pago de cuotas Servipag</span>
</td>
<td width="4" rowspan="7" bgcolor="#717274">
<img src="img/spacerhoriz.gif" width="4" height="10" />
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF">
<img src="img/spacerhoriz.gif" width="15" height="10" />
</td>
</tr>
<tr>
<td height="46" colspan="2" background="img/top-gris.gif" class="titulo_blanco_bold">
Operación Finalizada, Antencedentes del Pago:
</td>
</tr>
<tr>
<td height="20" colspan="2" bgcolor="#E1E6EA">
</td>
</tr>
<tr>
<td colspan="2" align="left" bgcolor="#E1E6EA">
<table width="500" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF"
id="datos">
<tr>
<td width="100%" height="20" bgcolor="#FACC21" class="volver">
<div align="left">
Identificador de Transacción :
<%=IdTrxServipag%></div>
</td>
</tr>
<tr>
<td width="100%" height="20" bgcolor="#FACC21" class="volver">
<div align="left">
Identificador de Cliente :
<%=IdTxCliente%></div>
</td>
</tr>
<tr>
<td width="100%" height="20" bgcolor="#FACC21" class="volver">
<div align="left">
Estado del Pago :
<%=EstadoPago%></div>
</td>
</tr>
<tr>
<td width="100%" height="20" bgcolor="#FACC21" class="volver">
<div align="left">
Mensaje de Transacción :
<%=Mensaje%></div>
</td>
</tr>
<tr>
<td width="100%" height="20" bgcolor="#FACC21" class="volver">
<div align="left">
XML de confirmación de Pago :
<%=XML_out%></div>
</td>
</tr>
</table>
</tr>
<tr>
<td height="20" colspan="2" bgcolor="#E1E6EA" align="center">
<a href="javascript: res=cerrar();">
<img src="img/Volver2-a.gif" alt="Volver al Simulador" name="boton_volver" width="149"
height="49" border="0" id="boton_volver" onclick="return boton_volver_onclick()" /></a>
</td>
</tr>
<tr>
<td colspan="4" background="img/bottom-amarillo.gif">
<img src="img/spacerhoriz.gif" width="15" height="10" />
</td>
</tr>
</table>
</td>
<td width="5" background="img/right.gif">
</td>
</tr>
<tr>
<td bordercolor="0" background="img/bottom-left.gif">
<img src="img/spacerhoriz.gif" width="15" height="15" />
</td>
<td background="img/bottom.gif">
<img src="img/spacerhoriz.gif" width="16" height="10" />
</td>
<td background="img/bottom-right.gif">
<img src="img/spacerhoriz.gif" width="15" height="10" />
</td>
</tr>
</table>-->
<center>
<p><br />
<img src="images/pago.gif" width="348" height="110" /><br />
<br />
<b class="Tit-celdas style2"><font face="Verdana, Arial, Helvetica, sans-serif">Para consultar su nuevo estado de Pago diríjase al<br />
Menú Mis Finanzas - Opción Consulta de cuentas. </font> </b>
<br />
<br />
<br />
<a href="javascript: res=cerrar();"><img src="Imagenes/botones/continuar-of.gif" alt="Volver al Portal de Alumnos" name="boton_volver" width="149"
height="49" border="0" id="boton_volver" onclick="return cerrar()" /></a></p>
</center>
</body>
</html>