Giter Site home page Giter Site logo

django-payu's Introduction

Django-PayU

http://travis-ci.org/MicroPyramid/django-payu.svg?branch=master https://coveralls.io/repos/github/MicroPyramid/django-payu/badge.svg?branch=master Code Health

This package provides integration between Django and PayU Payment Gateway.

Quick start

  1. Install 'django-payu' using the following command:

    pip install django-payu
    
  2. Add "payu" to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ....
        ....
        'payu',
    ]
    
  3. Add the following settings in the setting file using the details from your PayU account:

    PAYU_MERCHANT_KEY = "Your MerchantID",
    
    PAYU_MERCHANT_SALT = "Your MerchantSALT",
    
    # And add the PAYU_MODE to 'TEST' for testing and 'LIVE' for production.
    PAYU_MODE = "TEST"
    
  4. Finally, run the following commands:

    python manage.py migrate
    
  5. Run the tests:

    python test_runner.py  test -v 2
    

Visit our Django E-commerce Development page Here

For additional help you can Contact us here

django-payu's People

Contributors

abhijeet-1110 avatar ashwin31 avatar chaitu210 avatar chirag200666 avatar coolfire1231 avatar sayeed99 avatar shirishagaddi avatar vineeshan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-payu's Issues

KeyError: ('payu', 'nonseamlesstransaction')

After installing django-payu in my virtual environment and adding it into INSTALLED_APPS section, when I execute command python3 manage.py migrate
I get the following error:

Operations to perform:
Apply all migrations: address, admin, analytics, auth, basket, catalogue, contenttypes, customer, flatpages, offer, order, partner, payment, payu, reviews, sessions, shipping, sites, thumbnail, voucher, wishlists
Running migrations:
Applying payu.0002_nonseamlesstransaction_basket...Traceback (most recent call last):
File "manage.py", line 21, in
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/home/cypher/Desktop/environments/lib/python3.6/site-packages/django/core/management/init.py", line 371, in execute_from_command_line
utility.execute()
File "/home/cypher/Desktop/environments/lib/python3.6/site-packages/django/core/management/init.py", line 365, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/cypher/Desktop/environments/lib/python3.6/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/cypher/Desktop/environments/lib/python3.6/site-packages/django/core/management/base.py", line 335, in execute
output = self.handle(*args, **options)
File "/home/cypher/Desktop/environments/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 200, in handle
fake_initial=fake_initial,
File "/home/cypher/Desktop/environments/lib/python3.6/site-packages/django/db/migrations/executor.py", line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/home/cypher/Desktop/environments/lib/python3.6/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/home/cypher/Desktop/environments/lib/python3.6/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
state = migration.apply(state, schema_editor)
File "/home/cypher/Desktop/environments/lib/python3.6/site-packages/django/db/migrations/migration.py", line 112, in apply
operation.state_forwards(self.app_label, project_state)
File "/home/cypher/Desktop/environments/lib/python3.6/site-packages/django/db/migrations/operations/fields.py", line 70, in state_forwards
state.models[app_label, self.model_name_lower].fields.append((self.name, field))
KeyError: ('payu', 'nonseamlesstransaction')

circular import, can you fix it?

https://dpaste.de/6DM3

(shop) E:\test\theme2>python manage.py makemigrations
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "C:\Users\Sony\Envs\shop\lib\site-packages\django\core\management__init_
.py", line 353, in execute_from_command_line
utility.execute()
File "C:\Users\Sony\Envs\shop\lib\site-packages\django\core\management__init

.py", line 327, in execute
django.setup()
File "C:\Users\Sony\Envs\shop\lib\site-packages\django__init
_.py", line 18,
in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\Sony\Envs\shop\lib\site-packages\django\apps\registry.py", line
85, in populate
app_config = AppConfig.create(entry)
File "C:\Users\Sony\Envs\shop\lib\site-packages\django\apps\config.py", line 9
0, in create
module = import_module(entry)
File "c:\python27\Lib\importlib__init__.py", line 37, in import_module
import(name)
File "C:\Users\Sony\Envs\shop\lib\site-packages\payu__init__.py", line 1, in

from gateway import *
File "C:\Users\Sony\Envs\shop\lib\site-packages\payu\gateway.py", line 1, in <
module>
from models import Transaction, CancelRefundCaptureRequests
File "C:\Users\Sony\Envs\shop\lib\site-packages\payu\models.py", line 6, in
class Transaction(models.Model):
File "C:\Users\Sony\Envs\shop\lib\site-packages\django\db\models\base.py", lin
e 94, in new
app_config = apps.get_containing_app_config(module)
File "C:\Users\Sony\Envs\shop\lib\site-packages\django\apps\registry.py", line
239, in get_containing_app_config
self.check_apps_ready()
File "C:\Users\Sony\Envs\shop\lib\site-packages\django\apps\registry.py", line
124, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.

(shop) E:\test\theme2>

Add sample application

The package looks good but how I need to use this package in the Django application ( how to pass the parameters, please elaborate the parameters which you are using for the integration), the documentation says like install add the three parameters in settings.py file and make migrate command, please try to add the sample application with this awesome package

Django 1.9 or 1.10

Migrations are not performing.

Added 'payu' in settings file.

/Desktop/ptest$ pip freeze
Django==1.10
argparse==1.2.1
django-payu==0.2
wsgiref==0.1.2

Desktop/ptest$ ./manage.py migrate payu
CommandError: App 'payu' does not have migrations.

Django 1.9.2 integration required

$ ./manage.py makemigrations payu
Traceback (most recent call last):
File "./manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/home/qsslp182/Desktop/pp/local/lib/python2.7/site-packages/django/core/management/init.py", line 353, in execute_from_command_line
utility.execute()
File "/home/qsslp182/Desktop/pp/local/lib/python2.7/site-packages/django/core/management/init.py", line 327, in execute
django.setup()
File "/home/qsslp182/Desktop/pp/local/lib/python2.7/site-packages/django/init.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/qsslp182/Desktop/pp/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/qsslp182/Desktop/pp/local/lib/python2.7/site-packages/django/apps/config.py", line 90, in create
module = import_module(entry)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/home/qsslp182/Desktop/pp/local/lib/python2.7/site-packages/payu/init.py", line 1, in
from gateway import *
File "/home/qsslp182/Desktop/pp/local/lib/python2.7/site-packages/payu/gateway.py", line 1, in
from models import Transaction, CancelRefundCaptureRequests
File "/home/qsslp182/Desktop/pp/local/lib/python2.7/site-packages/payu/models.py", line 6, in
class Transaction(models.Model):
File "/home/qsslp182/Desktop/pp/local/lib/python2.7/site-packages/django/db/models/base.py", line 94, in new
app_config = apps.get_containing_app_config(module)
File "/home/qsslp182/Desktop/pp/local/lib/python2.7/site-packages/django/apps/registry.py", line 239, in get_containing_app_config
self.check_apps_ready()
File "/home/qsslp182/Desktop/pp/local/lib/python2.7/site-packages/django/apps/registry.py", line 124, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.


Getting this error if I integrated this in my environment.
For testing I removed the line in init.py and after migrations I replaced them again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.