Skip to main content

Cellulant QA adapter

Project description

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:

Example url

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qatingg-2.0.5.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qatingg-2.0.5-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file qatingg-2.0.5.tar.gz.

File metadata

  • Download URL: qatingg-2.0.5.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for qatingg-2.0.5.tar.gz
Algorithm Hash digest
SHA256 a00adfd9768348456526098e467fb1c026cc671f4773aee1ca961ef347864213
MD5 3071d863aff217c4e7bde6348c9ac521
BLAKE2b-256 3efeadc450bb29d0c6806986552bc0805e89f22ef8437bcdc46269c00dcc0c2d

See more details on using hashes here.

File details

Details for the file qatingg-2.0.5-py3-none-any.whl.

File metadata

  • Download URL: qatingg-2.0.5-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for qatingg-2.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 88a1803d4968e0b4c9eaf266ab9802ba60b013e3a65129dd5d2d6809500ddbd0
MD5 61e1efe3d637a5f39bf933a6e8a7e053
BLAKE2b-256 738964203e949f721ceaabb799223aca380d79f164fa434fea609e1a24dfe4fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page