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)

a library for using WS2812b leds (aka neopixels) with Raspberry Pi Pico

pico_ws2812b a library for using WS2812b leds (aka neopixels) with Raspberry Pi Pico You'll first need to save the ws2812b.py file to your device (for

76 Nov 25, 2022
Nordpool_diff custom integration for Home Assistant

nordpool_diff custom integration for Home Assistant Requires https://github.com/custom-components/nordpool Applies non-causal FIR differentiator1 to N

Joonas Pulakka 45 Dec 23, 2022
A module for cross-platform control of the mouse and keyboard in python that is simple to install and use.

PyUserInput PyUserInput is a group project so we've moved the project over to a group organization: https://github.com/PyUserInput/PyUserInput . That

Paul Barton 1k Dec 27, 2022
A simple non-official manager interface I'm using for my Raspberry Pis.

My Raspberry Pi Manager Overview I have two Raspberry Pi 4 Model B devices that I hooked up to my two TVs (one in my bedroom and the other in my new g

Christian Deacon 21 Jan 04, 2023
Volta: A Virtual Assistant which increases your productivity with time as you use it…

Volta Official Documentation Overview & Purpose Volta: A Virtual Assistant which increases your productivity with time as you use it… Volta, developed

Abeer Joshi 1 Jan 14, 2022
Alternative firmware for ESP8266 with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at

Alternative firmware for ESP8266/ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability

Theo Arends 59 Dec 26, 2022
Raspberry Pi & Accelerometer with Losant's EEA

Raspberry Pi & Accelerometer with Losant's EEA This is a repository that contains companion code to this EEA How To guide. Each folder is named accord

Losant 1 Oct 29, 2021
Aqara Camera G3 integration for Home Assistant

Aqara Camera G3 integration for Home Assistant ATTENTION: The component only works after enabled telnet. Only supportd stream. Not support still image

14 Dec 18, 2022
Event-based hardware simulation framework

An event-based multi-device simulation framework providing configuration and orchestration of complex multi-device simulations.

Diamond Light Source Controls Group 3 Feb 01, 2022
Self Driving Car Prototype

Package Delivery Rover 🚀 This project is a prototype of Self Driving Car. It's based on embedded systems, to meet the current requirement of delivery

Abhishek Pawar 1 Oct 31, 2021
Programmable Rainbow Redstone Computer

Programmable Rainbow Redstone Computer Table of contents What is it? Program flasher How to use it What is it? PRRC is Programmable Rainbow Redstone C

Fern H 2 Jun 07, 2022
OpenStickFirmware is open source software designed to handle any and all tasks required in a custom Fight Stick

OpenStickFirmware is open source software designed to handle any and all tasks required in a custom Fight Stick. It can handle being the brains of your entire stick, or just handling the bells and wh

Sleep Unit 23 Nov 24, 2022
Python library to manipulate Ingenico mobile payment device like iCT220 or iWL220 equipped with Telium Manager. RS232/USB.

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

TAHRI Ahmed R. 72 Dec 24, 2022
a fork of the OnionShare software better optimized for lower spec lightweight machines and ARM processors

OnionShare-Optimized A fork of the OnionShare software better optimized for lower spec lightweight machines and ARM processors such as Raspberry Pi or

ALTPORT 4 Aug 05, 2021
SALUS THERMOSTAT Custom component for Home-Assistant

Home-Assistant Custom Components Custom Components for Home-Assistant (http://www.home-assistant.io) Salus Thermostat Climate Component My device is R

21 Dec 18, 2022
Cow Feeder is a bot automatically execute trade on cowswap

Cow Feeder is a bot automatically execute trade on cowswap, includes functions: Monitoring Ethereum network gas price and execute trade whe

6 Apr 20, 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
Code for the paper "Planning with Diffusion for Flexible Behavior Synthesis"

Planning with Diffusion Training and visualizing of diffusion models from Planning with Diffusion for Flexible Behavior Synthesis. Guided sampling cod

Michael Janner 310 Jan 07, 2023
Estimation of whether or not the persons given information will have diabetes.

Diabetes Business Problem : It is desired to develop a machine learning model that can predict whether people have diabetes when their characteristics

Barış TOKATLIOĞLU 0 Jan 20, 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