No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
securionpay
tests
.gitignore
.travis.yml
LICENSE
README.md
requirements.txt
setup.py
test_requirements.txt

README.md

Python library for SecurionPay API

Build Status Code Climate

Installation

pip install securionpay

Quick start

import securionpay as api
api.private_key = 'pk_test_myprivatekey'

try:
    customer = api.customers.create({
        'email': 'user@example.com',
        'description': 'User description'
    })
    card = api.cards.create(customer['id'], {
        'number': '4242424242424242',
        'expMonth': '12',
        'expYear': '2020',
        'cvc': '123',
        'cardholderName': 'John Smith'
    })
    charge = api.charges.create({
        'amount': 1000,
        'currency': 'EUR',
        'customerId': card['customerId']
    })
except securionpay.SecurionPayException as e:
    print(e)

API reference

When params is one of method arguments please refer to detailed API docs (linked) for all available fields

Developing

To connect to different backend:

import securionpay as api
api.private_key = 'pk_test_myprivatekey'
api.url = 'http://mysecurionenv.com'

To run unit tests and check test coverage:

nosetests -w tests/unit --with-coverage --cover-package=securionpay
coverage report -m

To run integration tests:

PRIVATE_KEY=pk_test_myprivatekey nosetests -w tests/integration

Documentation

For further information, please refer to our official documentation at https://securionpay.com/docs.