Commit 17d006dc authored by Jose Hugo Torres's avatar Jose Hugo Torres
Browse files

gateway sco gk

Modificaciones para gateway con sco y gk
parent 2e963f0b
......@@ -3,7 +3,7 @@ using System.Xml;
using EvaPOS_API_FRAME.Adaptadores;
using EvaPosSrvDTO;
using EvaPosSrvResp;
using EvaPosUtil;
using GatewaySCO;
// ****************************************************************
//
......
......@@ -7,19 +7,12 @@ using System.Text;
using System.Xml;
using Serilog;
using Serilog.Events;
using EvaPosUtil;
using GatewaySCO;
using EvaPosSrvDTO;
using EvaPosSrvCmd;
using EvaPosSrvResp;
using EvaPosSrvAplicacion;
using EvaPosCmdImp;
using System;
using EvaPOS_API_FRAME.Comandos;
using System.Threading;
using EvaPOS_API_FRAME.RespuestasXML;
using System.Threading.Tasks;
using static System.Net.Mime.MediaTypeNames;
using EvaPOS_API_FRAME.Comandos;
namespace EvaPosSCOSrv
{
/// <summary>
......@@ -57,7 +50,7 @@ namespace EvaPosSCOSrv
long _numeroConexionesEntrantes = 0;
DirectorioAdaptadoresDTO _adaptadores;
DirectorioCmds _comandos;
CreaDirectorioCmds _comandos;
Sesion _sesion;
Presentacion _presentacion;
IAplicacion _aplicacion;
......@@ -111,7 +104,7 @@ namespace EvaPosSCOSrv
/// <summary>
/// Fija directorio de comandos.
/// </summary>
public ServidorSocket AgregaDispensadorComandos(DirectorioCmds comandos)
public ServidorSocket AgregaDirectorioCmds(CreaDirectorioCmds comandos)
{
_comandos = comandos;
return this;
......@@ -464,9 +457,9 @@ namespace EvaPosSCOSrv
class Presentacion
{
DirectorioAdaptadoresDTO _adaptadores;
DirectorioCmds _comandos;
CreaDirectorioCmds _comandos;
public Presentacion(DirectorioAdaptadoresDTO adaptadores, DirectorioCmds comandos)
public Presentacion(DirectorioAdaptadoresDTO adaptadores, CreaDirectorioCmds comandos)
{
_comandos = comandos;
_adaptadores = adaptadores;
......
{
"GatewayConfig": {
"POS": "gk_test",
"POS_comment": "Indicates the set of commands to instantiate, according to the type of POS: evapos, tests, gk, etc.",
"IpSCO": "127.0.0.1",
"IpSCO_comment": "SCO IP, local or remote",
"PortSCO": 6697,
"PortSCO_comment": "SCO IP Port",
"Language": "es",
"Language_comment": "Language code as needed by the POS application"
},
"Serilog": {
"Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File" ],
"MinimumLevel": "Debug",
"WriteTo": [
{
"Name": "Console",
"Args": { }
},
{
"Name": "File",
"Args": {
"path": "logs/scogateway-log.txt",
"rollingInterval": "Day"
}
}
]
},
"Logging": {
"LogLevel": {
"Default": "Debug",
"Microsoft.AspNetCore": "Warning"
}
}
}
\ No newline at end of file
......@@ -7,8 +7,20 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<!-- Copiar el appsetting.json al directorio de salida de compilación. -->
<ItemGroup>
<Content Include="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="RestSharp" Version="110.2.0" />
<PackageReference Include="Serilog" Version="3.0.1" />
<PackageReference Include="Serilog.Settings.Configuration" Version="7.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
</ItemGroup>
......
### authentication
POST http://10.10.117.10:8080/smartpos-service/pos-service/tenants/001/services/com.gk_software.pos.api.service.security.AuthenticationService/authenticate HTTP/1.1
Content-Type: application/json
{
"loginName": "string",
"password": "string",
"businessUnitId": "string",
"passwordRequired": true,
"xXCustom08": "string",
"xXCustom10": "string",
"xXCustom09": "string",
"xXCustom07": "string",
"xXCustom05": "string",
"xXCustom06": "string",
"xXCustom11": "string",
"xXCustom12": "string",
"xXCustom13": "string",
"xXCustom14": "string",
"xXCustom15": "string",
"xXCustom03": "string",
"xXCustom02": "string",
"xXCustom04": "string",
"xXCustom01": "string"
}
### addItem
POST https://julia.redsis.com/castlemock/mock/rest/project/KdLiqe/application/V7cZik/com.gk_software.pos.api.service.external.item.ExternalItemQueryService/getItemInformation
Content-Type: application/json
{
"ItemID": "string",
"language": "string",
"currency": "string",
"getImages": true,
"xXCustom08": "string",
"xXCustom10": "string",
"xXCustom09": "string",
"xXCustom07": "string",
"xXCustom05": "string",
"xXCustom06": "string",
"xXCustom11": "string",
"xXCustom12": "string",
"xXCustom13": "string",
"xXCustom14": "string",
"xXCustom15": "string",
"xXCustom03": "string",
"xXCustom02": "string",
"xXCustom04": "string",
"xXCustom01": "string"
}
gkr.command-channel.client.baseUrl=${ConnectionConfigs.Backend.addressPrefix}/rest/services/command-channel
gkr.command-channel.client.fallbackBaseUrl=
gkr.command-channel.client.auth.type=${CommonHttpBasicAuthenticationConfig.type}
gkr.command-channel.client.auth.username=${CommonHttpBasicAuthenticationConfig.username}
gkr.command-channel.client.auth.password_encrypted=${CommonHttpBasicAuthenticationConfig.password}
gkr.command-channel.client.auth.clientGroupId=none
gkr.command-channel.clientRetailStoreId=${SmartPOSServiceConfig.retailStoreId}
gkr.command-channel.clientWorkstationId=${SmartPOSServiceConfig.workstationId}
# service URL
remote-object-factory.serviceUrlPrefix=${ConnectionConfigs.Backend.addressPrefix}/remoting
# Type of compression used for transfer of data from/to remote Data Store. Currently there are to possible values: none - no compression is used, zip - default zip compression is used.
data_store.remoting.client.compression=none
# Size of temporary buffer, which is internally used in data compression/decompression (aka inflater/deflater).
data_store.remoting.client.compression.zip.internal_buffer_size=8192
# "Stream recommendation size", which is used for data decompression (this value is used for temporary byte array allocation).
data_store.remoting.client.compression.zip.decompress_buffer_size=65536\t
# "Recommendation overhead size" for cases when compressed bytes are bigger than uncompressed (this value is used for temporary byte array allocation).
data_store.remoting.client.compression.zip.compress_overhead_size=128
# Data transfer chunk size. The size of data, which is sent in one remote call.
data_store.remoting.client.chunk_size=65536
{
"id": "e2b80ca5-27b6-47a4-8056-7fb187414d94",
"name": "gk_sandbox_env117",
"values": [
{
"key": "protocol",
"value": "https",
"enabled": true
},
{
"key": "host",
"value": "api.cloud4retail.com",
"enabled": true
},
{
"key": "port",
"value": "443",
"enabled": true
},
{
"key": "port-api-as",
"value": "443",
"enabled": true
},
{
"key": "port-api-g",
"value": "443",
"enabled": true
},
{
"key": "port-sss",
"value": "443",
"enabled": true
},
{
"key": "tenant",
"value": "001",
"enabled": true
},
{
"key": "username",
"value": "20005",
"enabled": true
},
{
"key": "userID",
"value": "20005",
"enabled": true
},
{
"key": "password",
"value": "60028",
"enabled": true
},
{
"key": "pos-service-login-pw",
"value": "60028",
"enabled": true
},
{
"key": "store",
"value": "9091",
"enabled": true
},
{
"key": "storeId",
"value": "9091",
"enabled": true
},
{
"key": "businessUnitGroupID",
"value": "100000000000000014",
"enabled": true
},
{
"key": "posServiceBUGId",
"value": "100000000000000014",
"enabled": true
},
{
"key": "defaultWorkstationID",
"value": "1016",
"enabled": true
},
{
"key": "workstationID",
"value": "1016",
"enabled": true
},
{
"key": "tillID",
"value": "216",
"enabled": true
},
{
"key": "customerID",
"value": "0000005060",
"enabled": true
},
{
"key": "example-item",
"value": "192",
"enabled": true
},
{
"key": "example-itemID",
"value": "000000000000000192",
"enabled": true
},
{
"key": "testItem_1_MHG",
"value": "030203",
"enabled": true
},
{
"key": "testItem_1_Price",
"value": "1.05",
"enabled": true
},
{
"key": "example-item2",
"value": "2050000003912",
"enabled": true
},
{
"key": "testItem_2_MHG",
"value": "060400",
"enabled": true
},
{
"key": "basic-auth-secret",
"value": "apiBApass",
"enabled": true
},
{
"key": "mainCurrencyID",
"value": "EUR",
"enabled": true
},
{
"key": "countryCode",
"value": "de_DE",
"enabled": true
},
{
"key": "suspendNumber",
"value": "49134727288327",
"enabled": true
},
{
"key": "sss-customer",
"value": "200",
"enabled": true
},
{
"key": "sss-password",
"value": "PK200;",
"enabled": true
},
{
"key": "transactionID",
"value": "",
"enabled": true
},
{
"key": "access_token",
"value": "",
"enabled": true
},
{
"key": "jti",
"value": "8ffe18e9-4b3d-4c8c-9fe6-846346195a11",
"enabled": true
},
{
"key": "paymentId",
"value": null,
"enabled": true
},
{
"key": "posSessionId",
"value": "",
"enabled": true
},
{
"key": "posServiceTxId",
"value": "",
"enabled": true
},
{
"key": "JSESSIONID",
"value": "",
"enabled": true
},
{
"key": "refresh_token",
"value": "",
"enabled": true
},
{
"key": "customer-access_token",
"value": "",
"enabled": true
},
{
"key": "customer-refresh_token",
"value": "",
"enabled": true
},
{
"key": "generatedTxId",
"value": "",
"enabled": true
},
{
"key": "device-service.print-request-uuid",
"value": "fd4dddfa-a045-4a66-a2fa-7e022749fe28",
"enabled": true
},
{
"key": "svs-timestamp",
"value": "05.11.2020:17:49:10",
"enabled": true
},
{
"key": "sss-version",
"value": "5.16.0",
"enabled": true
},
{
"key": "roleID",
"value": "admin_global",
"enabled": true
},
{
"key": "_pos_session_",
"value": "",
"type": "any",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2022-08-29T11:23:17.720Z",
"_postman_exported_using": "Postman/9.29.5"
}
\ No newline at end of file
{
"id": "1082a0e0-048d-41b1-a25f-2875028e246c",
"name": "gk_sandbox_env118",
"values": [
{
"key": "protocol",
"value": "https",
"enabled": true
},
{
"key": "host",
"value": "api.cloud4retail.com",
"enabled": true
},
{
"key": "port",
"value": "443",
"enabled": true
},
{
"key": "port-api-as",
"value": "443",
"enabled": true
},
{
"key": "port-api-g",
"value": "443",
"enabled": true
},
{
"key": "port-sss",
"value": "443",
"enabled": true
},
{
"key": "tenant",
"value": "001",
"enabled": true
},
{
"key": "username",
"value": "20088",
"enabled": true
},
{
"key": "userID",
"value": "20088",
"enabled": true
},
{
"key": "password",
"value": "60097",
"enabled": true
},
{
"key": "pos-service-login-pw",
"value": "60097",
"enabled": true
},
{
"key": "store",
"value": "9091",
"enabled": true
},
{
"key": "storeId",
"value": "9091",
"enabled": true
},
{
"key": "businessUnitGroupID",
"value": "100000000000000014",
"enabled": true
},
{
"key": "posServiceBUGId",
"value": "100000000000000014",
"enabled": true
},
{
"key": "defaultWorkstationID",
"value": "1017",
"enabled": true
},
{
"key": "workstationID",
"value": "1017",
"enabled": true
},
{
"key": "tillID",
"value": "217",
"enabled": true
},
{
"key": "customerID",
"value": "0000005060",
"enabled": true
},
{
"key": "example-item",
"value": "192",
"enabled": true
},
{
"key": "example-itemID",
"value": "000000000000000192",
"enabled": true
},
{
"key": "testItem_1_MHG",
"value": "030203",
"enabled": true
},
{
"key": "testItem_1_Price",
"value": "1.05",
"enabled": true
},
{
"key": "example-item2",
"value": "2050000003912",
"enabled": true
},
{
"key": "testItem_2_MHG",
"value": "060400",
"enabled": true
},
{
"key": "basic-auth-secret",
"value": "apiBApass",
"enabled": true
},
{
"key": "mainCurrencyID",
"value": "EUR",
"enabled": true
},
{
"key": "countryCode",
"value": "de_DE",
"enabled": true
},
{
"key": "suspendNumber",
"value": "49134727288327",
"enabled": true
},
{
"key": "sss-customer",
"value": "200",
"enabled": true
},
{
"key": "sss-password",
"value": "PK200;",
"enabled": true
},
{
"key": "transactionID",
"value": "",
"enabled": true
},
{
"key": "access_token",
"value": "",
"enabled": true
},
{
"key": "jti",
"value": "8ffe18e9-4b3d-4c8c-9fe6-846346195a11",
"enabled": true
},
{
"key": "paymentId",
"value": null,
"enabled": true
},
{
"key": "posSessionId",
"value": "",
"enabled": true
},
{
"key": "posServiceTxId",
"value": "",
"enabled": true
},
{
"key": "JSESSIONID",
"value": "",
"enabled": true
},
{
"key": "refresh_token",
"value": "",
"enabled": true
},
{
"key": "customer-access_token",
"value": "",
"enabled": true
},
{
"key": "customer-refresh_token",
"value": "",
"enabled": true
},
{
"key": "generatedTxId",
"value": "",
"enabled": true
},
{
"key": "device-service.print-request-uuid",
"value": "fd4dddfa-a045-4a66-a2fa-7e022749fe28",
"enabled": true
},
{
"key": "svs-timestamp",
"value": "05.11.2020:17:49:10",
"enabled": true
},
{
"key": "sss-version",
"value": "5.16.0",
"enabled": true
},
{
"key": "roleID",
"value": "admin_global",
"enabled": true
},
{
"key": "_pos_session_",
"value": "",
"type": "any",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2022-08-29T11:26:57.064Z",
"_postman_exported_using": "Postman/9.29.5"
}
\ No newline at end of file
{
"id": "14924701-0968-4417-b1ad-b9bda436fc80",
"name": "gk_sandbox_env119",
"values": [
{
"key": "protocol",
"value": "https",
"enabled": true
},
{
"key": "host",
"value": "api.cloud4retail.com",
"enabled": true
},
{
"key": "port",
"value": "443",
"enabled": true
},
{
"key": "port-api-as",
"value": "443",
"enabled": true
},
{
"key": "port-api-g",
"value": "443",
"enabled": true
},
{
"key": "port-sss",
"value": "443",
"enabled": true
},
{
"key": "tenant",
"value": "001",
"enabled": true
},
{
"key": "username",
"value": "20033",
"enabled": true
},
{
"key": "userID",
"value": "20033",
"enabled": true
},
{
"key": "password",
"value": "60051",
"enabled": true
},
{
"key": "pos-service-login-pw",
"value": "60051",
"enabled": true
},
{
"key": "store",
"value": "9091",
"enabled": true
},
{
"key": "storeId",
"value": "9091",
"enabled": true
},
{
"key": "businessUnitGroupID",
"value": "100000000000000014",
"enabled": true
},
{
"key": "posServiceBUGId",
"value": "100000000000000014",
"enabled": true
},
{
"key": "defaultWorkstationID",
"value": "1018",
"enabled": true
},
{
"key": "workstationID",
"value": "1018",
"enabled": true
},
{
"key": "tillID",
"value": "218",
"enabled": true
},
{
"key": "customerID",
"value": "0000005060",
"enabled": true
},
{
"key": "example-item",
"value": "192",
"enabled": true
},
{
"key": "example-itemID",
"value": "000000000000000192",
"enabled": true
},
{
"key": "testItem_1_MHG",
"value": "030203",
"enabled": true
},
{
"key": "testItem_1_Price",
"value": "1.05",
"enabled": true
},
{
"key": "example-item2",
"value": "2050000003912",
"enabled": true
},
{
"key": "testItem_2_MHG",
"value": "060400",
"enabled": true
},
{
"key": "basic-auth-secret",
"value": "apiBApass",
"enabled": true
},
{
"key": "mainCurrencyID",
"value": "EUR",
"enabled": true
},
{
"key": "countryCode",
"value": "de_DE",
"enabled": true
},
{
"key": "suspendNumber",
"value": "49134727288327",
"enabled": true
},
{
"key": "sss-customer",
"value": "200",
"enabled": true
},
{
"key": "sss-password",
"value": "PK200;",
"enabled": true
},
{
"key": "transactionID",
"value": "",
"enabled": true
},
{
"key": "access_token",
"value": "",
"enabled": true
},
{
"key": "jti",
"value": "8ffe18e9-4b3d-4c8c-9fe6-846346195a11",
"enabled": true
},
{
"key": "paymentId",
"value": null,
"enabled": true
},
{
"key": "posSessionId",
"value": "",
"enabled": true
},
{
"key": "posServiceTxId",
"value": "",
"enabled": true
},
{
"key": "JSESSIONID",
"value": "",
"enabled": true
},
{
"key": "refresh_token",
"value": "",
"enabled": true
},
{
"key": "customer-access_token",
"value": "",
"enabled": true
},
{
"key": "customer-refresh_token",
"value": "",
"enabled": true
},
{
"key": "generatedTxId",
"value": "",
"enabled": true
},
{
"key": "device-service.print-request-uuid",
"value": "fd4dddfa-a045-4a66-a2fa-7e022749fe28",
"enabled": true
},
{
"key": "svs-timestamp",
"value": "05.11.2020:17:49:10",
"enabled": true
},
{
"key": "sss-version",
"value": "5.16.0",
"enabled": true
},
{
"key": "roleID",
"value": "admin_global",
"enabled": true
},
{
"key": "_pos_session_",
"value": "",
"type": "any",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2022-08-29T11:29:52.224Z",
"_postman_exported_using": "Postman/9.29.5"
}
\ No newline at end of file
ConnectionConfigs.MCA.hostname=localhost
ConnectionConfigs.MCA.port=443
ConnectionConfigs.MCA.password=
ConnectionConfigs.MCA.username=
ConnectionConfigs.DigitalReceiptService.hostname=localhost
ConnectionConfigs.DigitalReceiptService.port=443
ConnectionConfigs.DigitalReceiptService.password=
ConnectionConfigs.DigitalReceiptService.username=
ConnectionConfigs.Backend.hostname=demogk.redsis.com
ConnectionConfigs.Backend.port=8443
ConnectionConfigs.Backend.addressPrefix=${ConnectionConfigs.SDC.addressPrefix}
ConnectionConfigs.ERP.hostname=localhost
ConnectionConfigs.ERP.port=8000
ConnectionConfigs.ERP.username=
ConnectionConfigs.ERP.password=
ConnectionConfigs.CRM.hostname=localhost
ConnectionConfigs.CRM.port=8000
ConnectionConfigs.CRM.username=
ConnectionConfigs.CRM.password=
ConnectionConfigs.KDS1.hostname=localhost
ConnectionConfigs.KDS1.port=32768
ConnectionConfigs.KDS2.hostname=localhost
ConnectionConfigs.KDS2.port=32768
ConnectionConfigs.POSServer.addressPrefix=https\://${ConnectionConfigs.Backend.hostname}\:${ConnectionConfigs.Backend.port}/pos-server/tenants/${SmartPOSServiceConfig.tenantId}/stores/${SmartPOSServiceConfig.retailStoreId}
ConnectionConfigs.SDC.addressPrefix=https\://${ConnectionConfigs.Backend.hostname}\:${ConnectionConfigs.Backend.port}/swee-sdc/tenants/${SmartPOSServiceConfig.tenantId}/stores/${SmartPOSServiceConfig.retailStoreId}
ConnectionConfigs.SVS.addressPrefix=https\://${ConnectionConfigs.Backend.hostname}\:${ConnectionConfigs.Backend.port}/app-svs
ConnectionConfigs.SelfScanningService.addressPrefix=https\://${ConnectionConfigs.Backend.hostname}\:${ConnectionConfigs.Backend.port}/self-scanning-service/tenants/${SmartPOSServiceConfig.tenantId}
gkr.opos.transactionBarcodeType=TWO_OF_FIVE
gkr.opos.jmx.domain=com.gk-software.gkr.smartpos-service
### authentication http://localhost:8080/smartpos-service/
# url base: com.gk_software.pos.api.service.security.
# /AuthenticationService/authenticate HTTP/1.1
# http://10.10.117.10:8080/smartpos-service/pos-service/tenants/001/services/authenticate HTTP/1.1
# http://10.10.117.10:8080/smartpos-service/pos-server/tenants/001/stores/1/
# http://10.10.117.10:8080/smartpos-service/rest/services/command-channel HTTP/1.1
# # http://10.10.117.10:8080/smartpos-service/pos-server/tenants/001/stores/1/
# Url=http://10.10.117.10:8080/smartpos-service/pos-service/tenants/001/stores/1000/services
POST http://10.10.117.10:8080/smartpos-service/pos-service/tenants/001/stores/1/services/AuthenticationService/authenticate HTTP/1.1
Content-Type: application/json
{
"loginName": "1005",
"password": "1",
"businessUnitId": "1000",
"passwordRequired": true,
"xXCustom08": "string",
"xXCustom10": "string",
"xXCustom09": "string",
"xXCustom07": "string",
"xXCustom05": "string",
"xXCustom06": "string",
"xXCustom11": "string",
"xXCustom12": "string",
"xXCustom13": "string",
"xXCustom14": "string",
"xXCustom15": "string",
"xXCustom03": "string",
"xXCustom02": "string",
"xXCustom04": "string",
"xXCustom01": "string"
}
### addItem
POST https://julia.redsis.com/castlemock/mock/rest/project/KdLiqe/application/V7cZik/com.gk_software.pos.api.service.external.item.ExternalItemQueryService/getItemInformation
Content-Type: application/json
{
"ItemID": "string",
"language": "string",
"currency": "string",
"getImages": true,
"xXCustom08": "string",
"xXCustom10": "string",
"xXCustom09": "string",
"xXCustom07": "string",
"xXCustom05": "string",
"xXCustom06": "string",
"xXCustom11": "string",
"xXCustom12": "string",
"xXCustom13": "string",
"xXCustom14": "string",
"xXCustom15": "string",
"xXCustom03": "string",
"xXCustom02": "string",
"xXCustom04": "string",
"xXCustom01": "string"
}
This diff is collapsed.
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