Python Kipo KPG Library: make payment easy with kipo
Python Kipo KPG Library make it easy to stablish payment with kipo gateway.
Installation
Add KipoKPG files to Your project
or simply run
pip install kipo-kpg
Quick Start and Examples
Initial Kipo KPG and request shopping key from kipo server.
from KipoKPG import KipoKPG
"""
Initial Kipo Library and craete object from KipoKPG class
Merchant key is merchant phone number
"""
kipo = KipoKPG("YOUR MERCHANT KEY")
"""
Replace "YOUR CALLBACK URL" and "AMOUNT" with what you want
kpg_initiate return a Dictionary
Successful - {"status": True, "shopping_key": SHOPING_KEY}
Failed - {"status": false, "message": ERROR_CODE}
"""
kpg_initiate = kipo.kpg_initiate(AMOUNT, 'YOUR CALLBACK URL')
if kpg_initiate['status']:
"""
Store kpg_initiate["shopping_key"] to session to verfiy
payment after user came back from gateway
Call render_form function to render a html form and send
user to Kipo KPG Gateway (you can create this form manually
where you want - form example is at the end of Quick Start
"""
kipo.render_form(kpg_initiate['shopping_key'])
else:
"""
Show error to user
You can call getErrorMessage and send error code to that as input
and get error message
kipo.get_error_message(ERROR_CODE)
"""
Verify payment after user return back to CALLBACK URL
"""
Replace "SHOPPING_KEY" with your SHOPPING_KEY that you taken from
Initiate function
kpg_inquery return a dictionary for result
Successful - {"status": True, "referent_code": REFERENT_CODE}
Failed - {"status": False, "message": ERROR_CODE}
"""
kpg_inquery = kipo.kpg_inquery(SHOPPING_KEY)
# Get shopping key after kpg_initiate called
kipo.get_shopping_key()
# Get referent code after kpg_inquery called
kipo.get_referent_code()
Properties
"""
URL of Kipo server - https://kpg.kipopay.com:8091/V1.0/processors/json/
This server create shopping key and
"""
kipo.request_url
"""
URL of Kipo KPG - http://webgate.kipopay.com/
Shopping key must post to this url with SK name
"""
kipo.kipo_webgate_url
HTML Form to transfer user to KPG
<form id="kipopay-gateway" method="post" action="KIPO_WEBGATE_URL" style="display: none;">
<input type="hidden" id="sk" name="sk" value="SHOPING_KEY"/>
</form>
<script language="javascript">document.forms['kipopay-gateway'].submit();</script>
Metadata
Release files for kipo-kpg 1.2
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 | Actions |
|---|---|---|---|---|
| kipo_kpg-1.2.tar.gz | 2.6 kB | Without provenance | Details for kipo_kpg-1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kipo_kpg-1.2-py3-none-any.whl | Python 3 | none | any | Details for kipo_kpg-1.2-py3-none-any.whl |
Total release size: 5.9 kB
Release files / kipo_kpg-1.2.tar.gz
| Download URL | kipo_kpg-1.2.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50b8805a5d8d3a92374dfc0c04b49f07b161961d78753beadded493d36d0f76e
|
|
BLAKE2b-256 checksum How to use checksums |
2baea240da118a7007c4a3a23c847703ee5b878da0af5e822a1081541eb32303
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3
|
Release files / kipo_kpg-1.2-py3-none-any.whl
| Download URL | kipo_kpg-1.2-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ded4b9d3f878be7f5a6aa8976e2e5409578f7c6ced9fc674fadea5cf5b1d02a
|
|
BLAKE2b-256 checksum How to use checksums |
4a8a6fff59eb4175fe1762c3e5136d8acf308641450f4159f426a1ffa243e244
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3
|
Security for kipo-kpg 1.2
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.