Skip to main content

No project description provided

Project description

Build Status

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

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:

  1. callback.get_payment_status() Get payment status.
  2. callback.get_payment() Get all payment data.
  3. callback.get_payment_id() Get payment ID in your system.

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

sapihost-sdk-1.0.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sapihost_sdk-1.0.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file sapihost-sdk-1.0.0.tar.gz.

File metadata

  • Download URL: sapihost-sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for sapihost-sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b12c16ae77037a234c7ec333b9df75ab97dab1ef139c57060b4002bcc860a790
MD5 480722f5b252a19952566565e8d65528
BLAKE2b-256 22258cc2f35ac1e673777053b4b36c7f02d9fc50f2b1e013442982a88c1111c6

See more details on using hashes here.

File details

Details for the file sapihost_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sapihost_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for sapihost_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ecbf5f343570378d6f7e991887fa74d2fd88589a6b2b1a5f183fdb51ad0d1774
MD5 93f01c934116985e9d475629ae9e3b7f
BLAKE2b-256 b7916d982a684c25ee4b8f9d8cf9ffa29f73eab5a08ce3c36bbeb7b9f0d2d008

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page