Python wrapper for Gladepay API
Project description
# Gladepay Python
![Build Status](https://gitlab.com/gladepay-apis/gladepay-python/badges/develop/build.svg)
GladePay is the leading digital payments provider with focus across African countries, dedicated to creating simple payments solution for African businesses. We are focused on building trust between buyers and sellers by providing simple solutions using the payment options (online or offline) preferred with complete security and efficiency.
A PYTHON Package Or library that simplifies payment with Gladepay APIs
To Learn more, visit www.gladepay.com.
## Installation
Install it yourself as:
$ pip install gladepaypython
## Usage
```python
from gladepaypython import Gladepay
initialize_vals = {
'action': 'initiate',
'paymentType': 'card',
'user': {
'firstname': 'Chinaka',
'lastname': 'Light',
'email': 'test@gmail.com',
'ip': '192.168.33.10',
'fingerprint': 'cccvxbxbxb'
},
'card': {
'card_no': '5438898014560229',
'expiry_month': '09',
'expiry_year': '19',
'ccv': '789',
'pin': '3310'
},
'amount': '10000',
'country': 'NG',
'currency': 'NGN'
}
merchant_id = "GP0000001" #Test Data
merchant_key = "123456789"
live = true #for live server, default false for test server
# Demp or Test Server Instance
gladepay = Gladepay(merchant_id, merchant_key) # Or
# gladepay = Gladepay(merchant_id, merchant_key, false) # Or
#LIVE SERVER Instance
# gladepay = Gladepay(merchant_id, merchant_key, true) # Or
#Get Response
gladepay.card_payment(self.initialize_vals['amount'], self.initialize_vals['country'], self.initialize_vals['currency'], self.initialize_vals['user'], self.initialize_vals['card'])
# If OTP is required
response = gladepay.validate_otp(response['txnRef'], '12345')
#Verify Transaction
response = gladepay.verify_transaction(response['txnRef'])
print response["message"] #Transaction Successful
#Other methods
#Get list of all Banks:
all_banks_response = gladepay.all_banks()
#Get list of banks that support account payments:
supported_banks_response = gladepay.supported_banks_account_payment
#Get Details of a card:
card_details_response = gladepay.card_details(card_number)
#Get the charges applicable to a card: (first six digit of the card no)
card_charges_response = gladepay.card_charges(amount, card_no)
#Get the charges applicable to an account
account_charges_response = gladepay.account_charges(amount)
#charge with token
response = gladepay.charge_with_token(
user,
token,
amount
)
#Perform Money transfer:
money_transfer_response = gladepay.money_transfer(amount, bankcode, account_number, 'Mark Silas', 'Narration')
#Verify status of Money transfer:
verify_money_transfer_response = gladepay.verify_money_transfer(txnRef)
#Verify Account Name:
account_name_verification_response = gladepay.verify_account_name(bankcode, account_number)
#Return Values
All methods return an array.
```
## Development
After checking out the repo, run
pip install -e .
## Contributing
Bug reports and pull requests are welcome on GitHub at https://gitlab.com/gladepay-apis/gladepay-python. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the Gladepay project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://gitlab.com/gladepay-apis/gladepay-python/blob/master/CODE_OF_CONDUCT.md).
![Build Status](https://gitlab.com/gladepay-apis/gladepay-python/badges/develop/build.svg)
GladePay is the leading digital payments provider with focus across African countries, dedicated to creating simple payments solution for African businesses. We are focused on building trust between buyers and sellers by providing simple solutions using the payment options (online or offline) preferred with complete security and efficiency.
A PYTHON Package Or library that simplifies payment with Gladepay APIs
To Learn more, visit www.gladepay.com.
## Installation
Install it yourself as:
$ pip install gladepaypython
## Usage
```python
from gladepaypython import Gladepay
initialize_vals = {
'action': 'initiate',
'paymentType': 'card',
'user': {
'firstname': 'Chinaka',
'lastname': 'Light',
'email': 'test@gmail.com',
'ip': '192.168.33.10',
'fingerprint': 'cccvxbxbxb'
},
'card': {
'card_no': '5438898014560229',
'expiry_month': '09',
'expiry_year': '19',
'ccv': '789',
'pin': '3310'
},
'amount': '10000',
'country': 'NG',
'currency': 'NGN'
}
merchant_id = "GP0000001" #Test Data
merchant_key = "123456789"
live = true #for live server, default false for test server
# Demp or Test Server Instance
gladepay = Gladepay(merchant_id, merchant_key) # Or
# gladepay = Gladepay(merchant_id, merchant_key, false) # Or
#LIVE SERVER Instance
# gladepay = Gladepay(merchant_id, merchant_key, true) # Or
#Get Response
gladepay.card_payment(self.initialize_vals['amount'], self.initialize_vals['country'], self.initialize_vals['currency'], self.initialize_vals['user'], self.initialize_vals['card'])
# If OTP is required
response = gladepay.validate_otp(response['txnRef'], '12345')
#Verify Transaction
response = gladepay.verify_transaction(response['txnRef'])
print response["message"] #Transaction Successful
#Other methods
#Get list of all Banks:
all_banks_response = gladepay.all_banks()
#Get list of banks that support account payments:
supported_banks_response = gladepay.supported_banks_account_payment
#Get Details of a card:
card_details_response = gladepay.card_details(card_number)
#Get the charges applicable to a card: (first six digit of the card no)
card_charges_response = gladepay.card_charges(amount, card_no)
#Get the charges applicable to an account
account_charges_response = gladepay.account_charges(amount)
#charge with token
response = gladepay.charge_with_token(
user,
token,
amount
)
#Perform Money transfer:
money_transfer_response = gladepay.money_transfer(amount, bankcode, account_number, 'Mark Silas', 'Narration')
#Verify status of Money transfer:
verify_money_transfer_response = gladepay.verify_money_transfer(txnRef)
#Verify Account Name:
account_name_verification_response = gladepay.verify_account_name(bankcode, account_number)
#Return Values
All methods return an array.
```
## Development
After checking out the repo, run
pip install -e .
## Contributing
Bug reports and pull requests are welcome on GitHub at https://gitlab.com/gladepay-apis/gladepay-python. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the Gladepay project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://gitlab.com/gladepay-apis/gladepay-python/blob/master/CODE_OF_CONDUCT.md).
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
gladepaypython-0.1.4.tar.gz
(5.7 kB
view details)
Built Distribution
File details
Details for the file gladepaypython-0.1.4.tar.gz
.
File metadata
- Download URL: gladepaypython-0.1.4.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcfbcb79476587edca7fe2a926d8521e595838a6c5f8b62f263cdb7c3c908d98 |
|
MD5 | 8a92f1e9a32bb93b1dee737cb4cbaab6 |
|
BLAKE2b-256 | b4b908458bf24faa3874584dfcaf10fa97aa4c1209487c2ab4a6e3f111454ff4 |
File details
Details for the file gladepaypython-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: gladepaypython-0.1.4-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d9a335d6efa14125f913d3e67233b2d709f5ce73c4b0b3f6bdf9299da37ac77 |
|
MD5 | 4ad56b5442fd03e56ba4cfdfeb6b446e |
|
BLAKE2b-256 | 4a1863322679fb6a111e969a8279b78126dac76d56c8cefce70da2080aca1323 |