This is fork of django-oscar-systempay, a payment solution intended to be used with django-oscar and Natixis Bank Systempay.
The current implementation is based on the document V2 available online.
Install from the github repository.
pip install git+https://github.com/bastien34/django-oscar-systempay.git
The configuration will consist in few steps:
- Add systempay to your INSTALLED_APPS settings
- Config your urls app project
- Migrate
First to integrate systempay to your oscar project, you need to overwrite the root app in order to include the bench of urls used for systempay.
Settings `INSTALLED_APPS`
Start by adding systempay to your INSTALLED_APPS settings:
INSTALLED_APPS = (
...,
'systempay',
)
Create an app file in your project as following:
This will link both dashboard systempay app and main systempay app to your project.
# myproject/app.py
from oscar.app import Shop as CoreShop
from oscar.core.loading import get_class
class Shop(CoreShop):
systempay_app = get_class('systempay.app', 'application')
def get_urls(self):
urls = super().get_urls()
urls += [
url(r'^systempay/', include(self.systempay_app.urls)),
url(r'^dashboard/systempay/', include(systempay_dashboard.urls)),
]
return urls
application = Shop()
Link your root urls file to the new application
# config/urls.py
(...)
from materielfroid.app import application
urlpatterns = [
...
url(r'', include(application.urls)),
]
Run migrations
./manage.py migrate
Configure `site`
Django-oscar-systempay uses Site to build its urls. So you must configure it correctly before testing.
from django.contrib.sites.models import Site
# we suppose you only have one site here
site = Site.objects.first()
site.domain = "your.domain.com"
site.save()
Configure your urls.py to match the systempay app url as explained below.
in your settings:
# Dashboard navigation
OSCAR_DASHBOARD_NAVIGATION += [
{
'label': _('Transactions'),
'icon': 'icon-book',
'children': [
{
'label': 'SystemPay',
'url_name': 'systempay-list',
},
]
},
]
Django-oscar-systempay is compatible with Python 3 and Django 1.9. No test has been done on Python 2.7 for now.