Changeset 12113 for main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba
- Timestamp:
- 2 Dec 2014, 08:30:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/interfaces.py
r11949 r12113 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 import decimal 18 19 from zope.interface import Attribute 19 20 from zope import schema … … 23 24 from waeup.ikoba.interfaces import MessageFactory as _ 24 25 26 27 #: Possible states of payments 28 STATE_UNPAID = 1 29 STATE_PAID = 2 30 STATE_FAILED = 4 31 25 32 payment_states = SimpleIkobaVocabulary( 26 (_('Not yet paid'), 'unpaid'),27 (_('Paid'), 'paid'),28 (_('Failed'), 'failed'),33 (_('Not yet paid'), STATE_UNPAID), 34 (_('Paid'), STATE_PAID), 35 (_('Failed'), STATE_FAILED), 29 36 ) 37 30 38 31 39 class PaymentCategorySource(ContextualDictSourceFactoryBase): … … 45 53 46 54 """ 47 p_id = Attribute('Payment identifier') 48 49 p_category = schema.Choice( 50 title = _(u'Payment Category'), 51 #default = u'schoolfee', 52 source = PaymentCategorySource(), 55 payment_id = schema.TextLine( 56 title = u'Payment Identifier', 57 default = None, 53 58 required = True, 54 59 ) 55 60 56 p _item= schema.TextLine(57 title = u' ',61 payer_id = schema.TextLine( 62 title = u'Payer', 58 63 default = None, 59 required = False,60 )61 62 display_item = schema.TextLine(63 title = _(u'Payment Item'),64 required = False,65 readonly = True,66 )67 68 p_session = schema.Choice(69 title = _(u'Payment Session'),70 source = application_sessions_vocab,71 64 required = True, 72 65 ) 73 66 74 p_state = schema.Choice( 67 payed_item_id = schema.TextLine( 68 title = u'Payed Item', 69 default = None, 70 required = True, 71 ) 72 73 state = schema.Choice( 75 74 title = _(u'Payment State'), 76 default = u'unpaid',75 default = STATE_UNPAID, 77 76 vocabulary = payment_states, 78 77 required = True, … … 80 79 81 80 creation_date = schema.Datetime( 82 title = _(u' TicketCreation Date'),81 title = _(u'Creation Date'), 83 82 readonly = False, 84 83 required = False, … … 91 90 ) 92 91 93 amount_auth = schema.Float( 94 title = _(u'Amount Authorized'), 95 default = 0.0, 92 amount = schema.Decimal( 93 title = _(u'Amount'), 94 description = _( 95 'The overall sum payed, including all taxes fees, etc.'), 96 default = decimal.Decimal("0.00"), 96 97 required = True, 97 98 readonly = False, 98 99 ) 100 99 101 100 102 class IOnlinePayment(IPayment):
Note: See TracChangeset for help on using the changeset viewer.