Cambios API Econo
This commit is contained in:
@@ -49,7 +49,7 @@ Public Class E141 : Implements IHttpHandler
|
||||
Public ReadOnly Property TokenAutorizacion As String
|
||||
Get
|
||||
If EsProduccion Then
|
||||
Return "$2y$10$8Mk3YeIkJESilIwD.U5dG.SsA4JloycJKbaGls8TNEw/AKBE1qane"
|
||||
Return "$2y$10$EZlXnFrhUc4aRVwjy5/v0.3JPdFNjyeANDc64YXJ5eHD8pMsv93Q."
|
||||
Else
|
||||
Return "$2y$10$8Mk3YeIkJESilIwD.U5dG.SsA4JloycJKbaGls8TNEw/AKBE1qane"
|
||||
End If
|
||||
@@ -59,7 +59,7 @@ Public Class E141 : Implements IHttpHandler
|
||||
Public ReadOnly Property URLBase As String
|
||||
Get
|
||||
If EsProduccion Then
|
||||
Return "https://econollantas-pruebas.fidelityapps.mx"
|
||||
Return "https://services.fidelityapps.mx/"
|
||||
Else
|
||||
Return "https://econollantas-pruebas.fidelityapps.mx/"
|
||||
End If
|
||||
@@ -92,28 +92,31 @@ Public Class E141 : Implements IHttpHandler
|
||||
Else
|
||||
context.Response.ContentType = "text/html"
|
||||
|
||||
Dim FiltrarTodos = If(context.Request("FiltrarTodos") = Nothing, "", context.Request("FiltrarTodos").ToString())
|
||||
If Not String.IsNullOrEmpty(Metodo) Then
|
||||
Dim FiltrarTodos = If(context.Request("FiltrarTodos") = Nothing, "", context.Request("FiltrarTodos").ToString())
|
||||
|
||||
Dim respuesta As Boolean = False
|
||||
Dim respuesta As Boolean = False
|
||||
|
||||
'TAREAS PROGRAMADAS
|
||||
Select Case Metodo
|
||||
Case "CrearActualizarProductos"
|
||||
respuesta = CrearActualizarProductos(If(FiltrarTodos = "1", True, False))
|
||||
Case "ActualizarPrecios"
|
||||
respuesta = ActualizarPrecios(If(FiltrarTodos = "1", True, False))
|
||||
Case "ActualizarExistencias"
|
||||
respuesta = ActualizarExistencias()
|
||||
Case "ActualizarVendedores"
|
||||
respuesta = ActualizarVendedores(If(FiltrarTodos = "1", True, False))
|
||||
End Select
|
||||
'TAREAS PROGRAMADAS
|
||||
Select Case Metodo
|
||||
Case "CrearActualizarProductos"
|
||||
respuesta = CrearActualizarProductos(If(FiltrarTodos = "1", True, False))
|
||||
Case "ActualizarPrecios"
|
||||
respuesta = ActualizarPrecios(If(FiltrarTodos = "1", True, False))
|
||||
Case "ActualizarExistencias"
|
||||
respuesta = ActualizarExistencias()
|
||||
Case "ActualizarVendedores"
|
||||
respuesta = ActualizarVendedores(If(FiltrarTodos = "1", True, False))
|
||||
End Select
|
||||
|
||||
If respuesta Then
|
||||
retorno = "True"
|
||||
Else
|
||||
retorno = "False"
|
||||
If respuesta Then
|
||||
retorno = "True"
|
||||
Else
|
||||
retorno = "False"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
context.Response.Write(retorno)
|
||||
@@ -202,7 +205,7 @@ Public Class E141 : Implements IHttpHandler
|
||||
Using httpClient = New HttpClient()
|
||||
httpClient.Timeout = New TimeSpan(0, 5, 0)
|
||||
Using request = New HttpRequestMessage(HttpMethod.Post, New Uri(url))
|
||||
request.Headers.Add("token", TokenAutorizacion)
|
||||
request.Headers.Add("X-PUBLIC-AUTH", TokenAutorizacion)
|
||||
|
||||
Using content = New StringContent(payload, Encoding.UTF8, "application/json")
|
||||
request.Content = content
|
||||
@@ -607,7 +610,7 @@ Public Class E141 : Implements IHttpHandler
|
||||
End Select
|
||||
|
||||
If VendedorData.Length > 4 Then
|
||||
Nombre = String.Concat(VendedorData(VendedorData.Length - 1), " ", VendedorData(VendedorData.Length))
|
||||
Nombre = String.Concat(VendedorData(VendedorData.Length - 2), " ", VendedorData(VendedorData.Length - 1))
|
||||
Apellido = String.Concat(VendedorData(0), " ", VendedorData(1))
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user