diff --git a/LICENSE b/LICENSE index c495768..28c546d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 SnakeFcz +Copyright (c) 2017 Renjith S Raj Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..72769cc --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,7 @@ +Copyright 2017 @ Renjith S Raj + +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/MANIFEST b/MANIFEST new file mode 100644 index 0000000..af74d91 --- /dev/null +++ b/MANIFEST @@ -0,0 +1,10 @@ +# file GENERATED by distutils, do NOT edit +setup.cfg +setup.py +payu_biz/__init__.py +payu_biz/note.py +payu_biz/payu_config.py +payu_biz/payu_hash.py +payu_biz/payubiz.py +payu_biz/urls.py +payu_biz/views.py diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..e3c9dee --- /dev/null +++ b/README.rst @@ -0,0 +1,122 @@ +Django Payubiz +=================== + +Python Package for PayuBiz Payment Gateway for Django Based Applications. + +Developer ![#f03c15] +===================== + +These packages in the developement stage, its cool package for the payu payment gateway. + +payu_biz is wrapper for payubiz payment gateway for django based web application. I can see the internet many of the developers are asking about following doubts. + + 1. Getting error while creatig hash value + 2. Redirection is not happening + 3. transaction failure + + +Installation +=================== + +Install django_payubiz from PYPI repository or clone the package from the +[django_payubiz repo](https://github.com/renjithsraj/django_payubiz.git) + +==================== +pip install payu_biz +==================== + +Settings +========== + Step 1 : + + Include the `payu_biz` package in to the INSTALLED_APPS + + INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'home', + 'payu_biz' ## Package + ) + + Include payu_biz urls in your project(project/urls.py) + + urlpatterns = patterns('', + # Examples: + url(r'^$', 'home.views.home', name='home'), + url(r'^', include('payu_biz.urls')), + ) + + Step 2: + + Add following parameters in the project settings.py(project/settings.py) + Note : For the Testing purpose you don't need to include these parameters in the projects. + + PAYMENT_MODE + ============ + The value should be one of the items from the list ['production', 'test'] + PAYMENT_MODE = "production" ` `default will be "test"` + ========================================================================== + + MERCHANT_KEY + ============ + merchant_key from payu. default value will be included builtin in the package. + MERCHANT_KEY = "xxxxxxxx" + =========================================================================== + + MERCHANT_SALT + ============= + merchant_salt from payu. default value will be included builtin in the package. + MERCHANT_SALT = "xxxxxxxx" + ============================================================================ + + SUCCESS_URL + ============ + Where to redirect while transaction is succeeded. + SUCCESS_URL = "www.example.com/success/" ` `default will be "http://127.0.0.1:8000/payubiz-success/" + ============================================================================= + + FAILURE_URL + ============= + Where to redirect while transaction got failure. + FAILURE_URL = "www.example.com/failure/" ` `default will be "http://127.0.0.1:8000/payubiz-failure/" + ============================================================================== + + CANCEL_URL + ============= + Where to redirect while transaction got canceld + CANCEL_URL = "www.example.com/cancel/" ` `default will be "http://127.0.0.1:8000/payubiz-cancel/" + =============================================================================== + +Integration. +============ + + payu_biz integration in your project.Add following snippts in your views.py(project/home/views.py) + + `from payu_biz.views import make_transaction + `def home(request): + """ DO your stuffs here and create a dictionary (key,value pair) """ + cleaned_data = { + 'txnid': "aaaaassss", 'amount': 450000, 'productinfo': "sample_produ", + 'firstname':"renjith", 'email': "renjithsraj@live.com", 'udf1': '', + 'udf2': '', 'udf3': '', 'udf4': '', 'udf5': '', 'udf6': '', 'udf7': '', + 'udf8': '', 'udf9': '', 'udf10': '','phone':"9746272610" + } + """ Payment gate calling with provided data dict """ + return make_transaction(cleaned_data) + +Note +===== + + The following keys must be there in your `cleaned_data` dict + + * txnid - Unique + * amount + * productinfo - small description + * firstname - user firstname + * email - user email id (Payu will send the transaction details with this mail) + * phone - + * udf1 - udf10 - Chumma(Just simply if you want to add any details you can add) diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..224a779 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[metadata] +description-file = README.md \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..d5bd1db --- /dev/null +++ b/setup.py @@ -0,0 +1,31 @@ +import sys +import os +from os.path import join, dirname, split +from setuptools import setup + +LONG_DESCRIPTION = """ +Django Sauth is an easy to setup social authentication/registration +mechanism with support for several auth providers. +""" + + +# def long_description(): +# """Return long description from README.rst if it's present +# because it doesn't get installed.""" +# try: +# return open(join(dirname(__file__), 'README.rst')).read() +# except IOError: +# return LONG_DESCRIPTION + +setup( + name = 'payu_biz', + packages = ['payu_biz'], # this must be the same as the name above + version = '1.1', + description = LONG_DESCRIPTION, + author = 'Renjith S Raj', + author_email = 'renjithsraj@live.com', + url = 'https://github.com/renjithsraj/django_payubiz/tree/master/payu_biz', # use the URL to the github repo + download_url = 'https://github.com/renjithsraj/django_payubiz/archive/0.1.tar.gz', # I'll explain this in a second + keywords = ['payu', 'payment gateway', 'payu gateway django', 'django gateway package'], # arbitrary keywords + classifiers = [], +) \ No newline at end of file