withkash / kash_python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kash API Python Client

This is the KASH API client for the the Server facing API.

Create a client connected to the test environment: from kash import SecretClient

sk = '<secret key>'
customerId = '<customer id>'
sc = SecretClient(secretKey=sk, test=True)

Create an an authorization for payment:

try:
    authorizationDict = sc.createAuthorization(customerId, '2000')
    authorizationId = authorizationDict['authorization_id']
except Exception as e:
    print e

Clear an authorization:

try:
    sc.removeAuthorization(authorizationId)
except Exception as e:
    print e

Create a transaction:

try:
    authorizationDict = sc.createAuthorization(customerId, '2000')
    authorizationId = authorizationDict['authorization_id']
except Exception as e:
    print e

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%