Changeset 12640 for main/waeup.ikoba/branches
- Timestamp:
- 1 Mar 2015, 22:50:48 (10 years ago)
- Location:
- main/waeup.ikoba/branches/uli-fake-gw-provider/src/waeup/ikoba/payments
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/branches/uli-fake-gw-provider/src/waeup/ikoba/payments/catalog.py
r12311 r12640 32 32 payment_id = grok.index.Field(attribute='payment_id') 33 33 payer_id = grok.index.Field(attribute='payer_id') 34 payed_item_id = grok.index.Field(attribute='payed_item_id')35 34 state = grok.index.Field(attribute='state') 36 35 amount = grok.index.Field(attribute='amount') -
main/waeup.ikoba/branches/uli-fake-gw-provider/src/waeup/ikoba/payments/interfaces.py
r12636 r12640 196 196 ) 197 197 198 paye d_item_id = schema.TextLine(199 title=u'Paye d Item ID',200 default=None, 201 required= True,202 198 payee_id = schema.TextLine( 199 title=u'Payee', 200 default=None, 201 required=False, 202 ) 203 203 204 204 gateway_service = schema.Choice( … … 253 253 """ 254 254 255 def add_payment_item(item): 256 """Payments contain payment items. 257 258 Add one 259 """ 260 261 255 262 class IPayer(Interface): 256 263 """A payer. -
main/waeup.ikoba/branches/uli-fake-gw-provider/src/waeup/ikoba/payments/payment.py
r12636 r12640 96 96 notify(grok.ObjectModifiedEvent(self)) 97 97 98 def add_payment_item(self, item): 99 """Add `item` 100 101 Returns the key under which the `item` was stored. 102 """ 103 cnt = 0 104 while str(cnt) in self: 105 cnt += 1 106 self[str(cnt)] = item 107 return str(cnt) 108 98 109 99 110 @attrs_to_fields -
main/waeup.ikoba/branches/uli-fake-gw-provider/src/waeup/ikoba/payments/tests/test_payment.py
r12461 r12640 113 113 assert p1.state == STATE_FAILED 114 114 115 def test_add_payment_item(self): 116 # we can add payment items 117 p1 = Payment() 118 item1 = PaymentItem() 119 result = p1.add_payment_item(item1) 120 assert result == "0" 115 121 116 122 class PaymentItemTests(unittest.TestCase):
Note: See TracChangeset for help on using the changeset viewer.