Commit 7734c707 authored by Brayan Sarmiento's avatar Brayan Sarmiento
Browse files

Cambio Nuevo Endpoint

parent ac2007cc
......@@ -18,8 +18,6 @@ namespace app_datafono_difare.Services
string baseUrl = System.Configuration.ConfigurationManager.AppSettings["BaseUrl"];
//InicializarPinpad();
_webApp = WebApp.Start<Startup>(url: baseUrl);
Log.Information($"Servicio REST running en {baseUrl}");
......@@ -30,28 +28,6 @@ namespace app_datafono_difare.Services
Log.Information("Deteniendo servicio REST...");
_webApp?.Dispose();
}
private void InicializarPinpad()
{
try
{
var rg = RgService.Instance;
var config = System.Configuration.ConfigurationManager.AppSettings;
string url = config["UrlServicio"];
string estacion = config["Estacion"];
rg.Rg.EstablecerServicio(url);
rg.Rg.EstablecerEstacion(estacion);
rg.Rg.ConfigurarTerminal(estacion);
rg.Rg.ConfigurarPinpad();
Log.Information("Pinpad inicializado correctamente");
}
catch (Exception ex)
{
Log.Error(ex, "Error inicializando el pinpad");
}
}
}
}
\ No newline at end of file
......@@ -8,20 +8,26 @@ using System.Web.Http;
namespace app_datafono_difare
{
using Owin;
using System.Web.Http;
public class Startup
{
public void Configuration(IAppBuilder app)
{
HttpConfiguration config = new HttpConfiguration();
var config = new HttpConfiguration();
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{action}"
routeTemplate: "api/{controller}/{action}/{id}",
defaults: new { id = RouteParameter.Optional }
);
app.UseWebApi(config);
}
}
}
2025-12-02 15:38:00.225 -05:00 [INF] Iniciando servicio OWIN...
2025-12-02 15:38:00.642 -05:00 [INF] Servicio REST running en http://localhost:9000
2025-12-02 15:38:11.646 -05:00 [INF] Inicializando RgFunciones...
2025-12-02 15:38:19.029 -05:00 [INF] Configuración del servicio exitosa.
2025-12-02 15:38:49.386 -05:00 [INF] Esperando inicialización de la pinpad...
2025-12-02 15:38:50.394 -05:00 [INF] Preparando venta...
2025-12-02 15:38:51.403 -05:00 [INF] Enviando comando AUTORIZAR...
2025-12-02 15:39:09.215 -05:00 [INF] Respuesta cruda: PP00010000 AUTORIZACION OK. 00055400005515385220251202213672201204301791310101 000000000000 AMEX 03GUZMAN V./CESAR AMERICAN EXPRESS A000000025010402 40 ECCA4D18A4FF9A090480008000F800376650XXXXX7256 2605B971E505F0F8B6FFCF25CCAFE9524F3E94B73665FB50C52692F0AD020A4B79D3 D004C2E40ACC70E60CFBCFA0515F34F5
2025-12-02 15:39:09.295 -05:00 [INF] Resultado de la transacción: {"ReturnFlag":false,"DepositFlag":false,"VoidFlag":false,"Amount":3.69,"LineItemType":"TC","BalanceDueSatisfied":false,"ReferenceNumber":"213672","MaskedAccountNumber":"376650XXXXX7256","ResponseCode":"00","ApprovalCode":"","SequenceNumber":"000554","CashBackAmount":0.00,"IsDeclined":false,"ResponseCodeDescriptor":"00 AUTORIZACION OK.","Timestamp":"2025-12-02T15:38:52","CommerceCode":"000000817740","TerminalId":"20120430","RedCode":"01","Lote":"000055","Promotion":"","CodAdquiriente":"997","idAdquiriente":"CREDIMATIC01","CardBrand":"AMEX"}
2025-12-02 15:39:09.295 -05:00 [INF] Transacción procesada: 00 AUTORIZACION OK.
2025-12-02 15:42:43.721 -05:00 [INF] Esperando inicialización de la pinpad...
2025-12-02 15:42:44.736 -05:00 [INF] Preparando venta...
2025-12-02 15:42:45.741 -05:00 [INF] Enviando comando AUTORIZAR...
2025-12-02 15:43:48.083 -05:00 [INF] Esperando inicialización de la pinpad...
2025-12-02 15:43:49.095 -05:00 [INF] Preparando venta...
2025-12-02 15:43:50.108 -05:00 [INF] Enviando comando AUTORIZAR...
2025-12-02 15:44:05.216 -05:00 [INF] Respuesta cruda: PP00010000 AUTORIZACION OK. 00055500005515435120251202213673201204301791310101 000000000000 AMEX 03GUZMAN V./CESAR AMERICAN EXPRESS A000000025010402 40 70565F5B0FF022B30480008000F800376650XXXXX7256 2605B971E505F0F8B6FFCF25CCAFE9524F3E94B73665FB50C52692F0AD020A4B79D3 93D7617D6BD82C285AB98BEB507ADC6F
2025-12-02 15:44:05.217 -05:00 [INF] Resultado de la transacción: {"ReturnFlag":false,"DepositFlag":false,"VoidFlag":false,"Amount":3.69,"LineItemType":"TC","BalanceDueSatisfied":false,"ReferenceNumber":"213673","MaskedAccountNumber":"376650XXXXX7256","ResponseCode":"00","ApprovalCode":"","SequenceNumber":"000555","CashBackAmount":0.00,"IsDeclined":false,"ResponseCodeDescriptor":"00 AUTORIZACION OK.","Timestamp":"2025-12-02T15:43:51","CommerceCode":"000000817740","TerminalId":"20120430","RedCode":"01","Lote":"000055","Promotion":"","CodAdquiriente":"997","idAdquiriente":"CREDIMATIC01","CardBrand":"AMEX"}
2025-12-02 15:44:05.217 -05:00 [INF] Transacción procesada: 00 AUTORIZACION OK.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment