Ver código fonte

Added basic skeleton of a few datacash classes

master
David Winterbottom 15 anos atrás
pai
commit
f3c823e9da

+ 0
- 0
oscar/datacash/__init__.py Ver arquivo


+ 18
- 0
oscar/datacash/abstract_models.py Ver arquivo

@@ -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 Ver arquivo

@@ -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 Ver arquivo


Carregando…
Cancelar
Salvar