Skip to main content

MultiSafepay Payments Gateway integration for Django

Project description

django-multisafepay

Payment gateway integration for MultiSafepay. MultiSafepay is a large payment gateway based in The Netherlands that supports many international payment methods.

MultiSafepay offers two methods for payments, see https://www.multisafepay.com/en/Payment-services/:

This package currently only implements the methods for the fast checkout method. Contributions to support the Connect method are welcome!

Installation

Install via pip:

pip install django-multisafepay

Configuration

In the MultiSafepay merchant site settings, add a new website. Use those settings to configure the application:

MULTISAFEPAY_ACCOUNT_ID

The account ID, provided by MultiSafepay.

MULTISAFEPAY_SITE_ID

The site ID, found in the MultiSafepay website settings panel.

MULTISAFEPAY_SITE_CODE

The site security code, found in the MultiSafepay website settings panel.

MULTISAFEPAY_TESTING

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

Add to urls.py:

urlpatterns += patterns('',
    url(r'^api/multisafepay/', include('django_multisafepay.urls')),
)

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

LOGGING = {
    # ...

    'handlers': {
        # ...

        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
        },
    },
    'loggers': {
        # ...

        'django_multisafepay': {
            'handlers': ['console'],
            'level': 'DEBUG',
            'propagate': True,
        },
    },
}

Usage

Creating a new payment transaction:

from django_multisafepay.client import MultiSafepayClient
from django_multisafepay.data import Transaction, Customer
from django.shortcuts import redirect

def pay(request):

    client = MultiSafepayClient()
    reply = client.start_checkout(
        transaction = Transaction(

        ),
        customer = Customer(

        )
    )

    return redirect(reply.payment_url)

Fetching status:

client = MultiSafepayClient()
statusreply = client.status(self.transaction_id)

TODO

  • checkout-shopping-cart

  • custom-fields

  • shipping

Project details


Download files

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

Source Distribution

django-multisafepay-0.1.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

django_multisafepay-0.1-py2-none-any.whl (20.8 kB view details)

Uploaded Python 2

File details

Details for the file django-multisafepay-0.1.tar.gz.

File metadata

File hashes

Hashes for django-multisafepay-0.1.tar.gz
Algorithm Hash digest
SHA256 b3fa899eea24f97cc481d036c1bd59d9054ad4cc8d3fc7087075332ec6e7650b
MD5 27082a9d8e9bdf0b952e72658eed54c4
BLAKE2b-256 40de52fc30e4b5864eb48af5598aef5884ea9df21b5c4f128562b3ef98ab37e1

See more details on using hashes here.

File details

Details for the file django_multisafepay-0.1-py2-none-any.whl.

File metadata

File hashes

Hashes for django_multisafepay-0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 2d0281095a582dbc77ebf6d65144ac42311f48d708c4e1392931f912aa9074c8
MD5 2dce4f73b3fd4d2ac7fddd869b9c709d
BLAKE2b-256 c83b21c948f658eb1f5ee1de8136964dad687ac724467bbad729762dfb7d4bee

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page