Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Micros 3700 Example of integration through transaction services web service

Status
Not open for further replies.

JCCR

IS-IT--Management
Mar 20, 2016
71
CO
Hello to all

I have been working with SIM and now I must make a check to be initiated without the employee intervening in the process and with SIM I cannot do it, in another post they suggested me, that I must use Transaction Services by means of a dll and call it from a SIM, but I have never worked with TS and I would like to ask them the favor to share with me some example from which I can base myself to work. Thank you very much.

 
Can't call a SIM from Transaction Services.
 
In case this helps... Simple post of transaction to RES 3700 via TS attached below with some thoughts.. Not sure it hits your need.

There are creative ways to fire SIM from a TS post using idle no trans and evaluating for a specific transaction element, fairly rough to explain here though.

I have found that instead of a DLL (which can be rough depending on environment) you can achieve an awful lot of functional needs through a service that accepts RX/TX messages to do your more advanced stuff outside of SIM but make it feel like SIM code or features triggered by SIM.

A sample / simple post of a Transaction to TS below, check out SoapUI if you want to test and learn in a UI application that can enable posting various transactions to POS.

<soapenv:Envelope xmlns:soapenv=" xmlns:res=" <soapenv:Header/>
<soapenv:Body>
<res:postTransaction>
<res:pGuestCheck>
<res:CheckID>Whatever-ID</res:CheckID>
<res:CheckTableObjectNum>0</res:CheckTableObjectNum>
<res:CheckRevenueCenterObjectNum>1</res:CheckRevenueCenterObjectNum>
<res:CheckOrderType>1</res:CheckOrderType>
<res:CheckEmployeeObjectNum>1</res:CheckEmployeeObjectNum>
<res:CheckGuestCount>0</res:CheckGuestCount>
<res:pCheckInfoLines>
<res:string>Test Line 1</res:string>
<res:string>Test Line 2</res:string>
</res:pCheckInfoLines>
<res:CheckStatusBits>1</res:CheckStatusBits>
</res:pGuestCheck>
<res:ppMenuItems>
<res:ResPosAPI_MenuItem>
<res:MenuItem>
<res:MiObjectNum>200</res:MiObjectNum>
<res:MiMenuLevel>1</res:MiMenuLevel>
<res:MiReference>TEST</res:MiReference>
</res:MenuItem>
</res:ResPosAPI_MenuItem>
</res:ppMenuItems>
<res:pTmedDetail>
<res:TmedObjectNum>101</res:TmedObjectNum>
<res:TmedPartialPayment>0.00</res:TmedPartialPayment>
</res:pTmedDetail>
</res:postTransaction>
</soapenv:Body>
</soapenv:Envelope>

Hope this helps in some way.. Good luck.
 
Thank you very much indeed. Without wanting to abuse your trust I ask you to please share with me some code in c# complementing what you already shared with me. Thank you very much.
 
Don't have it in C# but this should be close enough .. Should give you directional information on how to get a service for ISL comms working.

//Constants
package com.simComs.model;

import java.io.*;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Properties;
/*


*/

public interface SIM_COMS_Constants {

static final String VERSION_NUMBER = "3.39";



static int APPROVED = 1;
static int DECLINED = 2;
static int REFERRAL = 3;


static final char OUTER_SOH = 0x11; //
static final char OUTER_STX = 0x12; //
static final char OUTER_ETX = 0x13; //
static final char OUTER_EOT = 0x14; //



static final char SOH = 1; //
static final char STX = 2; //
static final char ETX = 3; //
static final char EOT = 4; //
static final char ACK = 6;
static final char NAK = 0x15;
static final char FS = 28;




static final char[][] MESSAGE_TOKEN_MAP = {
{OUTER_SOH, SOH},
{OUTER_STX, STX},
{OUTER_ETX, ETX},
{OUTER_EOT, EOT}
};


static final char XON = 0x11;
static final char XOFF = 0x13;



}

//Request Messages
package com.simComs.model;


public class RequestMessage implements SIM_COMS_Constants {



String workstationId = null;
String interfaceName = null;

String posSourceID = null;
String messageBody = null;
String[] messageParts = null;

String responseBody = null;

String applicationSequenceNumber = null;
boolean isRetransmit = false;
String messageType = null;

String operatorMessage = "";
RequestMessageHandler handler = null;


static int debugStatus = 0;

public RequestMessage( String pPosSourceID, String pMessageBody ) throws Exception {
this.posSourceID = pPosSourceID;
this.messageBody = pMessageBody;

if( this.messageBody.indexOf(String.valueOf( FS )) == 0 ) {
this.messageBody = this.messageBody.substring(1);
}



if( this.posSourceID.length() > 16 ) {

this.workstationId = this.posSourceID.substring( 0, this.posSourceID.length()-16 );

this.interfaceName = this.posSourceID.substring( this.posSourceID.length()-16 );
}

this.messageParts = this.messageBody.split( String.valueOf( FS ), -1 );
System.out.println("this.messageParts.length="+this.messageBody.indexOf(String.valueOf( FS ))+"#");


for( int i = 0; i < this.messageParts.length; i++ ) {
System.out.println("this.messageParts["+i+"]="+this.messageParts+"#");

}
}









public static final void setDebugMode( int pStatusValue ) {
if( (pStatusValue >= 0) && (pStatusValue <= REFERRAL) ) {
debugStatus = pStatusValue;
}
}

public static final int getDebugMode() {
return debugStatus;
}


public static long getChecksum( String pData ) {
long respChecksum = 0;
char[] dataChars = pData.toCharArray();

for( int i = 0; i < dataChars.length; i++ ) {
respChecksum += dataChars;
}

return respChecksum;
}







public void setResponseBody( String pResponseBody ) {
this.responseBody = pResponseBody;
}


public void setOperatorMessage( String pOperatorMessage ) {
this.operatorMessage = pOperatorMessage;
}
public String getOperatorMessage() {
return operatorMessage;
}



public String getWorkstation() {
return this.workstationId;
}

public boolean isExtended() {
return ( messageParts.length > 10 );
}


public String[] getMessageParts() {
return messageParts;
}


public String getMessageType() {
return messageType;
}

public String getApplicationSequenceNumber() {
return applicationSequenceNumber;
}



public String toResponseString() {

StringBuffer respBuffer = new StringBuffer();

respBuffer.append( posSourceID ).append( STX ).append(applicationSequenceNumber).append(FS);

// append message body here
if( (responseBody != null) && (responseBody.length() > 0) ) {
respBuffer.append( responseBody );
}
else {
respBuffer.append( " " );
}

// close out the message
respBuffer.append( ETX );


//return SOH + respBuffer.toString() + EOT;
return SOH + respBuffer.toString() + String.format("%04x", getChecksum( respBuffer.toString() )) + EOT;


}


}

//Response handler
package com.simComs.model;

import java.util.HashMap;

public abstract class RequestMessageHandler implements SIM_COMS_Constants {
/**
* RequestMessage that this RequestMessageHandler handles
*/
protected RequestMessage requestMessage = null;

/**
* HashMap of the response values given to us by the bank
*/
protected HashMap responseParameters = null;



/**
* Sets the requestMessage attribute of the RequestMessageHandler object
*
* @param pMessage The new requestMessage value
*/
public void setRequestMessage( RequestMessage pMessage ) {
this.requestMessage = pMessage;
}



/**
* Gets the requestMessage attribute of the RequestMessageHandler object
*
* @return The requestMessage value
*/
public RequestMessage getRequestMessage() {
return this.requestMessage;
}





/**
* Sets the responseParameters attribute of the RequestMessageHandler object
*
* @param pRespParms The new responseParameters value
*/
public void setResponseParameters( HashMap pRespParms ) {
this.responseParameters = pRespParms;
}



/**
* Gets the responseParameters attribute of the RequestMessageHandler object
*
* @return The responseParameters value
*/
public HashMap getResponseParameters() {
return this.responseParameters;
}









/**
* Gets the command attribute of the RequestMessageHandler object
*
* @return The command value
*/
public String getCommand() {
String className = getClass().getName();
return className.substring( className.lastIndexOf( '.' ) + 1 );
}



}









 

Hello to all

Thank you very much to all for your contributions, finally I managed to consume the web service of trasanction services from c# and post a check to Micros, but now I don't know if there is any way to indicate to Micros the quantity of products to post, that is to say how to tell Micros, for example, that I want to post 18 Burgers and not only one, I haven't found any property/label with which I can do it. As always thank you very much for your comments.

 
You can specify a quantity by adding a quantity to the menu item details <MiQuantity>2</MiQuantity>

Specialist in creating custom applications for the Micros POS range: 3700, 9700, Simphony FE, Simphony. SIM Scripts, Data Exports, Simphony extension applications, API Creation and integration. If you need anything please contact me via my website
 
CathalMF thank you very much for your response. I have 2 other questions if you would be so kind as to guide me with those as well

1. It is possible to know the check number generated in Micros after posting the order with PostTransaction

2. After the check is generated there is some way for Micros to tell me when the check is closed

Thank you very much
 
CathalMF In the formal description of the service I cannot identify the label containing the menu item details, please tell me where I should locate it or where I can find documentation about it. Using the service reference from c# I cannot find it either. Thank you very much.
 
I was able to get the check number in c# using the PostTransactionAsync method instead of PostTransaction
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top