Skip to main content

django-commweb is a Django module for interfacing with the CommWeb merchant gateway, the Commonwealth Bank of Australia’s merchant payment facility.

Source is available on GitHub, as is the Changelog.

Supported functions

  • Purchase (one-step transaction)

Dependencies

Installation

  1. Install using pip:

    $ pip install django-commweb
  2. Add the ‘commweb’ app to the bottom of your INSTALLED_APPS setting:

    INSTALLED_APPS = (
        ...
        'commweb',
    )
  3. Add the required settings (provided by the CommWeb Support Line) for the test merchant to your project’s settings.py:

    COMMWEB_ACCESS_CODE = 'FOO'
    COMMWEB_MERCHANT = 'TESTMERCHANT'
  4. Run the tests to ensure your merchant details are set up correctly by running a Django shell as follows:

    $ python manage.py shell
    >>> import unittest
    >>> from commweb.test.test_responses import TestResponses
    >>> suite = unittest.TestLoader().loadTestsFromTestCase(TestResponses)
    >>> unittest.TextTestRunner(verbosity=2).run(suite)
    test_approved (commweb.test.test_responses.TestResponses) ... ok
    test_card_expired (commweb.test.test_responses.TestResponses) ... ok
    test_declined_2 (commweb.test.test_responses.TestResponses) ... ok
    test_declined_E (commweb.test.test_responses.TestResponses) ... ok
    test_failed (commweb.test.test_responses.TestResponses) ... ok
    test_insufficient_credit (commweb.test.test_responses.TestResponses) ... ok
    test_no_reply (commweb.test.test_responses.TestResponses) ... ok
    
    ----------------------------------------------------------------------
    Ran 7 tests in 2.593s
    
    OK
    <unittest.runner.TextTestResult run=7 errors=0 failures=0>

Intergration

Two options are available for intergrating django-commweb into your Django app.

Cartridge

A payment handler for Cartridge is provided by commweb.cartridge.cartridge_payment_handler. You only need to set SHOP_HANDLER_PAYMENT in your project’s settings file to activate this functionality:

SHOP_HANDLER_PAYMENT = 'commweb.cartridge_hook.cartridge_payment_handler'

Using the API directly

See commweb.test.test_responses.py for an example of how to call the API directly. The API module is located at commweb.purchase.

Release files for django-commweb 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for django-commweb 0.3.3
File Interpreter ABI Platform
django_commweb-0.3.3-py2.py3-none-any.whl Python 2, Python 3 none any Details

Release files / django_commweb-0.3.3-py2.py3-none-any.whl

Download URL django_commweb-0.3.3-py2.py3-none-any.whl
Size 7.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
2cbac9813c2902ed61ca42a8e918a56de7c0d9cce5afb61c860dcf13de9af53f
BLAKE2b-256 checksum
How to use checksums
123e7b3f015ab83707a1de0ac78d28584316a3b2f937df19e02a790f70cef44a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3.3 This release

1 release file

0.3.2

2 release files

0.3.1

2 release files

0.3

2 release files

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page