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

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.6.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

  • Download URL: sslcommerz-python-package-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 89eed27357b8b2f0cd1a5ad306b2b2bca99b579072e743e97196af4046c182db
MD5 64a45a8ed309c9f8d946f3cc31449410
BLAKE2b-256 3d2654ac46e19e3600dee6b8cf102cdf9e4cc65f0f4a48486d5dcfafdbc399c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sslcommerz_python_package-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a80fa9283ecb98319bc3e168dcd7bff27fa317bf26f0567f8bcc7c8ed36af244
MD5 b72044a5124673452a360330697109a8
BLAKE2b-256 4e55c21e80d1fcf12966cc459d9a460eb8922036474cd60954e84f441aeb48b7

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