- Timestamp:
- 9 Mar 2015, 04:45:52 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/payment.py
r12696 r12700 23 23 import uuid 24 24 from datetime import datetime 25 from zope.component import getUtilitiesFor 25 from zope.catalog.interfaces import ICatalog 26 from zope.component import getUtilitiesFor, getUtility 26 27 from zope.event import notify 27 28 from waeup.ikoba.interfaces import MessageFactory as _ … … 33 34 IPaymentGatewayServicesLister, 34 35 ) 36 37 38 def get_payment(payment_id): 39 """Get payment by payment id. 40 41 If no such payment can be found in catalog, return none. 42 """ 43 cat = getUtility(ICatalog, name='payments_catalog') 44 result_set = [x for x in cat.searchResults( 45 payment_id = (payment_id, payment_id))] 46 if len(result_set): 47 return result_set[0] 48 return None 35 49 36 50
Note: See TracChangeset for help on using the changeset viewer.