SapiHost payment page SDK
This is a set of libraries in the Python language to ease integration of your service with the SapiHost Payment Page.
Please note that for correct SDK operating you must have at least Python 3.5.
Payment flow
Installation
Install with pip
pip install sapihost-sdk
Get URL for payment
from payment_page_sdk.gate import Gate
from payment_page_sdk.payment import Payment
gate = Gate('secret')
payment = Payment('402')
payment.payment_id = 'some payment id'
payment.payment_amount = 1001
payment.payment_currency = 'USD'
payment_url = gate.get_purchase_payment_page_url(payment)
payment_url here is the signed URL.
Handle callback from SapiHost
You'll need to autoload this code in order to handle notifications:
from payment_page_sdk.gate import Gate
gate = Gate('secret')
callback = gate.handle_callback(data)
data is the JSON data received from payment system;
callback is the Callback object describing properties received from payment system;
callback implements these methods:
callback.get_payment_status()Get payment status.callback.get_payment()Get all payment data.callback.get_payment_id()Get payment ID in your system.
Metadata
Release files for sapihost-sdk 1.0.0
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 | |
|---|---|---|---|---|
| sapihost-sdk-1.0.0.tar.gz | 7.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sapihost_sdk-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.5 kB
Release files / sapihost-sdk-1.0.0.tar.gz
| Download URL | sapihost-sdk-1.0.0.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b12c16ae77037a234c7ec333b9df75ab97dab1ef139c57060b4002bcc860a790
|
|
BLAKE2b-256 checksum How to use checksums |
22258cc2f35ac1e673777053b4b36c7f02d9fc50f2b1e013442982a88c1111c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / sapihost_sdk-1.0.0-py3-none-any.whl
| Download URL | sapihost_sdk-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ecbf5f343570378d6f7e991887fa74d2fd88589a6b2b1a5f183fdb51ad0d1774
|
|
BLAKE2b-256 checksum How to use checksums |
b7916d982a684c25ee4b8f9d8cf9ffa29f73eab5a08ce3c36bbeb7b9f0d2d008
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Security for sapihost-sdk 1.0.0
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.