## $Id: interfaces.py 17242 2022-12-26 09:49:13Z 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.interfaces import SimpleKofaVocabulary from waeup.kofa.payments.interfaces import IPayment from kofacustom.nigeria.interfaces import MessageFactory as _ class INigeriaOnlinePayment(IPayment): """A payment via payment gateways. """ 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, ) # Only defined in kofacustom.nigeria package 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, ) r_company = schema.Choice( title = _(u'Payment Gateway'), default = None, required = False, readonly = False, vocabulary = SimpleKofaVocabulary( (_('Interswitch'), 'interswitch'), (_('Etranzact'), 'etranzact'), (_('Remita'), 'remita'), (_('Paypal'), 'paypal'), (_('Scratch Card'), 'sc'), (_('Manifest'), 'manifest'), (_('Sponsor'), 'sponsored'), (_('unknown'), 'unknown'), ) ) r_payment_link = schema.TextLine( title = _(u'Response Payment Authorization Link'), default = None, required = False, readonly = False, ) provider_amt = schema.Float( title = _(u'Portal Charge'), default = 0.0, required = False, readonly = False, ) gateway_amt = schema.Float( title = _(u'Gateway Amount'), default = 0.0, required = False, readonly = False, ) thirdparty_amt = schema.Float( title = _(u'Third Party Amount'), default = 0.0, required = False, readonly = False, ) net_amt = schema.Float( title = _(u'Net Amount'), default = 0.0, required = False, readonly = False, ) INigeriaOnlinePayment['net_amt'].order = INigeriaOnlinePayment[ 'amount_auth'].order