Web Development - Page 2
Web Development RSS feed-
Authorize.Net Credit Card Form in Django
This Django form will submit credit card data to a payment gateway such as Authorize.Net when the form is validated. If the payment is not accepted then the error response from the payment gateway is added to the form's non field errors as shown in the image to the left.
This is a follow to yesterday's post, Accept Credit Cards in Django with Authorize.Net, in which I introduced a very simple example using the quix.pay Python module to process credit cards in a Django project. This moves the payment gateway request into the Form object rather than the view. It also moves some of those configurations into your typical Django settings.
At some point in the future a finalized version of this technique may be packaged and released by Quixotix Software (open-source of course) but in the mean time I thought I would share you how you might implement this on your own.
-
Accept Credit Cards in Django with Authorize.Net
Accepting credit cards in your Django applications using the Authorize.Net payment gateway is easier than you might think. Using the quix.pay Python module to do the heavy lifting with Authorize.Net, all you need to get started is a simple Django form.
You will need to either download quix.pay and install it using the setup.py script or download and install quix.pay using the easy_install command:
easy_install quix.pay
-
Authorize.NET Payment Gateway in Python
Here are a few examples and information about quix.pay, a Python module from Quixotix Software for processing credit cards using online payment gateways like Authorize.Net.
-
YUI Mouseover Popup
Here is a simple example using the Yahoo! User Interface (YUI 2) javascript library to display a popup (YUI Panel Widget) on another elements mouseover event. This is like a super-simplified menu--handy when the YUI Menu Widget is overkill.
-
AJAX Form Submit
Here is a simple example using the Yahoo! User Interface (YUI 2) javascript library to hijack a form and use AJAX to submit and process. Using unobtrusive javascript to hijack the form's submit event allows for a progressive enhancement web design strategy. In other words, our web application begins content, then semantic markup (XHTML), then a presentation layer (CSS), and finally the behaviour layer (Javascript/AJAX). This way our application is compatible with non-javascript browsers from the get-go and there is no need to build separate versions of the application, duplicate logic, etc. The idea is that we plan for AJAX from the beginning, and implement that AJAX at the end.



