Skip to content

AltaPay/sdk-python

 
 

Repository files navigation

image

image

image

This is an unofficial Python SDK for AltaPay (formerly Valitor/Pensio), https://altapay.com/. The SDK is maintained by Coolshop.com, https://www.coolshop.com/.

Requirements

  • Python (3.6, 3.7, 3.8, 3.9)

Other versions of Python may also be supported, but these are the only versions we test against.

Dependencies

  • responses
  • requests
  • six

Installation

The easiest way is using pip.

pip install altapay

Contributing

Currently, this library only implements the bare minimum of the AltaPay API. It will allow you to create payment links, and do basic subscription functionality. If you need anything else, feel free to submit a full request, or if you have ideas, open an issue.

If you do decide to submit a pull request, do note that both isort and flake8 (including pep8-naming) are run for all pull requests. You are also advised to write test cases.

Running the Tests

First of all, install supported python versions by running below command

sudo add-apt-repository -y ppa:deadsnakes/ppa && sudo apt-get install -y python3.6 python3.7 python3.8 python3.9

For installing tox and all other dependencies run below commands

python -m pip install --upgrade pip && pip install responses requests six isort flake8 nose tox

Once you have tox installed along with all dependencies, simply run:

tox

This will run all tests, against all supported Python versions.

For running integration tests only, go to test/integration/__init__.py and set all required values. Then run the below command

python3 -m unittest test_merchant_api.py

Changelog

See Changelog for all the release notes.

License

Distributed under the MIT License. See LICENSE for more information.

Documentation

For more details please see AltaPay docs