source: main/waeup.aaue/trunk/src/waeup/aaue/payments/interfaces.py @ 8899

Last change on this file since 8899 was 8823, checked in by Henrik Bettermann, 13 years ago

Merged with waeup.uniben 8820:HEAD.

  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1## $Id: interfaces.py 8823 2012-06-27 08:09:19Z henrik $
2##
3## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 2 of the License, or
7## (at your option) any later version.
8##
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12## GNU General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program; if not, write to the Free Software
16## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17##
18from zope.interface import Attribute
19from zope import schema
20from waeup.kofa.payments.interfaces import IPayment
21from waeup.kofa.interfaces import SimpleKofaVocabulary
22from waeup.aaue.interfaces import MessageFactory as _
23
24payment_categories = SimpleKofaVocabulary(
25    (_('School Fee'),'schoolfee'),
26    (_('School Fee 1st instalment'),'schoolfee_1'),
27    (_('School Fee 2nd instalment'),'schoolfee_2'),
28    (_('Clearance'),'clearance'),
29    (_('Bed Allocation'),'bed_allocation'),
30    (_('Hostel Maintenance'),'hostel_maintenance'),
31    (_('Transfer'),'transfer'),
32    (_('Gown'),'gown'),
33    (_('Application Fee'), 'application'),
34    )
35
36class ICustomOnlinePayment(IPayment):
37    """A payment via payment gateways.
38
39    """
40
41    p_category = schema.Choice(
42        title = _(u'Payment Category'),
43        default = u'schoolfee_1',
44        vocabulary = payment_categories,
45        required = True,
46        )
47
48    ac = schema.TextLine(
49        title = _(u'Activation Code'),
50        default = None,
51        required = False,
52        readonly = False,
53        )
54
55    r_amount_approved = schema.Float(
56        title = _(u'Response Amount Approved'),
57        default = 0.0,
58        required = False,
59        readonly = False,
60        )
61
62    r_code = schema.TextLine(
63        title = _(u'Response Code'),
64        default = None,
65        required = False,
66        readonly = False,
67        )
68
69    r_desc = schema.TextLine(
70        title = _(u'Response Description'),
71        default = None,
72        required = False,
73        readonly = False,
74        )
75
76    # Only defined in custom package
77
78    r_pay_reference = schema.TextLine(
79        title = _(u'Response Payment Reference'),
80        default = None,
81        required = False,
82        readonly = False,
83        )
84
85    r_card_num = schema.TextLine(
86        title = _(u'Response Card Number'),
87        default = None,
88        required = False,
89        readonly = False,
90        )
91
92    conf_number = schema.TextLine(
93        title = _(u'Confirmation Number'),
94        default = None,
95        required = False,
96        readonly = False,
97        )
98
99ICustomOnlinePayment['p_category'].order = ICustomOnlinePayment[
100    'p_category'].order
Note: See TracBrowser for help on using the repository browser.