Changeset 9469 for main/waeup.kofa/trunk
- Timestamp:
- 30 Oct 2012, 17:49:17 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/payments
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/payments/__init__.py
r7811 r9469 3 3 # Make this a package. 4 4 from waeup.kofa.payments.container import PaymentsContainer 5 from waeup.kofa.payments.payment import SCPayment,OnlinePayment5 from waeup.kofa.payments.payment import OnlinePayment 6 6 7 7 __all__ = [ 8 8 'PaymentsContainer', 9 'SCPayment',10 9 'OnlinePayment', 11 10 ] -
main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py
r9405 r9469 92 92 ) 93 93 94 class ISCPayment(IPayment):95 """A scratch card payment.96 97 """98 99 p_code = schema.TextLine(100 title = _(u'Payment Access Code'),101 #default = u'Certificate XYZ',102 required = False,103 readonly = True,104 )105 106 94 class IOnlinePayment(IPayment): 107 95 """A payment via payment gateways. -
main/waeup.kofa/trunk/src/waeup/kofa/payments/payment.py
r9405 r9469 27 27 from waeup.kofa.interfaces import MessageFactory as _ 28 28 from waeup.kofa.payments.interfaces import ( 29 IPayment, I SCPayment, IOnlinePayment,29 IPayment, IOnlinePayment, 30 30 payment_states) 31 31 from waeup.kofa.utils.helpers import attrs_to_fields, get_current_principal … … 52 52 utils = getUtility(IKofaUtils) 53 53 return utils.PAYMENT_CATEGORIES[self.p_category] 54 55 # not used56 class SCPayment(Payment):57 """This is a scratch card payment.58 """59 grok.implements(ISCPayment)60 grok.provides(ISCPayment)61 62 def __init__(self):63 super(SCPayment, self).__init__()64 p_id = None65 return66 67 SCPayment = attrs_to_fields(SCPayment)68 54 69 55 class OnlinePayment(Payment): -
main/waeup.kofa/trunk/src/waeup/kofa/payments/tests.py
r7811 r9469 21 21 from zope.interface.verify import verifyClass, verifyObject 22 22 from waeup.kofa.payments.interfaces import ( 23 IPaymentsContainer, I SCPayment, IOnlinePayment)23 IPaymentsContainer, IOnlinePayment) 24 24 from waeup.kofa.payments.container import PaymentsContainer 25 from waeup.kofa.payments.payment import ( 26 SCPayment, OnlinePayment) 25 from waeup.kofa.payments.payment import OnlinePayment 27 26 from waeup.kofa.testing import (FunctionalLayer, FunctionalTestCase) 28 27 … … 43 42 self.assertTrue( 44 43 verifyClass( 45 ISCPayment, SCPayment)46 )47 self.assertTrue(48 verifyClass(49 44 IOnlinePayment, OnlinePayment) 50 )51 self.assertTrue(52 verifyObject(53 ISCPayment, SCPayment())54 45 ) 55 46 self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.