CELLULANT EXPRESS
qatingg
Python adapter for Cellulant Tingg express checkout version 2.1
To install: pip install qatingg
For all calls you first have to initiate the adapter with your credentials You can find your credentials over here: Developer portal
Params
| Param | Required | Description |
|---|---|---|
| client id | True | Used to Encrypt |
| client secret | True | Used to Encrypt |
| service code | True | Used to Encrypt |
| access_key | True | Used to Encrypt |
| domain | True | specify environment: staging or sandbox |
| url | True | Used to pass custom url |
| path | True | Used to pass custom path |
adapter = MulaAdapter(<client id>, <client secret>, <service code>, <access_key>, <domain>, <url> , <path>)
domain: User have two options.These are cellulant's testing environments:
STAGING
or
SANDBOX
or
LOCAL
adapter.get_encryption(
msisdn='0730xxxxxxx',
customer_first_name='John',
customer_last_name='Doeh',
customer_email='john.doeh@jd.com',
transaction_id='<unique>',
account_number='066564ACC',
amount=1000,
currency_code='KES',
country_code='KE',
description='Air ticket',
due_date='2019-10-01 12:12:00', or int(30) #Minutes
payer_client_code='i8UytECD',
language_code='en',
success_url='http://callbackurl.com/success',
fail_url='http://callbackurl.com/fail',
callback_url='http://callbackurl.com/callback'
)
due_date: User can pass the number of minutes( int) for the session or use cellulant data format(''Y-m-d H:M:S'')
To get the express page:
checkout_type: Cellulant have several ways of checkout
Example:
-------------
modal
express
themed-checkout
---------------
Note: Add payer client code, ONLY if you're testing single payment option'
This will return checkout response as a url.
Example below:
Code Sample
import sys
from tingg.adapters import TinggAdapter
import random
def get_response():
init = TinggAdapter(iv_key="h3tckgMNxxxxx",
secret_key="Nmxx6546xxxxxx",
access_key="$2a$08$wQ2ghgfhgfhfghfh64564",
service_code="EWWW5763434",
domain="SANDBOX",
url="http://localhost:3020",
path="/"
)
response = init.get_encryption(msisdn='0724565xxxx',
customer_first_name='John',
customer_last_name='Doeh',
customer_email='john.doeh@jd.com',
transaction_id=random.randint(0, sys.maxunicode),
account_number='3434364ACC',
amount=1000,
currency_code='UGX',
country_code='UG',
description='Air ticket',
checkout_type="express",
due_date=30, # or "2019-12-12 12:12:12"
payer_client_code='',
language_code='en',
success_url='http://callbackurl.com/success',
fail_url='http://callbackurl.com/fail',
callback_url='http://callbackurl.com/callback'
)
#To see code returned
print(response)
return response
Tests
Running tests
python setup.py test
Metadata
Release files for qatingg 2.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qatingg-2.0.5.tar.gz | 5.8 kB | Without provenance | Details for qatingg-2.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qatingg-2.0.5-py3-none-any.whl | Python 3 | none | any | Details for qatingg-2.0.5-py3-none-any.whl |
Total release size: 13.3 kB
Release files / qatingg-2.0.5.tar.gz
| Download URL | qatingg-2.0.5.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a00adfd9768348456526098e467fb1c026cc671f4773aee1ca961ef347864213
|
|
BLAKE2b-256 checksum How to use checksums |
3efeadc450bb29d0c6806986552bc0805e89f22ef8437bcdc46269c00dcc0c2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
|
Release files / qatingg-2.0.5-py3-none-any.whl
| Download URL | qatingg-2.0.5-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
88a1803d4968e0b4c9eaf266ab9802ba60b013e3a65129dd5d2d6809500ddbd0
|
|
BLAKE2b-256 checksum How to use checksums |
738964203e949f721ceaabb799223aca380d79f164fa434fea609e1a24dfe4fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
|
Security for qatingg 2.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.