Skip to main content

Implements SSLCOMMERZ payment gateway in python based web apps.

Project description

SSLCOMMERZ Payment Gateway implementation in Python

Provides a python module to implement payment gateway in python based web apps.

Installation

Via PIP

pip install sslcommerz-python-package

Projected use

from sslcommerz_python.payment import SSLCSession
from decimal import Decimal

mypayment = SSLCSession(sslc_is_sandbox=True, sslc_store_id='your_sslc_store_id', sslc_store_pass='your_sslc_store_passcode')

mypayment.set_urls(success_url='example.com/success', fail_url='example.com/failed', cancel_url='example.com/cancel', ipn_url='example.com/payment_notification')

mypayment.set_product_integration(total_amount=Decimal('20.20'), tran_id='123', currency='BDT', product_category='clothing', product_name='demo-product', num_of_item=2, shipping_method='YES', product_profile='None')

mypayment.set_customer_info(name='John Doe', email='johndoe@email.com', address1='demo address', address2='demo address 2', city='Dhaka', postcode='1207', country='Bangladesh', phone='01711111111')

mypayment.set_shipping_info(shipping_to='demo customer', address='demo address', city='Dhaka', postcode='1209', country='Bangladesh')

response_data = mypayment.init_payment()

Response parameters

When Successfull with Auth and Payloads provided

status

sessionkey

GatewayPageURL

Example

>>> response_data['status']
SUCCESS
>>> response_data['sessionkey']
F650E87F23DD2A8FFCB4E4E333C13B28
>>> response_data['GatewayPageURL']
https://sandbox.sslcommerz.com/EasyCheckOut/testcdef650e87f23dd2a8ffcb4234fasf3b28

When Failed

status

failedreason

Example

>>> response_data['status']
FAILED
>>> response_data['failedreason']
'Store Credential Error Or Store is De-active'

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

sslcommerz-python-package-0.0.8.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file sslcommerz-python-package-0.0.8.tar.gz.

File metadata

  • Download URL: sslcommerz-python-package-0.0.8.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for sslcommerz-python-package-0.0.8.tar.gz
Algorithm Hash digest
SHA256 1eab49ad0bbabe358606d1cfd08bcae6efd37a3d5758d34bf0d5c51ca7bfc57d
MD5 c23378fccfdff457639e02da94843298
BLAKE2b-256 6527ed3151e3fae3e9c5cebd44690462b301301f6565577b26f6066f5b1d9c05

See more details on using hashes here.

File details

Details for the file sslcommerz_python_package-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: sslcommerz_python_package-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for sslcommerz_python_package-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2fe8cfb07a7f809087cd1e2b798ea9f467989f77c9c32807fd449e0578681127
MD5 2300043aba8ccd7c5d7e84e6ff34c3ab
BLAKE2b-256 68a2fdb4dcc0e38612bf1a4aa8b73b9b90bc366a1881fbb78f00d6be89c21ffc

See more details on using hashes here.

Supported by

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