Metadata-Version: 2.1
Name: sslcommerz-python-package
Version: 0.0.7
Summary: Implements SSLCOMMERZ payment gateway in python based web apps.
Home-page: https://github.com/sazzadhossain881/sslcommerz-python-1.0.0
Author: Sazzad Hossain
Author-email: sajjadhossain342@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: astroid==2.3.3
Requires-Dist: certifi==2019.11.28
Requires-Dist: chardet==3.0.4
Requires-Dist: idna==2.8
Requires-Dist: isort==4.3.21
Requires-Dist: lazy-object-proxy==1.4.3
Requires-Dist: mccabe==0.6.1
Requires-Dist: requests==2.22.0
Requires-Dist: six==1.13.0
Requires-Dist: typed-ast==1.4.0
Requires-Dist: urllib3==1.25.7
Requires-Dist: wrapt==1.11.2

# SSLCOMMERZ Payment Gateway implementation in Python
Provides a python module to implement payment gateway in python based web apps.

## Installation
Via PIP
```bash
pip install sslcommerz-python-package==0.0.7
```
## Projected use
```python
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
```python
>>> response_data['status']
SUCCESS
>>> response_data['sessionkey']
F650E87F23DD2A8FFCB4E4E333C13B28
>>> response_data['GatewayPageURL']
https://sandbox.sslcommerz.com/EasyCheckOut/testcdef650e87f23dd2a8ffcb4234fasf3b28
```

### When Failed
> status

> failedreason

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