Skip to main content

Integration between django-oscar and the Cybersource Secure Acceptance.

Project description

This package is to handle integration between django-oscar based e-commerce sites and the CCH Sales Tax Office SOAP API.


  1. Requires and django-oscar>=1.1.1 and django-oscar-api>=1.0.1.
  2. Your project must use PostgreSQL, since cybersource.models.CyberSourceReply uses an HStore field to log request data.
  3. You must fork the Oscar payment app to add a mixin to the transaction model.


  1. Install the django-oscar-cybersource packages.:

    $ pip install git+
  2. Add cybersource to your INSTALLED_APPS:

    # myproject/
    ] + get_core_apps([
  3. Add some attributes to to configure how the application should connect to Cybersource.:

    # myproject/
    # Create a Secure Acceptance profile using the Cybersource dashboard and enter the profile, access key, and secret key here
    # Enter you Cybersource merchant ID and org ID as found in the dashboard
    # This defaults to the test endpoint ( Override with the prod endpoint for real transactions.
    # Upon successful authorization of the user's credit card, where should we send the user?
    # Enter the name of the thank you page view.
    CYBERSOURCE_REDIRECT_SUCCESS = 'checkout:thank-you'
    # Upon declined authorization of the user's credit card, where should we send the user?
    # Enter the name of view where they can try again.
    CYBERSOURCE_REDIRECT_FAIL = 'checkout:index'
    # Upon successful authorization of the user's credit card, what status should he order be set to?
  4. Install extra fields on payment.models.Transaction (see also How to fork Oscar apps).:

    # payment/
    from cybersource.models import TransactionMixin
    from oscar.apps.payment.abstract_models import AbstractTransaction
    class Transaction(TransactionMixin, AbstractTransaction):
    from oscar.apps.payment.models import *  # noqa
  5. Create and run migrations for the payment app.:

    $ python makemigrations payment
    $ python migrate
  6. Add cybersource.urls to your URL config.:

    # myproject/
    urlpatterns = patterns('',
        url(r'^api/cybersource/', include('cybersource.urls')),
  7. Include the device fingerprint code in your checkout interface.:

    {# One Pixel Image Code #}
    <p style="background:url({% url 'fingerprint-redirect' url_type='img-1' %})"></p>
    <img src="{% url 'fingerprint-redirect' url_type='img-2' %}" alt="">
    {# Flash Code #}
    <object type="application/x-shockwave-flash" data="{% url 'fingerprint-redirect' url_type='flash' %}" width="1" height="1" id="thm_fp">
        <param name="movie" value="{% url 'fingerprint-redirect' url_type='flash' %}" />
    {# JS Code #}
    <script src="{% url 'fingerprint-redirect' url_type='js' %}" type="text/javascript"></script>


1.0.0 (2016-01-25)

Initial release.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django_oscar_cybersource-1.0.1-py3-none-any.whl (17.8 kB) Copy SHA256 hash SHA256 Wheel py3
django-oscar-cybersource-1.0.1.tar.gz (11.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page