Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Brayan Sarmiento
API-Gateway-CHEC
Commits
2e963f0b
Commit
2e963f0b
authored
Jul 11, 2023
by
bsarmiento31
Browse files
Initial commit
parents
Changes
105
Hide whitespace changes
Inline
Side-by-side
gatewayGK/RespuestasXML/Suspend/SuspendTransactionResponseError.cs
0 → 100644
View file @
2e963f0b
using
EvaPosSrvDTO
;
using
EvaPosSrvResp
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
EvaPOS_API_FRAME.RespuestasXML.Suspend
{
/// <summary>
/// Respuesta cuando no esta disponible el comando suspender
/// </summary>
public
class
SuspendTransactionResponseError
:
Respuesta
{
public
int
RequestID
{
get
;
set
;
}
public
string
Message
{
get
;
set
;
}
public
string
ErrorCode
{
get
;
set
;
}
private
string
_xml
;
public
SuspendTransactionResponseError
(
int
sessionId
,
TipoMensaje
messageType
,
int
requestID
,
string
message
,
string
errorCode
)
:
base
(
sessionId
,
messageType
)
{
RequestID
=
requestID
;
Message
=
message
;
ErrorCode
=
errorCode
;
}
public
override
string
TextoXML
{
get
=>
_xml
=
$"""
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
schema
:
SuspendTransactionResponse
xmlns
:
schema
=
"http://bc.si.retail.ibm.com/POSBCSchema"
>
<
SuspendTransactionResult
>
<
RequestID
>{
RequestID
}</
RequestID
>
<
ExceptionResult
>
<
Message
>{
Message
}</
Message
>
<
ErrorCode
>{
ErrorCode
}</
ErrorCode
>
</
ExceptionResult
>
</
SuspendTransactionResult
>
</
schema
:
SuspendTransactionResponse
>
""";
}
}
}
gatewayGK/RespuestasXML/TerminateLane/TerminateResponse.cs
0 → 100644
View file @
2e963f0b
using
EvaPosSrvDTO
;
using
EvaPosSrvResp
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
EvaPOS_API_FRAME.RespuestasXML.TerminateLane
{
/// <summary>
/// Respuesta para cerrar la lane
/// </summary>
public
class
TerminateResponse
:
Respuesta
{
public
bool
RequestID
{
get
;
set
;
}
private
string
_xml
;
public
TerminateResponse
(
int
sessionId
,
TipoMensaje
messageType
,
bool
requestID
)
:
base
(
sessionId
,
messageType
)
{
RequestID
=
requestID
;
}
public
override
string
TextoXML
{
get
=>
_xml
=
$"""
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
schema
:
TerminateResponse
xmlns
:
schema
=
"http://bc.si.retail.ibm.com/POSBCSchema"
>
<
TerminateResult
>
<
RequestID
>{
RequestID
}</
RequestID
>
</
TerminateResult
>
</
schema
:
TerminateResponse
>
""";
}
}
}
gatewayGK/RespuestasXML/TotalsEventResponse.cs
0 → 100644
View file @
2e963f0b
using
EvaPosSrvDTO
;
using
EvaPosSrvResp
;
using
System
;
using
System.Collections.Generic
;
using
System.Globalization
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
EvaPOS_API_FRAME.RespuestasXML
{
/// <summary>
/// Respuesta a petición de agregar item - (TotalsEvent)
/// Tambien se usa para la segunda respuesta de finalizar y pagar
/// </summary>
public
class
TotalsEventResponse
:
Respuesta
{
public
int
RequestID
{
get
;
set
;
}
public
string
Key
{
get
;
set
;
}
public
int
Value
{
get
;
set
;
}
public
string
Total
{
get
;
set
;
}
public
string
SubTotal
{
get
;
set
;
}
public
string
Tax
{
get
;
set
;
}
public
string
BalanceDue
{
get
;
set
;
}
public
string
ChangeDue
{
get
;
set
;
}
public
string
FoodstampChangeDue
{
get
;
set
;
}
public
string
FoodstampTotal
{
get
;
set
;
}
public
string
FoodstampBalanceDue
{
get
;
set
;
}
public
string
CouponTotal
{
get
;
set
;
}
public
int
TotalItems
{
get
;
set
;
}
public
int
TotalCoupons
{
get
;
set
;
}
public
string
TotalSavings
{
get
;
set
;
}
public
string
TenderApplied
{
get
;
set
;
}
private
string
_xml
;
public
TotalsEventResponse
(
int
sessionId
,
TipoMensaje
messageType
,
int
requestID
,
string
total
,
string
subTotal
,
string
tax
,
string
balanceDue
,
string
changeDue
,
string
foodstampChangeDue
,
string
foodstampTotal
,
string
foodstampBalanceDue
,
string
couponTotal
,
int
totalItems
,
int
totalCoupons
,
string
totalSavings
,
string
tenderApplied
)
:
base
(
sessionId
,
messageType
)
{
RequestID
=
requestID
;
//Key = key;
//Value = value;
Total
=
total
;
SubTotal
=
subTotal
;
Tax
=
tax
;
BalanceDue
=
balanceDue
;
ChangeDue
=
changeDue
;
FoodstampChangeDue
=
foodstampChangeDue
;
FoodstampTotal
=
foodstampTotal
;
FoodstampBalanceDue
=
foodstampBalanceDue
;
CouponTotal
=
couponTotal
;
TotalItems
=
totalItems
;
TotalCoupons
=
totalCoupons
;
TotalSavings
=
totalSavings
;
TenderApplied
=
tenderApplied
;
}
public
override
string
TextoXML
{
get
=>
_xml
=
$"""
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
schema
:
TotalsEvent
xmlns
:
schema
=
"http://bc.si.retail.ibm.com/POSBCSchema"
>
<
RequestID
>{
RequestID
}</
RequestID
>
<
TransactionTotals
>
<
Total
>{
Total
}</
Total
>
<
SubTotal
>{
SubTotal
}</
SubTotal
>
<
Tax
>{
Tax
}</
Tax
>
<
BalanceDue
>{
BalanceDue
}</
BalanceDue
>
<
ChangeDue
>{
ChangeDue
}</
ChangeDue
>
<
FoodstampChangeDue
>{
FoodstampChangeDue
}</
FoodstampChangeDue
>
<
FoodstampTotal
>{
FoodstampTotal
}</
FoodstampTotal
>
<
FoodstampBalanceDue
>{
FoodstampBalanceDue
}</
FoodstampBalanceDue
>
<
CouponTotal
>{
CouponTotal
}</
CouponTotal
>
<
TotalItems
>{
TotalItems
}</
TotalItems
>
<
TotalCoupons
>{
TotalCoupons
}</
TotalCoupons
>
<
TotalSavings
>{
TotalSavings
}</
TotalSavings
>
<
TenderApplied
>{
TenderApplied
}</
TenderApplied
>
</
TransactionTotals
>
</
schema
:
TotalsEvent
>
""";
}
}
}
gatewayGK/RespuestasXML/TransactionStatusEvent.cs
0 → 100644
View file @
2e963f0b
using
EvaPosSrvDTO
;
using
EvaPosSrvResp
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
EvaPOS_API_FRAME.RespuestasXML
{
public
class
TransactionStatusEvent
:
Respuesta
{
public
int
RequestID
{
get
;
set
;
}
public
string
Status
{
get
;
set
;
}
public
int
ID
{
get
;
set
;
}
public
string
Type
{
get
;
set
;
}
public
string
Category
{
get
;
set
;
}
public
string
Date
{
get
;
set
;
}
public
string
Time
{
get
;
set
;
}
private
string
_xml
;
public
TransactionStatusEvent
(
int
sessionId
,
TipoMensaje
messageType
,
int
requestID
,
string
status
,
int
iD
,
string
type
,
string
category
,
string
date
,
string
time
)
:
base
(
sessionId
,
messageType
)
{
RequestID
=
requestID
;
Status
=
status
;
ID
=
iD
;
Type
=
type
;
Category
=
category
;
Date
=
date
;
Time
=
time
;
}
public
override
string
TextoXML
{
get
=>
_xml
=
$"""
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
schema
:
TransactionStatusEvent
xmlns
:
schema
=
"http://bc.si.retail.ibm.com/POSBCSchema"
>
<
RequestID
>{
RequestID
}</
RequestID
>
<
TransactionStatus
>
<
Status
>{
Status
}</
Status
>
<
ID
>{
ID
}</
ID
>
<
Type
>{
Type
}</
Type
>
<
Category
>{
Category
}</
Category
>
<
Date
>{
Date
}</
Date
>
<
Time
>{
Time
}</
Time
>
</
TransactionStatus
>
</
schema
:
TransactionStatusEvent
>
""";
}
}
}
gatewayGK/gatewayGK.csproj
0 → 100644
View file @
2e963f0b
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
</ItemGroup>
</Project>
Prev
1
2
3
4
5
6
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment