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

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

Implement school fee payment by two instalments. Instalment 1 replaces the original school fee payment, instalment 2 is an additional payment which can only be made if instalment 1 has been paid. Furthermore, instalment 1 can only be made if instalment 2 of the previous session has been paid (returning students only).

  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1## $Id: interfaces.py 8753 2012-06-18 17:00:00Z 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.kofa.interfaces import MessageFactory as _
23
24payment_categories = SimpleKofaVocabulary(
25    (_('School Fee 1st instalment'),'schoolfee_1'),
26    (_('School Fee 2nd instalment'),'schoolfee_2'),
27    (_('Clearance'),'clearance'),
28    (_('Bed Allocation'),'bed_allocation'),
29    (_('Hostel Maintenance'),'hostel_maintenance'),
30    (_('Transfer'),'transfer'),
31    (_('Gown'),'gown'),
32    (_('Application Fee'), 'application'),
33    )
34
35class ICustomOnlinePayment(IPayment):
36    """A payment via payment gateways.
37
38    """
39
40    p_category = schema.Choice(
41        title = _(u'Payment Category'),
42        default = u'schoolfee_1',
43        vocabulary = payment_categories,
44        required = True,
45        )
46
47    ac = schema.TextLine(
48        title = _(u'Activation Code'),
49        default = None,
50        required = False,
51        readonly = False,
52        )
53
54    r_amount_approved = schema.Float(
55        title = _(u'Response Amount Approved'),
56        default = 0.0,
57        required = False,
58        readonly = False,
59        )
60
61    r_code = schema.TextLine(
62        title = _(u'Response Code'),
63        default = None,
64        required = False,
65        readonly = False,
66        )
67
68    r_desc = schema.TextLine(
69        title = _(u'Response Description'),
70        default = None,
71        required = False,
72        readonly = False,
73        )
74
75    # Only defined in custom package
76
77    r_pay_reference = schema.TextLine(
78        title = _(u'Response Payment Reference'),
79        default = None,
80        required = False,
81        readonly = False,
82        )
83
84    r_card_num = schema.TextLine(
85        title = _(u'Response Card Number'),
86        default = None,
87        required = False,
88        readonly = False,
89        )
90
91    conf_number = schema.TextLine(
92        title = _(u'Confirmation Number'),
93        default = None,
94        required = False,
95        readonly = False,
96        )
97
98ICustomOnlinePayment['p_category'].order = ICustomOnlinePayment[
99    'p_category'].order
Note: See TracBrowser for help on using the repository browser.