Skip to main content

Cellulant QA adapter

Project description

CELLULANT EXPRESS

qatingg

Python adapter for Cellulant Tingg express checkout version 2.0

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
adapter = MulaAdapter(<client id>, <client secret>, <service code>, <access_key>, <domain>)

domain: User have two options.These are cellulant's testing environments:

STAGING 
or 
SANDBOX
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"
                        )

    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.2.tar.gz (5.5 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.2-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qatingg-2.0.2.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for qatingg-2.0.2.tar.gz
Algorithm Hash digest
SHA256 f6d855a1b29f5f58e6455232f84f5ca36cb7dcc33087a0589619fafa78a41e69
MD5 eeb965e12bddc899a9b64661fb6e0dda
BLAKE2b-256 35d0c56a54932fb00d67edcfd62a61d9b9fe5974732675d0b73336fed052c238

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qatingg-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for qatingg-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dffde7d80dd0b138a461600e9c9810741e7dd46aabba3faae3e6684f86be455b
MD5 13a4dc2552d11ec2dd1035df4d45257f
BLAKE2b-256 b823b8a8df753765f06d351fe1e813ec79867b782cb13f1d5bda1e355a822dd4

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