## $Id: interfaces.py 8930 2012-07-07 09:58:59Z henrik $ ## ## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## from zope.interface import Attribute from zope import schema from waeup.kofa.payments.interfaces import IPayment from waeup.kofa.interfaces import SimpleKofaVocabulary from waeup.aaue.interfaces import MessageFactory as _ payment_categories = SimpleKofaVocabulary( (_('School Fee'),'schoolfee'), (_('School Fee 1st instalment'),'schoolfee_1'), (_('School Fee 2nd instalment'),'schoolfee_2'), (_('Clearance'),'clearance'), (_('Bed Allocation'),'bed_allocation'), (_('Hostel Maintenance'),'hostel_maintenance'), (_('Transfer'),'transfer'), (_('Gown'),'gown'), (_('Application Fee'), 'application'), ) class ICustomOnlinePayment(IPayment): """A payment via payment gateways. This is a copy of INigeriaOnlinePayment only for taking the AAUE payment_categories into consideration. """ p_category = schema.Choice( title = _(u'Payment Category'), default = u'schoolfee_1', vocabulary = payment_categories, required = True, ) ac = schema.TextLine( title = _(u'Activation Code'), default = None, required = False, readonly = False, ) r_amount_approved = schema.Float( title = _(u'Response Amount Approved'), default = 0.0, required = False, readonly = False, ) r_code = schema.TextLine( title = _(u'Response Code'), default = None, required = False, readonly = False, ) r_desc = schema.TextLine( title = _(u'Response Description'), default = None, required = False, readonly = False, ) r_pay_reference = schema.TextLine( title = _(u'Response Payment Reference'), default = None, required = False, readonly = False, ) r_card_num = schema.TextLine( title = _(u'Response Card Number'), default = None, required = False, readonly = False, ) conf_number = schema.TextLine( title = _(u'Confirmation Number'), default = None, required = False, readonly = False, ) ICustomOnlinePayment['p_category'].order = ICustomOnlinePayment[ 'p_category'].order