Skip to content
This repository has been archived by the owner on Jun 15, 2019. It is now read-only.

datacash url pattern adjusted #13

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Changes made to the to url Now compatible with django 1.11


=================================
Datacash package for django-oscar
=================================
Expand Down Expand Up @@ -43,7 +46,7 @@ From PyPi::

or from Github::

pip install git+git://github.com/tangentlabs/django-oscar-datacash.git#egg=django-oscar-datacash
pip install git+git://github.com/ldonjibson/django-oscar-datacash.git#egg=django-oscar-datacash

Add ``'datacash'`` to ``INSTALLED_APPS`` and run::

Expand Down
6 changes: 3 additions & 3 deletions datacash/dashboard/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.conf.urls import patterns, url
from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required

from oscar.core.application import Application
Expand All @@ -13,14 +13,14 @@ class DatacashDashboardApplication(Application):
fraud_list_view = views.FraudResponseListView

def get_urls(self):
urlpatterns = patterns('',
urlpatterns = [
url(r'^transactions/$', self.list_view.as_view(),
name='datacash-transaction-list'),
url(r'^transactions/(?P<pk>\d+)/$', self.detail_view.as_view(),
name='datacash-transaction-detail'),
url(r'^fraud-responses/$', self.fraud_list_view.as_view(),
name='datacash-fraud-response-list'),
)
]
return self.post_process_urls(urlpatterns)

def get_url_decorator(self, url_name):
Expand Down
96 changes: 49 additions & 47 deletions datacash/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,53 +1,55 @@
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-07 10:30
from __future__ import unicode_literals

class Migration(SchemaMigration):
from django.db import migrations, models

def forwards(self, orm):

# Adding model 'OrderTransaction'
db.create_table('datacash_ordertransaction', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('order_number', self.gf('django.db.models.fields.CharField')(max_length=128, db_index=True)),
('method', self.gf('django.db.models.fields.CharField')(max_length=12)),
('amount', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=12, decimal_places=2, blank=True)),
('merchant_reference', self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True)),
('datacash_reference', self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True)),
('auth_code', self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True)),
('status', self.gf('django.db.models.fields.PositiveIntegerField')()),
('reason', self.gf('django.db.models.fields.CharField')(max_length=255)),
('request_xml', self.gf('django.db.models.fields.TextField')()),
('response_xml', self.gf('django.db.models.fields.TextField')()),
('date_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
))
db.send_create_signal('datacash', ['OrderTransaction'])

class Migration(migrations.Migration):

def backwards(self, orm):

# Deleting model 'OrderTransaction'
db.delete_table('datacash_ordertransaction')
initial = True

dependencies = [
]

models = {
'datacash.ordertransaction': {
'Meta': {'object_name': 'OrderTransaction'},
'amount': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '12', 'decimal_places': '2', 'blank': 'True'}),
'auth_code': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
'datacash_reference': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'merchant_reference': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
'method': ('django.db.models.fields.CharField', [], {'max_length': '12'}),
'order_number': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
'reason': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'request_xml': ('django.db.models.fields.TextField', [], {}),
'response_xml': ('django.db.models.fields.TextField', [], {}),
'status': ('django.db.models.fields.PositiveIntegerField', [], {})
}
}

complete_apps = ['datacash']
operations = [
migrations.CreateModel(
name='FraudResponse',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('aggregator_identifier', models.CharField(blank=True, max_length=15)),
('merchant_identifier', models.CharField(max_length=15)),
('merchant_order_ref', models.CharField(db_index=True, max_length=250)),
('t3m_id', models.CharField(db_index=True, max_length=128)),
('score', models.IntegerField()),
('recommendation', models.IntegerField()),
('message_digest', models.CharField(blank=True, max_length=128)),
('raw_response', models.TextField()),
('date_created', models.DateTimeField(auto_now_add=True)),
],
options={
'ordering': ('-date_created',),
},
),
migrations.CreateModel(
name='OrderTransaction',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('order_number', models.CharField(db_index=True, max_length=128)),
('method', models.CharField(max_length=12)),
('amount', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True)),
('currency', models.CharField(default='GBP', max_length=12)),
('merchant_reference', models.CharField(blank=True, max_length=128, null=True)),
('datacash_reference', models.CharField(blank=True, max_length=128, null=True)),
('auth_code', models.CharField(blank=True, max_length=128, null=True)),
('status', models.PositiveIntegerField()),
('reason', models.CharField(max_length=255)),
('request_xml', models.TextField()),
('response_xml', models.TextField()),
('date_created', models.DateTimeField(auto_now_add=True)),
],
options={
'ordering': ('-date_created',),
},
),
]
63 changes: 0 additions & 63 deletions datacash/migrations/0002_auto__add_fraudresponse.py

This file was deleted.

57 changes: 0 additions & 57 deletions datacash/migrations/0003_auto__del_unique_fraudresponse_t3m_id.py

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions datacash/migrations/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

4 changes: 2 additions & 2 deletions datacash/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


# Responses from the3rdman are posted back
urlpatterns = patterns('',
urlpatterns = [
url(r'^the3rdman/', csrf_exempt(views.CallbackView.as_view()),
name='datacash-3rdman-callback'),
)
]