Skip to main content

Implements SSLCOMMERZ payment gateway in python based web apps (python 3.8+).

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 pysslcmz

Projected use

from pysslcmz.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'), 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')

# If you want to post some additional values
mypayment.set_additional_values(value_a='cusotmer@email.com', value_b='portalcustomerid', value_c='1234', value_d='uuid')

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

pysslcmz-1.1.3.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

pysslcmz-1.1.3-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file pysslcmz-1.1.3.tar.gz.

File metadata

  • Download URL: pysslcmz-1.1.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.11.3 Linux/5.15.0-1037-azure

File hashes

Hashes for pysslcmz-1.1.3.tar.gz
Algorithm Hash digest
SHA256 fc1e8e013a9e8dc500748eb7efc0a6e3bb9073e6913a76bb914e8dd2d7ae1681
MD5 79a9dd0097b70915d15491b2591aca5a
BLAKE2b-256 7b089d36d85e5811021666d3dc429b4f742582bbe9a4ebd4a345deea4f476611

See more details on using hashes here.

File details

Details for the file pysslcmz-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: pysslcmz-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.11.3 Linux/5.15.0-1037-azure

File hashes

Hashes for pysslcmz-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c5a729d5c6cc9f3ecd0c46a4ab0f93b6debdc4bc2f683f76710e2e47432c1448
MD5 4adf77824d18c781db1eb28c6fbaea3c
BLAKE2b-256 a0496ee82faf60bb502a453cc026faaae2dd827dff4440c35eb28cdb7e95dfa1

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