Просмотр исходного кода

Added basic skeleton of a few datacash classes

master
David Winterbottom 15 лет назад
Родитель
Сommit
f3c823e9da
4 измененных файлов: 25 добавлений и 0 удалений
  1. 0
    0
      oscar/datacash/__init__.py
  2. 18
    0
      oscar/datacash/abstract_models.py
  3. 7
    0
      oscar/datacash/models.py
  4. 0
    0
      oscar/datacash/utils.py

+ 0
- 0
oscar/datacash/__init__.py Просмотреть файл


+ 18
- 0
oscar/datacash/abstract_models.py Просмотреть файл

@@ -0,0 +1,18 @@
1
+from decimal import Decimal
2
+
3
+from django.db import models
4
+from django.utils.translation import ugettext as _
5
+
6
+
7
+class AbstractTransaction(models.Model):
8
+    order_number = models.CharField(max_length=128)
9
+    type = models.CharField(max_length=128)
10
+    transaction_ref = models.CharField(max_length=128)
11
+    merchant_ref = models.CharField(max_length=128)
12
+    amount = models.DecimalField()
13
+    auth_code = models.CharField(max_length=128, blank=True, required=True)
14
+    response_code = models.PositiveIntergerField()
15
+    response_message = models.CharField(max_length=255)
16
+    request_xml = models.TextField()
17
+    response_xml = models.TextField()
18
+    date = models.DateTime()

+ 7
- 0
oscar/datacash/models.py Просмотреть файл

@@ -0,0 +1,7 @@
1
+u"""Vanilla implementation of Datacash models"""
2
+from django.db import models
3
+
4
+from oscar.datacash.abstract_models import Transaction
5
+
6
+class Transaction(AbstractTransaction):
7
+    pass

+ 0
- 0
oscar/datacash/utils.py Просмотреть файл


Загрузка…
Отмена
Сохранить