Just finished a project to integrate Privatbank‘s Ingenico POS terminals with 1C:Enterprise – purchases, refunds etc. with automated Bonus+ handling.

The result is a stable self-contained Debian linux image which can be installed into VM or physical server, and serve as universal interface with simple API to process card payments.

In general, 1C:Enterprise which is used for processing sales, has integration with such terminals. But there are serious problems with it:

  • frequent client app crashes in the middle of payment processing
  • incorrect handling of some errors – there are some cases when POS processes payment and reports success, but 1C:Enterprise gets an error
  • no support for Bonus+ loyalty system, so cashier should enter this information manually, which is error-prone

Because of that customer decided to make own integration which will be free of those errors.

That terminals can work in a few modes, depending on configuration – standalone, USB connection, Ethernet connection. Also, with USB connection there are two different protocols supported – 4in1 and BPOS. With Ethernet connection, only BPOS is available.
As customer wanted to reduce hassle with many wires, that often getting broken, or having poor connection – we chose to use Ethernet connection.

To eliminate app crashes in the middle of payment, and ease futher possibilities of system modernization, we decided to use “proxy” middleware, which talks to POS terminals using bank-supplied library, and a module to 1C:Enterprise to talk to that middleware.
So, the payment process goes like:
1. The client app sends HTTP request to middleware, sending transaction details – amount, merchant to use, etc.
2. Middleware parses params, checks which IP address it should talk to and processes card payment with terminal
3. When terminal returns success or failure, returns the transaction result as a response to HTTP request – so client app can process the result.
Also there is an admin page to add/edit/remove terminals, show details, etc.

As for now, the created integration is working well for a few months improving customer’s business.

Leave a Reply