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'), 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Close
Hashes for sslcommerz_python-0.0.5-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f8290b316f44ee66279a326fc3b47315b07229d4ae5e30c53a3219a4353aa1b |
|
MD5 | ae2ceb8afcda1bad69ffb5439aad7d7e |
|
BLAKE2b-256 | 2ba5b88361678c04a7e5b46ad5ee99038816374b00d05958531a5684fe26c8e9 |
Close
Hashes for sslcommerz_python-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e26d789bf86cc711cbb5e5b9352149f066628a2847318bfc538026f1490e21cd |
|
MD5 | b97342e7a2951363073a26752784641f |
|
BLAKE2b-256 | 44cee3525f8911906a6e8c1fe90f618498975d04d1caaee1955609d042928f13 |