O$ interface with Credit Card machine

Bastiaan Olij Bastiaan.Olij at instinctsystems.com.au
Sun Nov 11 16:36:03 EST 2018

Hi Michael,

You use the cgilist parameter in the HTTPGET. Its a list with 2 columns, name and value. Omnis will automatically convert them to base64. I'm guess to do what you need to do add a row with the name column set to your string and the value column empty.
You should be able to leave the URL empty.

Kindest Regards,

Bastiaan Olij
Head of development - Instinct Systems: The JobBag People
Ground Floor, 48 Chandos Street
St Leonards NSW 2065

Phone +61 2 8115 8000
Mobile +61 4 321 44833
bastiaan.olij at instinctsystems.com.au

 From:   Michael Houlberg <michael at houlbergdevelopment.com> 
 To:   OmnisDev List - English <omnisdev-en at lists.omnis-dev.com> 
 Sent:   11/10/2018 11:54 AM 
 Subject:   O$ interface with Credit Card machine 

I’m trying to communicate with a credit card machine.  This one is made by PAX, but my problem isn’t necessarily bound to any particular manufacturer.  My problem is how to correctly use the HTTPGet command in Omnis.

The way you talk to this machine is via HTTP using GET on the local area network.  The manual makes it look easy enough.  For instance to initialize the device they show this example:

Assume the destination of Terminal “IP: Port” is “”. [02] as STX, [03] as ETX, [1c] as field separator. Initialize (A00) (A01)
Message before base64 encoded:[02]A00[1c]1.28[03]K

What’s going on here, is the actual content you are sending are the strings “A00” and “1.28”.  It uses control characters shown in HEX to mark the start (02), a field separators (1c), and the end (03).  The ‘K’ on the end is a check character, and I’ve figured out how to generate that.  I have the part working where I use the Omnis functions bintobase64() and utf8tochar() to translate the message to base 64 including the check character then turn it into the string “AkEwMBwxLjI4A0s=“ as shown in the example, so I think that part is right.

If I type the above http string into a browser, it returns a good response.  But how do I format that for the Omnis HTTPGet?

HTTPGet (host,uri[,cgilist,hdrlist,service|port,secure {Default kFalse},verify {Default kTrue},map+ {Default kFalse}]) Returns socket

HTTPGet wants a uri, but there really isn’t one here.  And then it wants to send any parameters as part of a cgilist.  How do I translate "“ into Omnis HTTPGet?

Michael Houlberg
Houlberg Development, LLC
Manage your list subscriptions at http://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 

More information about the omnisdev-en mailing list