Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 32.142.892 Times

django-payfast 0.2.2

Company: Mikhail Korobov
Date Added: October 28, 2013  |  Visits: 223


Report Broken Link
Printer Friendly Version

Product Homepage
Download (16 downloads)

A pluggable Django application for integrating payment system.<br />Install<br /><br />$ pip install django-payfast<br /><br />or<br /><br />$ easy_install django-payfast<br /><br />or<br /><br />$ hg clone<br />$ cd django-payfast<br />$ python install<br /><br />Then add 'payfast' to INSTALLED_APPS and execute<br /><br />$ python syncdb<br /><br />or (if South is in use)<br /><br />$ python migrate payfast<br /><br />Settings<br /><br />Specify your credentials in<br /><br /> * PAYFAST_MERCHANT_ID<br /> * PAYFAST_MERCHANT_KEY<br /><br />If your web server is behind reverse proxy you should also specify PAYFAST_IP_HEADER option. It's a request.META key with client ip address (default is 'REMOTE_ADDR').<br /><br />There is an option with PayFast server IP addresses (PAYFAST_IP_ADDRESSES). It is a list with current PayFast servers' ip addresses. If they will change then override this option in your<br /><br />You also have to setup your PayFast account on Login into the admin panel, go to 'My Account -> Integration', enable the Instant Transaction Notification (ITN) and provide the Notify URL.<br />Usage<br />Payment form<br /><br />payfast.forms.PayFastForm can be used to construct the html form. It is a helper form for html output and it shouldn't perform any validation.<br /><br />Pass all the fields to form 'initial' argument. Form also has an optional 'user' parameter: it is the User instance the order is purchased by. If 'user' is specified, 'name_first', 'name_last' and 'email_address' fields will be filled automatically if they are not passed with 'initial'.<br /><br />Example:<br /><br />#<br /><br />from django.shortcuts import get_object_or_404<br />from django.views.generic.simple import direct_to_template<br />from django.contrib.auth.decorators import login_required<br /><br />from payfast.forms import PayFastForm<br /><br />@login_required<br />def pay_with_payfast(request, order_id):<br /><br /> # Order model have to be defined by user, it is not a part<br /> # of django-payfast<br /> order = get_object_or_404(Order, pk = order_id)<br /><br /> form = PayFastForm(initial={<br /> # required params:<br /> 'amount':,<br /> 'item_name': 'the name of the item being charged for',<br /><br /> # optional params:<br /> # 'return_url' : '',<br /> # 'cancel_url' : ''<br /> # ... etc.<br /> }, user=order.user)<br /><br /> return direct_to_template(request, 'pay_with_payfast.html', {'form': form})<br /><br />Please refer to PayFast docs ( for more options. 'merchant_id', 'merchant_key', 'notify_url' and 'signature' params are handled automatically.<br /><br />The template:<br /><br />{% extends 'base.html' %}<br /><br />{% block content %}<br /> <form action="{{ }}" method="POST"><br /> <p>{{ form.as_p }}</p><br /> <p><input type="submit" value="Buy Now"></p><br /> </form><br />{% endblock %}<br /><br />The {{ form.as_p }} output will be a number of <input type='hidden'> tags.<br /><br />PayFastForm has a 'target' attribute with PayFast server URL.<br /><br />Please note that it's up to you to implement the order processing logic. Order handling should be performed in signal handler.<br />payfast.signals.notify signal<br /><br />When PayFast posts data to the Notify URL payfast.signals.notify signal is sent. This signal won't be sent for suspicious data (when request is coming from untrusted ip, form validation fails or the payment is duplicate).<br /><br />Signal subscribers will get an 'order' argument with PayFastOrder instance.<br /><br />Example:<br /><br />import payfast.signals<br /><br />def data_received(sender, **kwargs):<br /> payfast_order = kwargs['order']<br /><br /> if payfast_order.payment_status == 'COMPLETE':<br /><br /> # The order is paid (merchant_id check and check for duplicate<br /> # payments is already handled by django-payfast)<br /><br /> amount = payfast_order.amount<br /> # your business logic<br /> # ...<br /> else: # the order is not paid<br /> # your business logic<br /> # ...<br /><br />payfast.signals.notify.connect(data_received)<br /><br /><br /><br />In order to get Notify URL up and running, include payfast.urls in your<br /><br />urlpatterns = patterns('',<br /> #...<br /> url(r'^payfast/', include('payfast.urls')),<br /> #...<br />)

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Addresses Argument Djangopayfast Fields Formas Handled Import Logic Ltpgt Notify Option Optional Order Params Payfast Python Server Signal User
Users rating: 0/10

License: Freeware Size: 10.24 KB
Modules  -  Solace Node Reference 6.x-1.0-beta6
This module extends the nodereference fields by providing a filter based searching engine in order to automatically fill it using the Solace API filters features as backend.This means you can attach a SolR filter instance to node reference fields....
30.72 KB  
Server Tools  -  JiJiTechnologies AD Bulk Manager
JIJiTechnologies AD Bulk manager Enables Active Directory Bulk Export Import Active Directory Bulk Users Creation Modification Active Directory Password Reset Bulk User Account Control Remove Delete Unlock Users Move ActiveDirectory Bulk Export...
4.27 MB  
Science  -  Thinknowlogy 1
Thinknowlogy is grammar-based software, designed to utilize the logic contained within grammar, in order to create intelligence through natural language, which is demonstrated by: * Programming in natural language; * Reasoning in natural language:...
4.53 MB  
Modules  -  Track Trace TPG 1.2
Adds fields to the database for order tracking number and allows the user to track from a single click inside his history overview.(Since this file was no longer available, I thought a good thing to upload for users that have a need for this)
Travel  -  Geo Notification
Geo Notification is a location tracking app for the Windows Phone. It can track multiple addresses at the same time and give prompts to notify others via text, phone, email or Facebook post when you arrive or depart from a particular address. This...
4 MB  
Games  -  NetWalker NSA
NetWalk NSA is old cool logic game with some changes. Connect all device with server in a single network to complete the level. The game will display your anonymous online rating in the world, the country, region and city. Pimp your...
1024 KB  
Programming  -  django-netcash 0.4.0
A pluggable Django application for integrating payment system. Install $ pip install django-netcash or $ easy_install django-netcash or $ hg clone...
10.24 KB  
Modules  -  Email Directory 1.3
This component allows your visitors to add and list their email addresses on your site. The component includes anti-spam protection using GD library or cloaking if GD not available. Logged-in users are able to contact listed emails using an online...
122.88 KB  
Network & Internet  -  django-immutablefield 0.1.1
django-immutablefield is inspired by a Google search that didn't turn up a reusable solution for making fields immutable inside of a Django model. Installing One of the following: Via the ole' standby:
10.24 KB  
Games  -  Fields Separation 1. 2. 2000
In this game there will be a piece of land with some houses on it, each house will bare a number. Your job is to put in fences so that the land is separated into rectangular fields, each field should contain exactly one house and the area of the...
262 KB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Network & Internet  -  Free WiFi Hotspot 3.3.1
Free WiFi Hotspot is a super easy solution to turn your laptop or notebook into a portable Wi-Fi hotspot, wirelessly sharing your internet connections like DSL, Cable, Bluetooth, Mobile Broadband Card, Dial-Up, etc. through the built-in wireless...
1.04 MB  
Network & Internet  -  Easy Uploads 1.8
Easy uploads is a file storage media streaming application designed by Filestreamers that allows you to upload, store, and stream your files from their virtually unlimited file storage server. Easy Uploads can backup,share, and stream your files...
615.97 KB  
Network & Internet  -  IPv6 CARE 3.2b
IPv6 CARE, "IPv6 Compliant Automatic Runtime Environment", is a Linux tool able to patch ipv6-agnostic programs on-the-fly ('patch' mode). It can also generate a diagnosis about the IPv6 compliance of an application ('check' mode).
409.6 KB  
Network & Internet  -  PacketFence ZEN 3.1.0
PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) system. Boosting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, 802.1X...
1024 MB  
Network & Internet  -  django-dbstorage 1.3
A Django file storage backend for files in the database.
10.24 KB