Simple python package
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Getting Started
This python library was created with the purpose of facilitating the integration of our payment api to our partners. It is an ongoing work. Suggestions to ameliorate the api are welcome.
Ecommerce integration
Let's suppose you want to integrate ecommerce payments on you system. Here are the two main steps to get the job done in the development environment. You an uncomment the code to test the others apis.
from afrikpay_pip_sdk import Ecommerce
#testing some ecommerce api
ecommerce = Ecommerce(
'AFC6617',
'661671d0bd7bef499e7d80879c27d95e',
'7777',
'http://34.86.5.170:8086/api/ecommerce/collect/',
'http://34.86.5.170:8086/api/ecommerce/payout/',
'http://34.86.5.170:8086/api/ecommerce/deposit/',
'http://34.86.5.170:8086/api/ecommerce/changekey/',
'http://34.86.5.170:8086/api/ecommerce/transaction/status/')
#ecommerce payment with mtn
response = ecommerce.collect(
'mtn_mobilemoney_cm',
'677777777',
4000,
'123456'
)
print(response)
# ecommerce payment with orange
# response = ecommerce.collect(
# 'orange_money_cm',
# '699999999',
# 400,
# 0000
# )
#print(response)
#response = ecommerce.deposit()
#print(response)
# change ecommerce apikey
#response = ecommerce.changeKey()
#print(response)
# get ecommerce transaction status
#response = ecommerce.transactionStatus('128_1622044090')
#print(response)
Bill integration
If you want to integrate bill payments apis on you system, here are the two main steps to get the job done in the development environment. You an uncomment the code to test the others apis.
from afrikpay_pip_sdk import Bill
#testing bill api
bill = Bill(
'3620724907638658',
'3620724907638658',
'e825e83873eafffff315fc3f22db2d59',
'afrikpay',
'http://34.86.5.170:8086/api/bill/v2/',
'http://34.86.5.170:8086/api/bill/getamount/',
'http://34.86.5.170:8086/api/bill/status/v2/')
#camwater
response = bill.payBill(
'camwater',
'111111111111111',
1000,
'cash',
'96543'
)
print(response)
# response = bill.getBillAmount(
# 'camwater',
# '111111111111111',
# )
#print(response)
# response = bill.getBillStatus(
# '96543',
# )
# print(response)
#eneoprepay
# response = bill.payBill(
# 'eneoprepay',
# '014111111111',
# 1000,
# 'cash',
# 'qsde14'
# )
# print(response)
# response = bill.getBillAmount(
# 'eneoprepay',
# '014111111111',
# )
# print(response)
# response = bill.getBillStatus(
# 'qsde14',
# )
# print(response)
Airtime integration
If you want to integrate airtime apis on you system, here are the two main steps to get the job done in the development environment. You an uncomment the code to test the others apis.
from afrikpay_pip_sdk import Airtime
#testing airtime apis
airtime = Airtime(
'3620724907638658',
'3620724907638658',
'e825e83873eafffff315fc3f22db2d59',
'afrikpay',
'http://34.86.5.170:8086/api/airtime/v2/',
'http://34.86.5.170:8086/api/airtime/status/v2/')
response = airtime.makeAirtime(
'mtn',
'677777777',
1000,
'cash',
'123456789'
)
print(response)
# response = airtime.airtimeStatus(
# '123456789'
# )
# print(response)
Account integration
If you want to integrate account apis on you system, here are the two main steps to get the job done in the development environment. You an uncomment the code to test the others apis.
from afrikpay_pip_sdk import Account
#testing account apis
account = Account(
'3620724907638658',
'3620724907638658',
'e825e83873eafffff315fc3f22db2d59',
'http://34.86.5.170:8086/api/account/transaction/status/',
'http://34.86.5.170:8086/api/account/agent/balance/v2/',
'http://34.86.5.170:8086/api/account/developer/changekey/')
response = account.balance()
print(response)
How to switch to production ?
You can explore the src folder to see the default production setup. Just use the appropriate apikey, store code, agentid for production. If you have any problem using the library please contact us, we will be happy to help you.
License
Contact
Project Link: https://github.com/Georges-Ngandeu/SimplePythonPackage
Acknowledgements
Metadata
Release files for afrikpay-pip-sdk 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| afrikpay_pip_sdk-0.0.3.tar.gz | 7.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| afrikpay_pip_sdk-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.2 kB
Release files / afrikpay_pip_sdk-0.0.3.tar.gz
| Download URL | afrikpay_pip_sdk-0.0.3.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27e0995531f6346c98660a2d6d4f34698524751e90d218cbbccd589a839ce18b
|
|
BLAKE2b-256 checksum How to use checksums |
065cd4d505bfb0ce5089077e25357ed2e3adb2d0df59401a2134ef7bb5de1119
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.8
|
Release files / afrikpay_pip_sdk-0.0.3-py3-none-any.whl
| Download URL | afrikpay_pip_sdk-0.0.3-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b49b7d5a689e1762bd12d39d1914c4baeb503e9f7d60d01f36232c2cc33ff6a6
|
|
BLAKE2b-256 checksum How to use checksums |
46eb4eed565fec3d91e66b18d8769d58b33253c485bd2e7e3ab94677580e1960
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.8
|
Security for afrikpay-pip-sdk 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.