Changeset 12721 for main/waeup.ikoba/branches/uli-payments/src
- Timestamp:
- 10 Mar 2015, 16:02:49 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/payment.py
r12700 r12721 32 32 IPayment, STATE_UNPAID, STATE_FAILED, STATE_PAID, 33 33 IPaymentGatewayService, IPayer, IPaymentItem, IPayee, 34 IPaymentGatewayServicesLister, 34 IPaymentGatewayServicesLister, IPayableFinder, 35 35 ) 36 36 … … 43 43 cat = getUtility(ICatalog, name='payments_catalog') 44 44 result_set = [x for x in cat.searchResults( 45 payment_id =(payment_id, payment_id))]45 payment_id=(payment_id, payment_id))] 46 46 if len(result_set): 47 47 return result_set[0] 48 return None 49 50 51 def find_payable_from_payable_id(payable_id): 52 """Find a payable from its id. 53 54 Looks up all registered IPayableFinders and returns the first 55 positive result found. 56 """ 57 for name, util in getUtilitiesFor(IPayableFinder): 58 result = util.get_payable_by_id(payable_id) 59 if result is not None: 60 return result 48 61 return None 49 62
Note: See TracChangeset for help on using the changeset viewer.