Python client for ČSOB Payment Gateway
Project description
Python client for ČSOB payment gateway
Latest CircleCI build:
Install:
pip install pycsob
Run tests:
python setup.py test
Usage:
from pycsob.client import CsobClient, CsobClientError
from pycsob import conf
c = CsobClient('MERCHANT_ID', 'https://iapi.iplatebnibrana.csob.cz/api/v1.6/',
'/path/to/your/private.key',
'/path/to/mips_iplatebnibrana.csob.cz.pub')
# init payment
# note: total_amount = 20000.00
r = c.payment_init(1, 2000000, 'https://return.url/', 'Some note', customer_id='a@a.aa')
assert r['resultCode'] == conf.RETURN_CODE_OK
c.payment_status(r['payId'])
c.payment_close(r['payId'])
# ...
# init payment and also create template for one-click payment
r = c.payment_init(2, 2000000, 'https://return.url/', 'Some note', customer_id='a@a.aa',
return_method='POST', pay_operation='oneclickPayment')
# init one-click payment
r = c.oneclick_init(r['payId'], 123, 10000)
# start (process) one-click payment
r = c.oneclick_start(r['payId'])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pycsob-0.1.0.tar.gz
(7.6 kB
view details)
Built Distribution
File details
Details for the file pycsob-0.1.0.tar.gz
.
File metadata
- Download URL: pycsob-0.1.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e260a13ba9ed61ecea0878708c270b8775cf6e7e139b36f1cea7a5aa14fff040 |
|
MD5 | f2e51797dba911b72f190964c8a4f026 |
|
BLAKE2b-256 | cda25850525445f6844f91922f1cba6afccf138d6a607c9bfae685a4242723e0 |
File details
Details for the file pycsob-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pycsob-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb30db8bc17152d114eaa4354f58fef74e672c6b201bce720e864816fa50ac8c |
|
MD5 | c0f62846aa2efe8a21f0d6d133132178 |
|
BLAKE2b-256 | 392e76d4410d61318e1eccd95ddc7ef30b6bb5211e7c85cd1ae6e8864e8f59b3 |