Python library to manipulate Ingenico mobile payment device like iCT220 or iWL220 equipped with Telium Manager. RS232/USB.

Overview

Welcome to Ingenico for Human 👋

One of the few library that help you use this kind of hardware
Download Count /Month License: MIT Code Quality Badge Documentation Status Download Count Total

Python library to manipulate Ingenico mobile payment device equipped with Telium Manager. RS232/USB. Please note that every payment device with Telium Manager should, in theory, work with this.

PyPi

Python 2.7 support has been added to master branch since v2.3.0

pip install pyTeliumManager --upgrade
How to start using pyTeliumManager
# Import telium package
from telium import *

# Open device
my_device = Telium('/dev/ttyACM0')

# Construct our payment infos
my_payment = TeliumAsk.new_payment(
    12.5, 
    payment_mode='debit',  # other mode: credit or refund.
    target_currency='EUR',
    wait_for_transaction_to_end=True,  # If you need valid transaction status
    collect_payment_source_info=True,  # If you need to identify payment source
    force_bank_verification=False
)

# Send payment infos to device
try:
    if not my_device.ask(my_payment):
        print('Your device just refused your transaction. Try again.')
        exit(1)
except TerminalInitializationFailedException as e:
    print(format(e))
    exit(2)

# Wait for terminal to answer
my_answer = my_device.verify(my_payment)

if my_answer is not None:
    # Convert answered data to dict.
    print(my_answer.__dict__)
    
    # > {
    # '_pos_number': '01', 
    # '_payment_mode': '1', 
    # '_currency_numeric': '978', 
    # '_amount': 12.5, 
    # '_private': '0000000000', 
    # 'has_succeeded': True, 
    # 'transaction_id': '0000000000', 
    # '_transaction_result': 0, 
    # '_repport': '4711690463168807000000000000000000000000000000000000000', 
    # '_card_type': 
    #  {
    #      '_name': 'VISA', 
    #      '_regex': '^4[0-9]{12}(?:[0-9]{3})?$', 
    #      '_numbers': '4711690463168807', 
    #      '_masked_numbers': 'XXXXXXXXXXXX8807'
    #  }
    # }

if my_answer.has_succeeded:
    print("Your payment has been processed using a {0} card. Id: {1}".format(my_answer.card_type.name, my_answer.card_type.numbers))
else:
    print("Your payment was rejected. Try again if you wish to.")
How to enable computer liaison with Ingenico device
  1. Press "F" button
  2. Press 0 - Telium Manager
  3. Press 5 - Init
  4. Press 1 - Param
  5. Select - Checkout
  6. Select "Enable"
  7. Choose your preferred interface (USB, COM1, COM2)

Tested devices:

  • Ingenico iWL250
  • Ingenico iCT220
  • Ingenico iCT250

Should work with all i**2XX device equipped with Telium Manager app. Feel free to repport issue if your device isn't compatible with this package.

Won't work

  • All direct PinPad liaison, also known as iPP3XX. (see issue #2)

Q-A

Will this package cause loss of money in any way ?

  • You shouldn't worry about that, I've deployed it for a different store in 2015. No loss has been reported yet.
  • If you hesitate on how to use this package, feel free to ask me before using it.

My device isn't working with this package.

  • Make sure you've followed How to enable computer liaison with Ingenico device steps above beforehand.
  • If you're on Windows, make sure you've installed the correct driver.
  • Try every COM port, one by one.
  • On Linux it should be located at /dev/ttyACM0, if not run ls -l /dev/tty* | grep ACM to locate it.

Contributions

Feel free to propose pull requests. This project may be improved in many ways.

Comments
  • No option to select preferred interface

    No option to select preferred interface

    Thanks for the project I've got an iWL250. I can open Telium Manager, select 3 for initialization, then 1 for parameters, however I can't see "Checkout", only "Cash Connection"

    I can enable this but there is no follow up option to select the preferred interface.

    PC usb A to cradle usb B , PC Ubuntu 18.04 python 2.7

    Any ideas?

    opened by spiderrabbit 12
  • Unable to open ingenico ict220 liason Checkout not found

    Unable to open ingenico ict220 liason Checkout not found

    Hello, I'm trying to enable ingenico liason but the "checkout" is not available under menu you listed in "How to enable computer liaison with Ingenico device". And the connection does not work. Have you a solution?

    opened by c-amara 3
  • Working with devices

    Working with devices

    Greetings, first of all thank you for this library. You have clearly poured a lot of work into this, it looks promising, and there is nothing else like it out there.

    I would like to contribute as I am working on a startup in the retail and fine hardware space.

    I have an IWL250 production device. How can I connect it? Do I first need some kind of root access to the Ingenico machine? Is it possible, in your experience, to get test merchant numbers?

    Apologies of these questions are unreasonable or ill informed, I am just trying to get up and running.

    Many thanks

    Michael

    question 
    opened by michaelmorar 3
  • A non-intrusive way to check everything is OK

    A non-intrusive way to check everything is OK

    Hi. First of all, thank you for your work.

    In the documentation I did not see nothing about checking the terminal status. I would love such a feature. Ideally a Telium.is_ok() returning a boolean wether the terminal is ready or not (something may has happened with the software, the terminal wire may have been disconnected etc.)

    What do you think?

    good first issue 
    opened by azmeuk 3
  • Grammar&english

    Grammar&english

    Hi, I think this should be all the spelling mistakes in your docs fixed :smile:

    I saw your post on SF and thought I'd just quickly jump in. I made a couple of grammar adjustments too, but I saw some other grammar that I thought needs clarification, but can't find it now. I'll have to read through again sometime.

    Hope that helps.

    enhancement 
    opened by JedMeister 3
  • Add support for iPP3XX devices

    Add support for iPP3XX devices

    Support for iPP3XX mobile payment device

    To be clear, all iWL 2XX are currently supported and will still be supported there on next release.

    Next stage for pyTeliumManager is to support next gen mobile payment device. I'm targeting iPP 3XX devices.

    • [x] Buy iPP3XX standalone mobile payment device.
    • [x] Enable USB conn. on device.
    • [x] Search for dev docs or trying reverse engineering.
    • [ ] Adapt TeliumData classes.
    • [ ] Create submodule TCP/IP proxy through usb serial. (AT Command)
    • [ ] Tests
    enhancement help wanted 
    opened by Ousret 3
  • Test Case: test_payment is Failing with: TypeError: a new-style class can't have only classic bases

    Test Case: test_payment is Failing with: TypeError: a new-style class can't have only classic bases

    The test case test_payment.py is failing with the error: TypeError: a new-style class can't have only classic bases

    $ python test_payment.py 
    {
        "_amount": 12.5, 
        "_card_type": null, 
        "_currency_numeric": "978", 
        "_payment_mode": "0", 
        "_pos_number": "01", 
        "_private": "0000000000", 
        "_repport": "0000000000000000000000000000000000000000000000000000000", 
        "_transaction_result": 0, 
        "has_succeeded": true, 
        "transaction_id": "0000000000"
    }
    .E......
    ======================================================================
    ERROR: test_telium_ask_currencies_setter (__main__.TestTPE)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test_payment.py", line 68, in test_telium_ask_currencies_setter
        my_payment.currency_numeric = 'EUR'
      File "/home/pi/.local/lib/python2.7/site-packages/telium/payment.py", line 97, in currency_numeric
        currency = currencies.get(alpha_3=currency.upper())
      File "/home/pi/.local/lib/python2.7/site-packages/pycountry/db.py", line 40, in load_if_needed
        self._load()
      File "/home/pi/.local/lib/python2.7/site-packages/pycountry/db.py", line 67, in _load
        self.data_class_name, (self.data_class_base,), {})
    TypeError: a new-style class can't have only classic bases
    
    ----------------------------------------------------------------------
    Ran 8 tests in 0.058s
    
    FAILED (errors=1)
    

    Version of the project:

    commit d587d8edd713d929e0323d2a92546b5c60c2d52b (HEAD -> master, origin/master, origin/HEAD)
    Author: TAHRI Ahmed R <[email protected]>
    Date:   Fri Feb 28 22:54:48 2020 +0100
    
        Improve setup.py and expose version in package (#13)
        
        Some python version were missing and the description was not included on PyPi. And fix minors issues.
    
    
    $ python --version
    Python 2.7.16
    
    opened by JeanCarlosChavarriaHughes 2
  • 2.4.0 Release

    2.4.0 Release

    pyTeliumManager 2.4.0

    Changes :

    • Bugfix : Remove Cython from setup.py as it could lead to fatal error.
    • Bugfix : Remove hexdump as a dependency, it could make py2app, py2exe, .. to fail importing it. Replaced.
    • Bugfix : Fix support for Windows as ascii.curses is not easily available on it.
    • Improvement : Add is_ok method to check if your device respond to ENQ (at least).

    Thank you for using this lib. Hope it has served you well. Any PR would be appreciated. There is so much that can be done.

    enhancement 
    opened by Ousret 2
  • Doesn't work for my iCT220

    Doesn't work for my iCT220

    When trying to do the following:

    How to enable computer liaison with Ingenico device Press "F" button Press 0 - Telium Manager Press 5 - Init Press 1 - Param Select - Checkout Select "Enable" Choose your prefered interface (USB, COM1, COM2)

    There is no checkout option. I do have a cash connection option which I enabled. It doesn't give me an option to choose USB though. My M2OS is 47787809. Any suggestions?

    opened by aalejandraa2 2
  • Using test script defaults terminal to MAILORDER SALE

    Using test script defaults terminal to MAILORDER SALE

    Hi,

    I've been trying several different python based telium manager scripts, and they all have the same issue.

    Not sure where else to ask which is why i've raised an issue (sorry!)

    The device shows up under /dev/ttyUSB0 when I use a Serial --> USB A adapter from the 'magic box'.

    I run the test script, and this pops up on the terminal:

    MAILORDER SALE
    Key Card No.
    

    If I continue and put in fake card details and postcode etc, the payment is rejected (expected) and a receipt is printed showing the same value which was sent to it by the test script.

    My question is, why is it going to a mailorder sale, and not displaying the value of the transaction on the terminal itself?

    I would assume it is something to do with config of some sort on the device itself, however I've run over it several times and cannot find anything regarding it.

    opened by PeterAlabaster 2
  • "Payment terminal isn't ready to accept data from host."

    Got this error each time I try to run the example code:

    Payment terminal isn't ready to accept data from host. Check if terminal is properly configured or not busy.

    I checked /dev/ttyACM0. I enabled "Cash connection" on Telium Manager.

    Device: Ingenico iCT250 using standard USB cable.

    opened by jess-sys 2
Releases(2.4.2)
  • 2.4.2(Sep 18, 2021)

  • 2.4.0(Feb 23, 2020)

    ..3 years laters. Enjoy 👍 It is stable enough.

    Changes :

    • Bugfix : Remove Cython from setup.py as it could lead to fatal error.
    • Bugfix : Remove hexdump as a dependency, it could make py2app, py2exe, .. to fail importing it. Replaced.
    • Bugfix : Fix support for Windows as ascii.curses is not easily available on it.
    • Improvement : Add is_ok method to check if your device respond to ENQ (at least).

    Thank you for using this lib. Hope it has served you well. Any PR would be appreciated. There is so much that can be done.

    13k downloads and more to come. 🎉

    Source code(tar.gz)
    Source code(zip)
  • 2.3.0(Sep 29, 2017)

    Changes :

    • Support for native (rs232 <--> rj) serial conn. with device. b6d2b13
    • Enable postpone device open. 383d45f
    • Allow custom wait timeout for transaction result. 0c177bb
    • python 2.7 now supported through master branch. (six package now required) 345b736
    • New property: Get sha512 hashed payment source id. 02342f1
    • Minors improvements.
    Source code(tar.gz)
    Source code(zip)
  • 2.2.2(Aug 5, 2017)

  • 2.2.1(Aug 3, 2017)

  • 2.2.0(Jul 20, 2017)

    Python lib for Ingenico Telium Manager app

    Changes:

    • Can now identify fully qualified numbers and card type. (With Ousret/payment-card-identifier package)
    • TeliumData classes have now improved .dict output. See README.md for sample.
    • Minors improvements.
    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Jul 10, 2017)

    Python lib for Telium Manager 2.1.0

    Changes:

    • Set long timeout only when we have to wait for transaction ending.
    • Test suites available with simulated device.
    • Minors improvements.
    • Docs improvements.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.2(Jun 16, 2017)

    Python lib for Telium Manager 2.0.2

    Changes:

    • Can now decode raw response when immediate answer from device.
    • Auto create instance of Telium with static method Telium.get(), will find device based on most common path.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.1(Jun 14, 2017)

LifeSaver automatically, periodically saves USB flash drive data into the PC

LifeSaver automatically, periodically saves USB flash drive data into the PC. Theoriticaly it will work with any any connected drive ex - Hard Disk ,SSD ... But, can't handle Backing up multipatition

siddharth dhaka 4 Sep 26, 2021
A python library written for the raspberry pi.

A python package for using certain components on the raspberry pi.

Builder212 1 Nov 09, 2021
Real-time Coastal Monitoring at the University of Hawaii at Manoa

Coastal Monitoring at the University of Manoa Source code for Beaglebone/RPi-based data loggers, shore internet gateways, and web server. Software dev

Stanley Lio 7 Dec 07, 2021
A simple Python script for toggling Philips Hue Lights by clapping

LightsClap A simple Python script for toggling Philips Hue Lights by clapping Usage pip3 install -r requirements.txt python3 main.py and press the Ent

Flux Industries 2 Nov 16, 2021
A simple small scale electric car was build which can be driven by remote control and features a fully autonomous parking procedure.

personal-autonomous-parking-car-raspberry A simple electric car model was build using Raspbery pi. The car has remote control and autonomous operation

Kostas Ziovas 2 Jan 26, 2022
An IoT Trivia app that shows you how to take a JSON web API such as the opentdb.com API and stream and display it on a FeatherS2 in an OLED display.

CircuitPython IoT Trivia ESP32-S2 OLED Version An IoT Trivia app that shows you how to take a JSON web API such as the opentdb.com API and stream and

Kevin Thomas 1 Nov 27, 2021
Raspberry Pi Pico support for VS Code

Pico-Go VS Code Extension Pico-Go provides code auto-completion and allows you to communicate with your Raspberry Pi Pico board using the built-in REP

Chris Wood 114 Dec 28, 2022
ok-system-helper是一个简单的系统硬件的实时信息收集工具,使用python3.x开发

ok-system-helper ok-system-helper是一个简单的系统硬件的实时信息收集工具,使用python3.x开发,支持哪些硬件:CPU、内存、SWAP、磁盘、网卡流量。用户可在自己的项目中直接引入、开箱即用,或者结合flask等web框架轻松做成http接口供前端调用,亦可通过注

xlvchao 1 Feb 08, 2022
Hook and simulate global keyboard events on Windows and Linux.

keyboard Take full control of your keyboard with this small Python library. Hook global events, register hotkeys, simulate key presses and much more.

BoppreH 3.2k Dec 30, 2022
A rubiks cube timer using a distance sensor and a raspberry pi 4, and possibly the pi pico to reduce size and cost.

distance sensor cube timer A rubiks cube timer using a distance sensor and a raspberry pi 4, and possibly the pi pico to reduce size and cost. How to

3 Feb 21, 2022
A flexible data historian based on InfluxDB, Grafana, MQTT and more. Free, open, simple.

Kotori Telemetry data acquisition and sensor networks for humans. Documentation: https://getkotori.org/ Source Code: https://github.com/daq-tools/koto

83 Nov 26, 2022
It is a serial communicator(controller, receiver...), communicate with sensor LP20 which is a laser ranger.

Intro It is a serial communicator(controller, receiver...), communicate with sensor LP20 which is a laser ranger. Its datasheet is contained in this r

3 Sep 19, 2022
A refreshed Python toolbox for building complex digital hardware

A refreshed Python toolbox for building complex digital hardware

nMigen 1k Jan 05, 2023
Programming of Robotics Systems course at the University of Aveiro, Portugal, 2021-2022.

Programação de Sistemas Robóticos Miguel Riem Oliveira Universidade de Aveiro 2021-2022 Projeto AtlasCar Projecto RACE IROS 2014 AtlasCar2 ATOM IROS 2

Miguel Riem de Oliveira 22 Jul 13, 2022
ArucoFollow - A script for Robot Operating System and it is a part of a project Robot

ArucoFollow ArucoFollow is a script for Robot Operating System and it is a part

5 Jan 25, 2022
The robot is an autonomous small scale racing car using NVIDIA Jetson Nano.

The robot is an autonomous small scale racing car using NVIDIA Jetson Nano. This project utilizes deep learning neural network framework Keras/Tensorflow, together with computer vision library OpenCV

1 Dec 08, 2021
Monorepo for my Raspberry Pi dashboard and GPS satellite listener.

🥧 pi dashboard My blog post: Listening to Satellites with my Raspberry Pi This is the monorepo for my Raspberry Pi dashboard!

Andrew Healey 27 Jun 08, 2022
Sleep As Android integration for Home Assistant

Sleep As Android custom integration This integration will allow you to get events from your SleepAsAndroid application in a form of the sensor states

Igor 84 Dec 30, 2022
Iec62056-21-mqtt - Publish DSMR P1 telegrams acquired over IEC62056-21 to MQTT

IEC 62056-21 Publish DSMR P1 telegrams acquired over IEC62056-21 to MQTT. -21 is

Marijn Suijten 1 Jun 05, 2022
Sensor of Temperature Feels Like for Home Assistant.

Please ⭐ this repo if you find it useful Sensor of Temperature Feels Like for Home Assistant Installation Install from HACS (recommended) Have HACS in

Andrey 60 Dec 25, 2022