diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..335ea9d --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018 The Python Packaging Authority + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 7e76046..79de534 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,10 @@ Provides a python module to implement payment gateway in python based web apps. ## Projected use ```python -from sslcommerz_python import SSLCPayment +from sslcommerz_python.payment import SSLCSession +from decimal import Decimal -mypayment = SSLCPayment(sslc_is_sandbox=True, sslc_store_id='your_sslc_store_id', sslc_store_pass='your_sslc_store_passcode') +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') diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/__pycache__/_constants.cpython-37.pyc b/__pycache__/_constants.cpython-37.pyc deleted file mode 100644 index e6a6d46..0000000 Binary files a/__pycache__/_constants.cpython-37.pyc and /dev/null differ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3f16fe7 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,13 @@ +astroid==2.3.3 +certifi==2019.11.28 +chardet==3.0.4 +idna==2.8 +isort==4.3.21 +lazy-object-proxy==1.4.3 +mccabe==0.6.1 +pylint==2.4.4 +requests==2.22.0 +six==1.13.0 +typed-ast==1.4.0 +urllib3==1.25.7 +wrapt==1.11.2 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..1268f44 --- /dev/null +++ b/setup.py @@ -0,0 +1,38 @@ +import setuptools + +with open("README.md", "r") as fh: + long_description = fh.read() + +requires = [ + 'astroid==2.3.3', + 'certifi==2019.11.28', + 'chardet==3.0.4', + 'idna==2.8', + 'isort==4.3.21', + 'lazy-object-proxy==1.4.3', + 'mccabe==0.6.1', + 'requests==2.22.0', + 'six==1.13.0', + 'typed-ast==1.4.0', + 'urllib3==1.25.7', + 'wrapt==1.11.2' +] + +setuptools.setup( + name="sslcommerz-python", + version="0.0.5", + author="Shahed Mehbub", + author_email="shahed739@gmail.com", + description="Implements SSLCOMMERZ payment gateway in python based web apps.", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/shahedex/sslcommerz-payment-gateway-python", + packages=setuptools.find_packages(), + install_requires=requires, + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], + python_requires='>=3.6', +) \ No newline at end of file diff --git a/sslcommerz_python/__init__.py b/sslcommerz_python/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sslcommerz_python/__pycache__/__init__.cpython-37.pyc b/sslcommerz_python/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..fa0bcdf Binary files /dev/null and b/sslcommerz_python/__pycache__/__init__.cpython-37.pyc differ diff --git a/sslcommerz_python/__pycache__/_constants.cpython-37.pyc b/sslcommerz_python/__pycache__/_constants.cpython-37.pyc new file mode 100644 index 0000000..b8166c4 Binary files /dev/null and b/sslcommerz_python/__pycache__/_constants.cpython-37.pyc differ diff --git a/__pycache__/sslcommerz_python.cpython-37.pyc b/sslcommerz_python/__pycache__/payment.cpython-37.pyc similarity index 68% rename from __pycache__/sslcommerz_python.cpython-37.pyc rename to sslcommerz_python/__pycache__/payment.cpython-37.pyc index da8bb66..742114a 100644 Binary files a/__pycache__/sslcommerz_python.cpython-37.pyc and b/sslcommerz_python/__pycache__/payment.cpython-37.pyc differ diff --git a/_constants.py b/sslcommerz_python/_constants.py similarity index 100% rename from _constants.py rename to sslcommerz_python/_constants.py diff --git a/sslcommerz_python.py b/sslcommerz_python/payment.py similarity index 98% rename from sslcommerz_python.py rename to sslcommerz_python/payment.py index 75cef0d..d09a685 100644 --- a/sslcommerz_python.py +++ b/sslcommerz_python/payment.py @@ -4,10 +4,10 @@ import requests import json -import _constants as const +import sslcommerz_python._constants as const -class SSLCPayment: +class SSLCSession: sslc_is_sandbox : bool sslc_store_id : str sslc_store_pass : str