Skip to main content

Python bindings for Bangladesh payment gateway SDK

Project description

bd-payment-gateway-py

Python package + PyO3 extension for bd-payment-gateway.

Python Support

  • Python 3.9+ supported (built with abi3, minimum ABI 3.9; tested on 3.14 in CI)

Install (PyPI)

pip install bd-payment-gateway
uv add bd-payment-gateway

Local Tooling

Use uv locally for Python dependency and command execution.

source $HOME/.local/bin/env
cd bd-payment-gateway-py
uv sync --group dev

Build

source $HOME/.local/bin/env
cd bd-payment-gateway-py
uv run maturin build --release --features all-providers

Build only one provider:

source $HOME/.local/bin/env
uv run maturin build --release --features portwallet

Typed API

Primary public API for SSLCOMMERZ:

  • bd_payment_gateway.sslcommerz.SslcommerzClient
  • bd_payment_gateway.sslcommerz.models
    • Settings
    • Urls
    • Customer
    • Product
    • InitiatePaymentRequest
    • VerifyPaymentRequest

The compiled extension is internal (bd_payment_gateway._bd_payment_gateway_py). Application code should use the facade and models, not raw dict payloads.

Extension-level provider classes still support JSON/mapping configs and can accept optional http_settings keys:

  • timeout_ms
  • max_retries
  • initial_backoff_ms
  • max_backoff_ms
  • user_agent

Smoke Test Example

Run SSLCOMMERZ sandbox full-flow test (real initiate + verify polling):

cd bd-payment-gateway-py
uv run python examples/smoke_test.py

Recommended environment variables (override temporary hardcoded sandbox credentials):

export SSLCOMMERZ_STORE_ID="your_store_id"
export SSLCOMMERZ_STORE_PASSWD="your_store_passwd"
export SSLCOMMERZ_RETURN_BASE_URL="https://your-registered-domain.com"

Or create a local examples/.env file from examples/.env.example.

Typing

  • The package is typed (py.typed included).
  • Extension stubs are provided at python/bd_payment_gateway/_bd_payment_gateway_py.pyi.
  • Pydantic v2 + pydantic-settings are required runtime dependencies.

Error Contract

Use bd_payment_gateway.errors.PaymentGatewayError.

Structured fields:

  • code
  • message
  • hint
  • provider_payload

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

bd_payment_gateway-0.1.3.tar.gz (93.3 kB view details)

Uploaded Source

Built Distributions

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

bd_payment_gateway-0.1.3-cp39-abi3-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.9+Windows x86-64

bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_28_aarch64.whl (3.1 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

bd_payment_gateway-0.1.3-cp39-abi3-macosx_11_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

bd_payment_gateway-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file bd_payment_gateway-0.1.3.tar.gz.

File metadata

  • Download URL: bd_payment_gateway-0.1.3.tar.gz
  • Upload date:
  • Size: 93.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bd_payment_gateway-0.1.3.tar.gz
Algorithm Hash digest
SHA256 bd1292567efc3bdcec0ddac13e4c23b7fcfb9af9812022b83624a71bbce131bb
MD5 84eb15a7468d0227b1ffc24b32c472b9
BLAKE2b-256 e6e11aa3a8fbf2e8c7d9a9721283858f2488fdc08f90abb93183e764a6297103

See more details on using hashes here.

Provenance

The following attestation bundles were made for bd_payment_gateway-0.1.3.tar.gz:

Publisher: publish-python.yml on Barrzen/bd-payment-gateway

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bd_payment_gateway-0.1.3-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for bd_payment_gateway-0.1.3-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 cec99d2e2c70422d9930fa1611817c64ab956ea8ffe00da86cb391ebbf9a946d
MD5 6fc2b896051c9a495f545ed2e81eda9e
BLAKE2b-256 158ddf64b75e74c5951bc480595e6196c5646f317b5d201227fdeb2f4f7ab343

See more details on using hashes here.

Provenance

The following attestation bundles were made for bd_payment_gateway-0.1.3-cp39-abi3-win_amd64.whl:

Publisher: publish-python.yml on Barrzen/bd-payment-gateway

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 476167eb297da4382bbeae2087a96cf9a2541833433c5fd23440ba5ad6de908a
MD5 096230766737b4f4b361af9bead98618
BLAKE2b-256 d48385f3e5c459943cb264aacb39c265361f4e7527d404f63423431fb642f569

See more details on using hashes here.

Provenance

The following attestation bundles were made for bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_28_aarch64.whl:

Publisher: publish-python.yml on Barrzen/bd-payment-gateway

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 19808a4376f3c58acbfe9da1f099ad55c095fb3e6790efea7738ffdc99d262e7
MD5 684465ce8bb32d75daf10f5389a92aae
BLAKE2b-256 99992e3976d6f87dd897e6fe2c8831c66d4c04541f58877f800fc78e9b83c18c

See more details on using hashes here.

Provenance

The following attestation bundles were made for bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-python.yml on Barrzen/bd-payment-gateway

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bd_payment_gateway-0.1.3-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bd_payment_gateway-0.1.3-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 62f3211fcd6780ffc628a7007280aeadeae1b1e4ed0111d2ef9da6b063465965
MD5 ed0e7f94f4eab326bc2dc03e0e57968f
BLAKE2b-256 1aaa1edb128b298209445d7d8e32efd62e3f7f3d9465a7985eb64a3a732454dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for bd_payment_gateway-0.1.3-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: publish-python.yml on Barrzen/bd-payment-gateway

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bd_payment_gateway-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for bd_payment_gateway-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1905c30b4f61fa47927b0f14500c8a5a975b69c1ef4888bb2dfb6fcd202185ef
MD5 c6a9c868d2c4fa92c77f2cc07933fbd9
BLAKE2b-256 3ddbba48377bd2d2f2f70c427b8560fc2747d6e487798f476b5e81816e8b78ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for bd_payment_gateway-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: publish-python.yml on Barrzen/bd-payment-gateway

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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