
Title:          DocMpend service application usage
Publisher:      MAT SA
Copyright:      Copyright (C) 2020 MAT Advanced Technology, all rights reserved
Author:         Vaggelis Karadimos
Created:        03-02-2020
updated:        16-06-2020
Release:        1.0.0.0



This document is about the usage information of the DocMpend application service, in order to activate
the backround operation of posting the daily pending unposted receipts at the server of GSIS. 
This service operation needs  access (as administrator) to the following registry entries.
x64 [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\DocMsign\LastClosure] 
x32 [HKEY_LOCAL_MACHINE\SOFTWARE\DocMsign\LastClosure]


The service executable support the following command arguments:
==========================================================================================================================
install         -- Install the application to work as a service in the local machine
start           -- Start the service operation
stop            -- Stop the service operation
delete          -- Removes the service form local machine (requires to stop the service before).
debug <0 or 1>  -- Enable the debug log file (requires to restart the service). It takes as second parameter 
	           the value of 1 or 0 in order to activate or deactivate the debug operation. 
                   It creates a file under the root ESD folder with tha name "DocMPend_log.txt".
register        -- It configures the mandatory data in order to post succesfully to the server of GSIS.
	           it needs 4 extra parameters to work.
                   <url link>  the url of GSIS for uploading the data. 
                               GSIS: http://tam.gsis.gr/eafdss/myweb/websend.php   				
                               test: http://147.102.24.100/myweb/websend.php
		   <port>      the server listening port default: 80
                   <pass key>  the received key from GSIS for the specific device no.
                   <serial no> the serial number of the ESD device         
serialno        -- <serial no> <unlock key> Updates the registered serialnumber of the ESD and unlock the service in order to work.
workfolder      -- Setting - updating the root work folder of docmsign.dll  

	
Typically you have to call the commands with the following order.
==================================================================
-- DocMPend.exe workfolder c:\out\
-- DocMPend.exe register  http://tam.gsis.gr/eafdss/myweb/websend.php 80  D5BF3BA112E04E5D43BC6630B098956407B7146C00E685BB80562B650CF9510F DLL19000000
-- DocMPend.exe install
-- DocMPend.exe start

                      
  
It is mandatory for the external application that uses the docmsign.dll to create and print on each receipt QRcode with the following information

Serialnumber of the device : GRT99000204
progress receipt counter   : 00000387
receipt signature          : 0EA2C079E722C361C6297D10F02955CA413695A9    
receipt total value        : 18.35

QR code message example:
https://www1.aade.gr/tameiakes/myweb/q1.php?SIG=GRT99000204000003870EA2C079E722C361C6297D10F02955CA413695A918.35

