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)

Universal Xiaomi MIoT integration for Home Assistant

Xiaomi MIoT Raw 简体中文 | English MIoT 协议是小米智能家居从 2018 年起推行的智能设备通信协议规范,此后凡是可接入米家的设备均通过此协议进行通信。此插件按照 MIoT 协议规范与设备通信,实现对设备的状态读取及控制。

1.9k Jan 02, 2023
The software that powers the sPot: a 4th generation

This code is meant to accompany this project in which a Spotify client is built into an iPod "Classic" from 2004. Everything is meant to run on a Raspberry Pi Zero W.

Guy Dupont 683 Dec 28, 2022
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
Home solar infrastructure (with Peimar Inverter) monitoring based on Raspberry Pi 3 B+ using Grafana, InfluxDB, Custom Python Collector and Shelly EM.

raspberry-solar-mon Home solar infrastructure (with Peimar Inverter) monitoring based on Raspberry Pi 3 B+ using Grafana, InfluxDB, Custom Python Coll

cislow 10 Dec 23, 2022
HomeAssistant - Polyaire AirTouch 4 Integration

HomeAssistant - Polyaire AirTouch 4 Integration Custom integration to add an AirTouch 4 AC Controller Installation: Copy contents of custom_components

7 Aug 05, 2022
Automatic Watering System using Soil Moisture Sensor and RTC Timer with Arduino

Automatic-Watering-System - Technical Answers to Real-World Problems. Evolution of Watering Manually to Watering Automatically.

Vaishnavi Pothugunta 4 Dec 31, 2021
Fener ROS2 package version 2

Fener's ROS2 codes that runs on the vehicle. This node contains basic sensing and actuation nodes for vehicle control. Also example applications will be added.

Muhammed Sezer 1 Jan 18, 2022
a weather application for the raspberry pi and the Pimorioni Inky pHAT.

raspi-weather a weather application for the raspberry pi and the Inky pHAT

Derek Caelin 59 Oct 24, 2022
USB Rubber Ducky with the Rasberry Pi pico microcontroller

pico-ducky Install Install and have your USB Rubber Ducky working in less than 5 minutes. Download CircuitPython for the Raspberry Pi Pico. Plug the d

AnOnYmOus001100 3 Oct 08, 2022
ROS2 nodes for Waveshare Alphabot2-Pi mobile robot.

ROS2 for Waveshare Alphabot2-Pi This repo contains ROS2 packages for the Waveshare Alphabot2-Pi mobile robot: alphabot2: it contains the nodes used to

Michele Rizzo 2 Oct 11, 2022
Sleep Functionality for Adafruit MacroPad RP2040

Adafruit-MacroPad-RP2040 Sleep Functionality for Adafruit MacroPad RP2040 Details This is a modification of AdaFruit project bundle found here specifi

9 Dec 18, 2022
Ansible tools for operating and managing fleets of Blinksticks in harmony using the Blinkstick Python library.

Ansible tools for operating and managing fleets of Blinksticks in harmony using the Blinkstick Python library.

Greg Robinson 3 Aug 10, 2022
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
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
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
Python module for the qwiic serial control motor driver

Qwiic_SCMD_Py Python module for the qwiic motor driver This python package is a port of the existing SparkFun Serial Controlled Motor Driver Arduino L

SparkFun Electronics 6 Dec 06, 2022
A set of postprocessing scripts and macro to accelerate the gyroid infill print speed with Klipper

A set of postprocessing scripts and macro to accelerate the gyroid infill print speed with Klipper

Jérôme W. 75 Jan 07, 2023
ok-system-helper是一个简单的系统硬件的实时信息收集工具,使用python3.x开发

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

xlvchao 1 Feb 08, 2022
A lightweight script for updating custom components for Home Assistant

Updater for Home Assistant This is a lightweight script for updating custom components for Home Assistant. If for some reason you do not want to use H

Alex X 12 Sep 21, 2022
Monitor Live USB Plug In & Plug Out Events

I/O - Live USB Monitoring Author: Jonathan Scott @jonathandata1 Date: 3/13/2021 CURRENT VERSION 1.0 This is just a simple bash script that calls a pyt

Jonathan Scott 17 Dec 03, 2022