SDK for python application to use Alternative Payments
Project description
ApPythonSdk
===================================
Alternative Payments python libary sdk. Accept local payments from all over the world
Installation
-----
Install gem, using pip:
$ pip install ap-python-sdk
In your initializing files add line:
import ap_python_sdk
ap_python_sdk.api_secret_key = 'sk_test_sqJojfKHxRJu0jHFac7bNwf4gQ9HlatcJHTGn03o'
ap_python_sdk.api_public_key = 'pk_test_qwes24d548h8rg74r5d423c1vx4few8f4qr7q9wd'
Usage
-----
For usage and examples check `http://www.alternativepayments.com/support/api/` or sample application on our open-source repo `https://github.com/AlternativePayments/ap-python-sdk`
Example of creating new customer:
customer = Customer.create(
{
'firstName': 'John',
'lastName': 'Doe',
'email': 'tempmail@mail.com',
'address': 'Rutledge Ave 409',
'city': 'Folsom',
'zip': '19033',
'country': 'US',
'state': 'PA',
'phone': '55555555555',
'created': '2016-03-24T15:19:10.7800694Z'
}
);
Accessing object's attributes:
customer.firstName
=> John
Same goes for complex objects like Transaction.
Create SEPA transaction:
customer = Customer(
id='cus_bd838e3611d34d598',
firstName='John',
lastName='Doe',
email='john@doe.com',
country='DE'
)
payment = Payment(
paymentOption='SEPA',
holder='John Doe',
iban='BE88271080782541'
)
return Transaction.create({
'customer': customer,
'payment': payment,
'amount': 500,
'currency': 'EUR',
'description': 'test sepa php sdk',
'merchantPassThruData': 'test_sepa_123',
'iPAddress': '127.0.0.1'
})
Access customer:
transaction.customer.firstName
Development
-----
To release a new version, update the version number in `version.py`, and then run `python setup.py sdist bdist_wheel upload -r https://pypi.python.org/pypi` to create a new version of library and deploy it to `https://pypi.python.org/pypi/ap_python_sdk`
Contributing
-----
1. Fork it ( https://github.com/AlternativePayments/ap-python-sdk/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
===================================
Alternative Payments python libary sdk. Accept local payments from all over the world
Installation
-----
Install gem, using pip:
$ pip install ap-python-sdk
In your initializing files add line:
import ap_python_sdk
ap_python_sdk.api_secret_key = 'sk_test_sqJojfKHxRJu0jHFac7bNwf4gQ9HlatcJHTGn03o'
ap_python_sdk.api_public_key = 'pk_test_qwes24d548h8rg74r5d423c1vx4few8f4qr7q9wd'
Usage
-----
For usage and examples check `http://www.alternativepayments.com/support/api/` or sample application on our open-source repo `https://github.com/AlternativePayments/ap-python-sdk`
Example of creating new customer:
customer = Customer.create(
{
'firstName': 'John',
'lastName': 'Doe',
'email': 'tempmail@mail.com',
'address': 'Rutledge Ave 409',
'city': 'Folsom',
'zip': '19033',
'country': 'US',
'state': 'PA',
'phone': '55555555555',
'created': '2016-03-24T15:19:10.7800694Z'
}
);
Accessing object's attributes:
customer.firstName
=> John
Same goes for complex objects like Transaction.
Create SEPA transaction:
customer = Customer(
id='cus_bd838e3611d34d598',
firstName='John',
lastName='Doe',
email='john@doe.com',
country='DE'
)
payment = Payment(
paymentOption='SEPA',
holder='John Doe',
iban='BE88271080782541'
)
return Transaction.create({
'customer': customer,
'payment': payment,
'amount': 500,
'currency': 'EUR',
'description': 'test sepa php sdk',
'merchantPassThruData': 'test_sepa_123',
'iPAddress': '127.0.0.1'
})
Access customer:
transaction.customer.firstName
Development
-----
To release a new version, update the version number in `version.py`, and then run `python setup.py sdist bdist_wheel upload -r https://pypi.python.org/pypi` to create a new version of library and deploy it to `https://pypi.python.org/pypi/ap_python_sdk`
Contributing
-----
1. Fork it ( https://github.com/AlternativePayments/ap-python-sdk/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ap_python_sdk-0.0.6.tar.gz
(10.4 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ap_python_sdk-0.0.6.tar.gz.
File metadata
- Download URL: ap_python_sdk-0.0.6.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
686814077d34d32867328e0ab1396131d58c6354537ebbeb79182c43637ed061
|
|
| MD5 |
6265e16d2d5330d896568981ad2302fc
|
|
| BLAKE2b-256 |
2486878fac182d590d35bc3376461fe6ca227a3c670836223a90ac12f98f1867
|
File details
Details for the file ap_python_sdk-0.0.6-py3-none-any.whl.
File metadata
- Download URL: ap_python_sdk-0.0.6-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5db73ff50b7c2b3f5795310e02acb505078f9f125b659e8c684014f2f49faadd
|
|
| MD5 |
5640524e664691808e83c57961478552
|
|
| BLAKE2b-256 |
2ffa96976bd846440951b2b699476cdbc59e203bddd64aae9894768584bddc44
|
File details
Details for the file ap_python_sdk-0.0.6-py2-none-any.whl.
File metadata
- Download URL: ap_python_sdk-0.0.6-py2-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c73dc41886b095263c4e9ea97688d9b8eae507793590e563e467a0e620e2332c
|
|
| MD5 |
1275a384b10fe2458c03afb7082b59e3
|
|
| BLAKE2b-256 |
88e04ed1b12513130a5f1d8d9f5b9ac51c224e80622dd5b783d65b9a8ad23cf3
|