Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Optionally setup a virtual environment (requires the virtualenv python package):

virtualenv env
source env/bin/activate

Install the package dependencies:

pip install -r requirements.txt
pip install -r test_requirements.txt

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

Format the package files using black:

black setup.py securionpay/ tests/

Documentation

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

About

No description, website, or topics provided.

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.