This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Paynova Aero for Django

Implementation of Paynova Aero work flow for Django. Using Paynova API python library: paynova-api-python-client.

Installation

  1. Install django-paynova:

    pip install django-paynova
    

    Python 2.7, 3.3, 3.4, PyPy are supported Django 1.6, 1.7 are supported

  2. Add django-paynova to INSTALLED_APPS:

    INSTALLED_APPS = (
        ...
        'django_paynova',
        ...
    )
    
  3. Configure settings:

    PAYNOVA_MERCHANT_ID = 'MERCHANT_ID'
    PAYNOVA_PASSWORD = 'PASSWORD'
    PAYNOVA_SECRET = 'SECRET'
    PAYNOVA_CALLBACK_URL = 'http://mysite.com'
    

    For production:

    PAYNOVA_LIVE = True
    
  4. Run ./manage migrate

  5. Add urls to handle Paynova’s callbacks:

    urlpatterns = patterns('',
        url(r'^(?i)payments/paynova/', include('django_paynova.urls')),
    )
    

Usage

  1. Create order and init payment with default params:

    from django_paynova import create_order, PaynovaException
    try:
        pp = create_order({
            'orderNumber': '0001',
            'currencyCode': 'EUR',
            'totalAmount': 10
        })
        # TODO: redirect to pp.url
    except PaynovaException as e:
        # TODO: handle exception
    

    create_order takes dictionary with Create Order parameters

  2. Handle Event Hook Notifications:

    from django.dispatch import receiver
    from django_paynova.signals import paynova_payment
    
    @receiver(paynova_payment)
    def paynova_payment_signal(sender, status, params, **kwargs):
        # TODO: handle paynova payment notification
    

    where

    • sender - PaynovaPayment model
    • status - status of payment
    • params - payment params from Paynova

Advanced

Also you can create order and initialize payment separately:

from django_paynova import create_order, initialize_payment, PaynovaException
try:

    # create order

    pp = create_order({
        'orderNumber': '0005',
        'currencyCode': 'EUR',
        'totalAmount': 10
    }, init_payment=False)

    # init payment. http://docs.paynova.com/display/API/Initialize+Payment

    pp = initialize_payment({'orderId': pp.order_id})

    # TODO: redirect to pp.url

except PaynovaException as e:
    # TODO: handle exception

Errors

If Paynova return an error, PaynovaException will be raised

from django-paynova import create_order, PaynovaException

try:
    pp = create_order()
except PaynovaException as e:
    # process exception
    # e.errorNumber, e.statusKey, e.statusMessage, e.errors
    pass

Tests

At first make sure that you are in virtualenv.

Install all dependencies:

make setup

To run tests:

make test

License

MIT licence

Release History

Release History

0.1.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-paynova-0.1.6.tar.gz (10.0 kB) Copy SHA256 Checksum SHA256 Source Jul 9, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting