コード例 #1
0
        private GetOpenTablesResponse OnPayAtTableGetOpenTables(string operatorId)
        {
            BillStatusRequest billStatusRequest = new BillStatusRequest
            {
                BillId             = "",
                TableId            = "",
                OperatorId         = operatorId,
                PaymentFlowStarted = false
            };
            GetOpenTablesResponse getOpenTablesResponse = new GetOpenTablesResponse();

            callBackPayAtTableGetOpenTables(billStatusRequest, out getOpenTablesResponse);

            return(getOpenTablesResponse);
        }
コード例 #2
0
        internal void _handleGetOpenTablesRequest(Message m)
        {
            var operatorId = m.GetDataStringValue("operator_id");

            // Ask POS for Open tables for this operatorId
            var openTablesResponse = GetOpenTables(operatorId);

            if ((openTablesResponse == null) || (openTablesResponse?.OpenTablesEntries == null) || (openTablesResponse?.OpenTablesEntries?.Count <= 0))
            {
                openTablesResponse = new GetOpenTablesResponse();
                Log.Information("There is no open table.");
            }

            _spi._send(openTablesResponse.ToMessage(m.Id));
        }