Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Django Shopping Cart for PayPal, Google Checkout, and Amazon Payments
branch: master

This branch is 384 commits ahead of kbourgoin:master

Failed to load latest commit information.
example Revert accidental changes to example app
hiicart Additional paypal express logging
.gitignore add tags file to gitignore (more vim niceness)
LICENSE.txt Initial Import. Add ipn template to manifest update hiicart README to mention testing Initial Import. add a basic test django environment & test harness around hiicart's u… fix the development to use the same type of relative deltas that get_… Work on Stripe support

HiiCart - Django Shopping Cart

A simple shopping cart implementation with support for PayPal, Google Checkout, Amazon Payments,, and Braintree.

Installation and Setup

Installation is as easy as installing with easy_install or pip and adding the appropriate settings for the gateways you want to use. Please see the documentation in hiicart/ for more details about the settings available.

Once set up, create LineItem and HiiCart objects to submit payments:

def foo():
    cart = HiiCart.objects.create() 
        cart=cart, description="foo", name="bar",
        quantity=1, sku="12345", thankyou="thanks!",
    return cart.submit("google")

This returns an object containing the redirect URL for you user.


Older versions of HiiCart used to have logging configurable through the HIICART_SETTINGS object's LOG and LOG_LEVEL keys. This has been removed in favor of using Django's built-in logging configuration or manual configuration of the "hiicart" logger elsewhere in application code.

To maintain the same configuration as old versions of HiiCart, use something similar to the following in your

    "formatters": {
        "hiicart": {
            "format": "%(asctime)s [%(levelname)-8s] %(name)s - %(message)s",
    "handlers": {
        "hiicart": {
            "class": "logging.handlers.RotatingFileHandler",
            "filename": ...,
            "formatter": "hiicart",
            "maxBytes": 5242880,
            "backupCount": 10,
            "encoding": "utf-8",
    "loggers": {
        "hiicart": {
            "handlers": ["hiicart"],
            "level": "DEBUG",

HiiCart will aggressively log events and IPN requests to this log in at the INFO level and errors at the ERROR level.


HiiCart is testable via Django's test runner. To run the tests, simply run

python test hiicart

Some tests might not run without valid gateway configuration, which you can add to a file if running the tests from a hiicart checkout or to your regular settings if running from your django project.

Example App

An example app is included that shows very generally how to get everything set up and working. Right now it really needs a lot of work, but is functional for the most basic case.

Something went wrong with that request. Please try again.