handle multi pose
This commit is contained in:
parent
dbff17ac8e
commit
028b36a0b3
|
|
@ -103,3 +103,29 @@ The file is located at C:\Users\mehran\Desktop\PEC_WindowsServiceSetup\Pec-PCPOS
|
||||||
The Commit phase completed successfully.
|
The Commit phase completed successfully.
|
||||||
|
|
||||||
The transacted install has completed.
|
The transacted install has completed.
|
||||||
|
|
||||||
|
Running a transacted installation.
|
||||||
|
|
||||||
|
Beginning the Install phase of the installation.
|
||||||
|
See the contents of the log file for the C:\HamekaraPosBridge\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.exe assembly's progress.
|
||||||
|
The file is located at C:\HamekaraPosBridge\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.InstallLog.
|
||||||
|
|
||||||
|
An exception occurred during the Install phase.
|
||||||
|
System.InvalidOperationException: An exception occurred in the OnAfterInstall event handler of System.ServiceProcess.ServiceInstaller.
|
||||||
|
The inner exception System.InvalidOperationException was thrown with the following error message: Cannot start service PecPcposService on computer '.'..
|
||||||
|
The inner exception System.ComponentModel.Win32Exception was thrown with the following error message: The system cannot find the file specified.
|
||||||
|
|
||||||
|
The Rollback phase of the installation is beginning.
|
||||||
|
See the contents of the log file for the C:\HamekaraPosBridge\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.exe assembly's progress.
|
||||||
|
The file is located at C:\HamekaraPosBridge\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.InstallLog.
|
||||||
|
|
||||||
|
The Rollback phase completed successfully.
|
||||||
|
|
||||||
|
The transacted install has completed.
|
||||||
|
|
||||||
|
|
||||||
|
The uninstall is beginning.
|
||||||
|
See the contents of the log file for the C:\HamekaraPosBridge\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.exe assembly's progress.
|
||||||
|
The file is located at C:\HamekaraPosBridge\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.InstallLog.
|
||||||
|
|
||||||
|
The uninstall has completed.
|
||||||
|
|
|
||||||
|
|
@ -116,3 +116,31 @@ Affected parameters are:
|
||||||
logfile = C:\Users\mehran\Desktop\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.InstallLog
|
logfile = C:\Users\mehran\Desktop\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.InstallLog
|
||||||
assemblypath = C:\Users\mehran\Desktop\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.exe
|
assemblypath = C:\Users\mehran\Desktop\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.exe
|
||||||
logtoconsole =
|
logtoconsole =
|
||||||
|
Installing assembly 'C:\HamekaraPosBridge\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.exe'.
|
||||||
|
Affected parameters are:
|
||||||
|
i =
|
||||||
|
logfile = C:\HamekaraPosBridge\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.InstallLog
|
||||||
|
assemblypath = C:\HamekaraPosBridge\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.exe
|
||||||
|
logtoconsole =
|
||||||
|
Installing service PecPcposService...
|
||||||
|
Creating EventLog source PecPcposService in log Application...
|
||||||
|
An exception occurred in the OnAfterInstall event handler of System.ServiceProcess.ServiceInstaller.
|
||||||
|
System.InvalidOperationException: Cannot start service PecPcposService on computer '.'.
|
||||||
|
The inner exception System.ComponentModel.Win32Exception was thrown with the following error message: The system cannot find the file specified.
|
||||||
|
Rolling back assembly 'C:\HamekaraPosBridge\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.exe'.
|
||||||
|
Affected parameters are:
|
||||||
|
i =
|
||||||
|
logfile = C:\HamekaraPosBridge\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.InstallLog
|
||||||
|
assemblypath = C:\HamekaraPosBridge\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.exe
|
||||||
|
logtoconsole =
|
||||||
|
Restoring event log to previous state for source PecPcposService.
|
||||||
|
Uninstalling assembly 'C:\HamekaraPosBridge\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.exe'.
|
||||||
|
Affected parameters are:
|
||||||
|
logtoconsole =
|
||||||
|
logfile = C:\HamekaraPosBridge\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.InstallLog
|
||||||
|
assemblypath = C:\HamekaraPosBridge\PEC_WindowsServiceSetup\Pec-PCPOS-WindowsService.exe
|
||||||
|
An exception occurred in the OnBeforeUninstall event handler of System.ServiceProcess.ServiceInstaller.
|
||||||
|
System.InvalidOperationException: Cannot stop PecPcposService service on computer '.'.
|
||||||
|
The inner exception System.ComponentModel.Win32Exception was thrown with the following error message: The service has not been started.
|
||||||
|
An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete.
|
||||||
|
Removing EventLog source PecPcposService.
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
588
posbridge.log
588
posbridge.log
|
|
@ -208,3 +208,591 @@ POS bridge on http://localhost:9090
|
||||||
Using POS 192.168.100.90:2020
|
Using POS 192.168.100.90:2020
|
||||||
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
ResDir: C:\Users\Public\PEC_PCPOS\response
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.90:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
[SALE] amount=110000 invoice=1769871089572 -> 192.168.100.90:2020
|
||||||
|
[SALE] ERROR: POS timeout
|
||||||
|
[SALE] amount=110000 invoice=1769871261817 -> 192.168.100.90:2020
|
||||||
|
[SALE] ERROR: POS timeout
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.153:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.153:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.153:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.153:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.153:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.153:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.153:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
POS bridge on http://localhost:9090
|
||||||
|
Using POS 192.168.100.153:2020
|
||||||
|
ReqDir: C:\Users\Public\PEC_PCPOS\request
|
||||||
|
ResDir: C:\Users\Public\PEC_PCPOS\response
|
||||||
|
|
|
||||||
43
server.js
43
server.js
|
|
@ -134,7 +134,7 @@ function safeCleanup(filePath) {
|
||||||
// Core POS Ops (via PEC file-drop)
|
// Core POS Ops (via PEC file-drop)
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
|
|
||||||
async function doSale(amountRial, invoice, timeoutMs = SALE_TIMEOUT_MS) {
|
async function doSale(amountRial, invoice, timeoutMs = SALE_TIMEOUT_MS , posIp=POS_IP) {
|
||||||
if (!fs.existsSync(REQ_DIR) || !fs.existsSync(RES_DIR)) {
|
if (!fs.existsSync(REQ_DIR) || !fs.existsSync(RES_DIR)) {
|
||||||
throw new Error('POS folders not found. Ensure PEC_PCPOS Windows component is installed and running.');
|
throw new Error('POS folders not found. Ensure PEC_PCPOS Windows component is installed and running.');
|
||||||
}
|
}
|
||||||
|
|
@ -143,10 +143,12 @@ async function doSale(amountRial, invoice, timeoutMs = SALE_TIMEOUT_MS) {
|
||||||
const reqFile = path.join(REQ_DIR, `${tag}.txt`);
|
const reqFile = path.join(REQ_DIR, `${tag}.txt`);
|
||||||
const resFile = path.join(RES_DIR, `${tag}.txt`);
|
const resFile = path.join(RES_DIR, `${tag}.txt`);
|
||||||
|
|
||||||
|
const ipToUse = (typeof posIp === 'string' && posIp.trim()) ? posIp.trim() : POS_IP;
|
||||||
|
|
||||||
// Build request payload (keys expected by your PEC build)
|
// Build request payload (keys expected by your PEC build)
|
||||||
const payloadLines = [
|
const payloadLines = [
|
||||||
'TYPE=LAN',
|
'TYPE=LAN',
|
||||||
`IP=${POS_IP}`,
|
`IP=${ipToUse}`,
|
||||||
`PORT=${POS_PORT}`,
|
`PORT=${POS_PORT}`,
|
||||||
'OP=SALE',
|
'OP=SALE',
|
||||||
`AMOUNT=${amountRial}`,
|
`AMOUNT=${amountRial}`,
|
||||||
|
|
@ -250,6 +252,27 @@ app.get('/pos/health', (req, res) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function isValidIPv4(ip) {
|
||||||
|
if (typeof ip !== 'string') return false;
|
||||||
|
const s = ip.trim();
|
||||||
|
if (!s) return false;
|
||||||
|
|
||||||
|
const parts = s.split('.');
|
||||||
|
if (parts.length !== 4) return false;
|
||||||
|
|
||||||
|
for (const p of parts) {
|
||||||
|
// only digits
|
||||||
|
if (!/^\d+$/.test(p)) return false;
|
||||||
|
// no empty, 0-255
|
||||||
|
const n = Number(p);
|
||||||
|
if (n < 0 || n > 255) return false;
|
||||||
|
// prevent "01" etc. (optional but usually desirable)
|
||||||
|
if (p.length > 1 && p[0] === '0') return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// SALE endpoint
|
// SALE endpoint
|
||||||
app.post('/pos/sale', async (req, res) => {
|
app.post('/pos/sale', async (req, res) => {
|
||||||
await lock();
|
await lock();
|
||||||
|
|
@ -263,8 +286,20 @@ app.post('/pos/sale', async (req, res) => {
|
||||||
return res.status(422).json({ ok: false, code: 'INVALID', message: 'Invalid amount' });
|
return res.status(422).json({ ok: false, code: 'INVALID', message: 'Invalid amount' });
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`[SALE] amount=${amount} invoice=${invoice} -> ${POS_IP}:${POS_PORT}`);
|
const posIpRaw = String(req.body.pos_ip ?? '').trim();
|
||||||
const result = await doSale(amount, invoice);
|
const posIp = posIpRaw || null;
|
||||||
|
|
||||||
|
if (posIp && !isValidIPv4(posIp)) {
|
||||||
|
return res.status(422).json({
|
||||||
|
ok: false,
|
||||||
|
code: 'INVALID_IP',
|
||||||
|
message: 'Invalid posIp (must be IPv4, e.g. 192.168.1.50)'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
console.log(`[SALE] amount=${amount} invoice=${invoice} -> ${posIp}:${POS_PORT}`);
|
||||||
|
const result = await doSale(amount, invoice, SALE_TIMEOUT_MS, posIp);
|
||||||
const ms = Date.now() - startedAt;
|
const ms = Date.now() - startedAt;
|
||||||
console.log(`[SALE] done in ${ms}ms ok=${result.ok} code=${result.code} rrn=${result.rrn || '-'} trace=${result.traceNo || '-'}`);
|
console.log(`[SALE] done in ${ms}ms ok=${result.ok} code=${result.code} rrn=${result.rrn || '-'} trace=${result.traceNo || '-'}`);
|
||||||
res.json(result);
|
res.json(result);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue