Skip to main content

django-oscar-docdata

Payment gateway integration for Docdata Payments in django-oscar. DocData Payments is a large payment gateway based in The Netherlands that supports more then 40 international payment methods.

Installation

Install via pip:

pip install django-oscar-docdata

Configuration

Configure the application:

DOCDATA_MERCHANT_NAME

Credentials as supplied by the payment provider.

DOCDATA_MERCHANT_PASSWORD

Credentials as supplied by the payment provider.

DOCDATA_TESTING

Whether or not to run in testing mode. Defaults to True.

Add to urls.py:

from oscar_docdata.dashboard.app import application as docdata_app

urlpatterns += patterns('',
    url(r'^api/docdata/', include('docdata.urls')),
    url(r'^dashboard/docdata/', include(docdata_app.urls)),
)

Add to settings.py:

OSCAR_DASHBOARD_NAVIGATION[2]['children'].insert(1, {
    'label': _('Docdata Orders'),
    'url_name': 'docdata-order-list',
})

As recommendation, temporary log all events from this package as well:

LOGGING = {
    # ...

    'filters': {
        'require_debug_false': {
            '()': 'django.utils.log.RequireDebugFalse',
        }
    },
    'handlers': {
        'mail_admins': {
            'level': 'ERROR',
            'filters': ['require_debug_false'],
            'class': 'django.utils.log.AdminEmailHandler'
        },
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
        },
    },
    'loggers': {
        # ...

        'suds': {
            'handlers': ['console'],
            'level': 'DEBUG',
            'propagate': True,
        },
        'oscar_docdata': {
            'handlers': ['mail_admins', 'console'],
            'level': 'DEBUG',
            'propagate': True,
        },
    },
}

Caveats

While working with the Docdata 1.0 and 1.2 API, we found the following limitations:

  • Address fields are oriented towards Dutch address standards. Passing international addressfields is hard, or requires hacking, for example:

  • faking the house number (because the US address fields have no official field for that).

  • Streets have a limit of 35 characters, so the “Address Line 1” should be truncated.

  • Passing invalid address fields could cause PayPal, VISA or MasterCard transactions to fail.

  • The individual payment objects have a status value, but the payment cluster does not. This means that there is no global status value to read. If an order has been cancelled before starting a payment, there is no way to tell from the API. The only way this can be detected, is when the customer presses the “Back to shop” link, which calls the cancel callback url. You may want to catch the return_view_called signal for this.

  • Determining that an order has been paid happens by comparing “received >= expected”. This could break with currency conversions. Again, because the payment cluster status is not exposed in the API. As workaround, there is a DOCDATA_PAYMENT_SUCCESS_MARGIN setting to add a margin of 100 cents.

We hope this will be addressed by Docdata Payments in future versions of the API.

Release files for django-oscar-docdata 1.2.1

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

Source distribution (sdist)

Source distribution for django-oscar-docdata 1.2.1
File Size Uploaded
django-oscar-docdata-1.2.1.tar.gz 29.6 kB Details

Release files / django-oscar-docdata-1.2.1.tar.gz

Download URL django-oscar-docdata-1.2.1.tar.gz
Size 29.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b408a93518308885e86a410cc1f44cc6bcb7c3c741366957a3bfa039d72d4ee9
BLAKE2b-256 checksum
How to use checksums
36e73e10e672325edc44ac943393dc4293b6d81d217b4d0597fcc91d14464b54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.9

2 release files

1.2.8

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

This release

1.2.1 This release

1 release file

1.2

1 release file

1.0

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