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.1.tar.gz
(7.6 kB
view details)
Built Distribution
File details
Details for the file pycsob-0.1.1.tar.gz
.
File metadata
- Download URL: pycsob-0.1.1.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a91cfb07d38f5677f9a051dd088ff9c6ad828951cc03b8ad037afe5591035bf6 |
|
MD5 | f5dcf7ead27852b1f522d7ad72c66d4e |
|
BLAKE2b-256 | 6528e488ce0f6ec077e10ae9f78dc7bddafe71b8511014c1ce6f6545f813d768 |
File details
Details for the file pycsob-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: pycsob-0.1.1-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 | e7285354db1472da3fad5a737a2a3e10fb010019830f3193283969df7f470ff4 |
|
MD5 | 96f4276ad6a91ab4e86b792ca6af5efa |
|
BLAKE2b-256 | f58ad5dc8324c49dd4f602bb9f687b17c1634f082aae97234a14a23a08d419ed |