The Bancard Python connector provides Python APIs to create, process and manage payments.
Project description
Getting Started
This library allows developers to integrates their Python backend applications to the Bancard VPOS API.
This library works with the following Python versions: 2.6, 2.7, 3.3, 3.4, 3.5, 3.6
Prerequisites
See the requirements.txt file to see which Python libraries will be required.
Usage in Staging or Production
You can either include this library from:
https://github.com/vcajes/bancard-connector-python
Or install the library from the PYPI repository:
pip3 install bancardconnectorpython
Usage in development
Downlaod and install Python (2.6 <= version <= 3.6).
Run pip3 install bancardpythonconnector.
Import and use library in your source code: from decimal import Decimal from bancardconnectorpython import connector, BancardAPI, BancardAPIException.
This will autoconfigure the connector from the following OS environment variables:
BANCARD_ENVIRONMENT=sandbox|production
BANCARD_PUBLIC_KEY=your_public_key
BANCARD_PRIVATE_KEY=your_private_key
bancard_api = bancardpythonconnector.connector
or you could just create your own BancardAPI
bancard_api = BancardAPI(environment=BancardAPI.ENVIRONMENT_SANDBOX, public_key=your_public_key, private_key=your_private_key)
Running tests
Download and install Python (2.6 <= version <= 3.6)
Install the library from PYPI: pip install bancardconnectorpython
View the Python tests under the ./tests/ folder for examples of how to use it.
Modify the global variables TEST_BANCARD_PUBLIC_KEY and TEST_BANCARD_PRIVATE_KEY from the test files with the values provided by Bancard.
Run any of the tests, i.e.: python /path/to/tests/test_bancard_rollback.py
Versioning
For the versions available, see the tags on this repository
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
Hashes for bancardconnectorpython-0.5.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56fe6552184ded38e0691cf4271625766a51b220af7e5cecb5c03ad16807ba1e |
|
MD5 | b866294b02a395cf818f152d07f7d55c |
|
BLAKE2b-256 | d8a9c4d430fe25505d3c2c0c28fa169a78ca4af4250773d49bdefa6ceebd97a0 |