Changeset 6864
- Timestamp:
- 5 Oct 2011, 10:17:04 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/payments
- Files:
-
- 3 added
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/payments/__init__.py
r6861 r6864 3 3 # Make this a package. 4 4 from waeup.sirp.payments.container import PaymentsContainer 5 from waeup.sirp.payments.payment import SCPayment, OnlinePayment 5 6 6 7 __all__ = [ 7 8 'PaymentsContainer', 9 'SCPayment', 10 'OnlinePayment', 8 11 ] -
main/waeup.sirp/trunk/src/waeup/sirp/payments/interfaces.py
r6861 r6864 1 1 ## 2 2 ## interfaces.py 3 from zope import schema 3 4 from waeup.sirp.interfaces import IWAeUPObject 5 from waeup.sirp.payments.vocabularies import ( 6 payment_states, payment_categories) 4 7 5 8 class IPaymentsContainer(IWAeUPObject): … … 7 10 8 11 """ 12 13 class IPayment(IWAeUPObject): 14 """A base representation of payments. 15 16 """ 17 18 p_state = schema.Choice( 19 title = u'Payment State', 20 default = u'unpaid', 21 vocabulary = payment_states, 22 required = True, 23 ) 24 25 p_category = schema.Choice( 26 title = u'Payment Category', 27 default = u'school fee', 28 vocabulary = payment_categories, 29 required = True, 30 ) 31 32 p_item = schema.TextLine( 33 title = u'Payment Item', 34 default = u'Certificate XYZ', 35 required = False, 36 ) 37 38 date_of_creation = schema.Date( 39 title = u'Ticket Creation Date', 40 ) 41 42 date_of_payment = schema.Date( 43 title = u'Date of Payment', 44 ) 45 46 amount_auth = schema.Int( 47 title = u'Amount authorized', 48 default = 0, 49 required = True, 50 ) 51 52 class ISCPayment(IPayment): 53 """A scratch card payment. 54 55 """ 56 57 p_code = schema.TextLine( 58 title = u'Payment Access Code', 59 default = u'Certificate XYZ', 60 required = False, 61 ) 62 63 class IOnlinePayment(IPayment): 64 """A payment via payment gateways. 65 66 """ 67 68 surcharge = schema.Int( 69 title = u'Surcharge', 70 default = 0, 71 required = False, 72 ) 73 74 order_id = schema.TextLine( 75 title = u'Order Id', 76 default = None, 77 ) 78 79 r_amount_approved = schema.Int( 80 title = u'Response Amount Approved', 81 default = 0, 82 required = False, 83 ) 84 85 r_code = schema.TextLine( 86 title = u'Response Code', 87 default = None, 88 ) 89 90 r_card_num = schema.TextLine( 91 title = u'Response Card Number', 92 default = None, 93 )
Note: See TracChangeset for help on using the changeset viewer.