What PyGestPayCrypt is
PyGestPayCrypt is a Python library that implements the GestPayCrypt and GestPayCryptHS classes for integrating with the Banca Sella GestPay online payment system. Created in 2003, it allowed Python and Zope developers to handle credit card transactions directly from their web applications, without having to rely on the official implementations available only for ASP, PHP and Java.
How it works
The library handles the full GestPay transaction flow:
- Encryption — assembles the transaction parameters (amount, currency, transaction ID, buyer data) and sends them to the GestPay server to obtain an encrypted string
- Decryption — receives the encrypted return string from the gateway and decodes it to extract the outcome, authorization code, and any errors
- Parsing — analyses the decrypted response and populates the object attributes (amount, transaction status, error code, alert, card data)
Communication takes place via HTTP GET to the ecomm.sella.it servers, using the proprietary format with #cryptstring# / #decryptstring# tags.
Historical context
In 2003 Italian payment gateways only provided SDKs for the mainstream languages of the time. PyGestPayCrypt was one of the first Python implementations for an Italian banking gateway, enabling GestPay adoption in projects built on Zope and Plone — platforms in which noze was deeply specialised.
noze’s role
The library was designed and developed by Stefano Noferi at noze, and distributed as Open Source on SourceForge. It included both the pure Python module (GestPayCrypt.py) and a Zope/CMF package (CMFGestPay) for direct integration into Plone portals.
License
PyGestPayCrypt is distributed under the GNU Lesser General Public License v2.0 (LGPLv2), which allows its use in proprietary projects as long as modifications to the library itself remain open source.
Project status
The project is archived on SourceForge. It is no longer in active development — the GestPay gateway itself has undergone numerous evolutions over time.