A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/django-oscar/django-oscar-docdata below:

django-oscar/django-oscar-docdata: Docdata Payments Gateway integration for django-oscar

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

Install via pip:

pip install django-oscar-docdata

Configure the application:

DOCDATA_MERCHANT_NAME
Credentials as supplied by the payment provider.
DOCDATA_MERCHANT_PASSWORD
Credentials as supplied by the payment provider.
DOCDATA_PROFILE
The payment-methods profile that is created in the Docdata Backoffice. By default, this is named "standard".
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_dashboard_app

urlpatterns += [
    url(r'^api/docdata/', include('oscar_docdata.urls')),
    url(r'^dashboard/docdata/', include(docdata_dashboard_app.urls)),
]

Add to settings.py:

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

While developing, enabling logging for suds and oscar_docdata is recommended to see detailed information:

LOGGING = {
    # ...
    'loggers': {
        # ...
        'suds.transport': {
            'handlers': ['console'],
            'level': 'DEBUG',
            'propagate': True,
        },
        'oscar_docdata': {
            'handlers': ['mail_admins', 'console'],
            'level': 'DEBUG',
            'propagate': True,
        },
    },
}
Extra: subaccount support

Docdata allows creating multiple accounts under the same contract. This is called a "sub account". Each account has it's own connections to VISA/MasterCard/PayPal/etc. This module supports such use-case.

When you fill in the DOCDATA_MERCHANT_PASSWORDS dictionary, orders submitted to any of these merchants can be displayed in the admin, and they can receive status updates. Each key/value is a merchant-name/password pair.

When no subaccounts are configured, only the orders submitted by the current merchant can be displayed in the admin. This supports a multi-tennant database structure, while each tennant only sees their own orders.

Integration into your project

Please view the sandbox application how to integrate the application. This includes the project-specific decisions such as:

Local development and running the tests

You can use the included Makefile to install a development environment and to run the flake8 checker and the testrunner. Make sure you do this inside a virtualenv:

git clone git@github.com:django-oscar/django-oscar-docdata.git

cd django-oscar-docdata
make install
make lint
make test
Running the Sandbox application

It is possible to run the sandbox application to test this package and to see if your Docdata credentials work. You can set the DOCDATA_MERCHANT_NAME, DOCDATA_MERCHANT_PASSWORD and DOCDATA_PROFILE environment variables before running manage.py:

# creates a local sqlite database
./sandbox/manage.py migrate

# loads some sample products (books)
./sandbox/manage.py oscar_import_catalogue sandbox/fixtures/books.csv

# so you can fill out your shipping address
./sandbox/manage.py loaddata sandbox/fixtures/countries.json

# run the sandbox installation with the docdata merchant username, password and profile
DOCDATA_MERCHANT_NAME=merchant DOCDATA_MERCHANT_PASSWORD=merchant DOCDATA_PROFILE=test ./sandbox/manage.py runserver

Docdata is really keen on having unique merchant order ids. Why is not really clear as they don't use this references (they use their own). To avoid conflicts, the sandbox app adds the current datetime as a prefix.

Docdata's payment menu allows you to choose a payment method available so you don't need this in the checkout application. You can disable the sandbox payment method selection with the following environment variable:

SKIP_PAYMENT_CHOICES=1
Configuration of the Docdata Backoffice

Make sure the following settings are configured:

Docdata Payment Service Specification

See the paymentService specification for detailed technical information.

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

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4