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==0.0.7

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

Uploaded Source

Built Distribution

File details

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

File metadata

  • Download URL: sslcommerz-python-package-0.0.7.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.7.tar.gz
Algorithm Hash digest
SHA256 557cf8ba0a337d5c9633e0b5f823e54c17dee5fe7bc86c8c8bad023f2b2fb205
MD5 d757cc468723d9833d5da04c635e182f
BLAKE2b-256 56ff2a826d7b5cab002eb4186974f818c501263a8f13f8434c8221af6ec9dfd4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sslcommerz_python_package-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 5.4 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 86cabd35d621f041ac20d103ed0fa1c2d7fe5587e9709feb3985f1e249a31ff7
MD5 f9979f20e3566e5cebf507ed47fa0f94
BLAKE2b-256 b21dd163f2cc31645e218a9801ddc507f0a953aed98f0bc4f1d643000b1584f3

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