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.4.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.4-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qatingg-2.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 be28e923d4bd954262a7f7a7093f76403654ef5f8879045cd6d198670dddac0a
MD5 a549711e42f8912e748ad523668eabd0
BLAKE2b-256 49863c2f08acc9fef06d6890d4b4b6408e6066982045b4b73e27301c10f439e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qatingg-2.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c7cad927c12b9113525def55a391283449a8e07269d82b24e2c3bb1997c6dfa3
MD5 8d3caedea2ba2fc66ccde04386b166ca
BLAKE2b-256 29ff60f4673e54330539200281737fb0d8691d99f190b687c02d9d235e80f6ec

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