Changeset 8704 for main/waeup.aaue/trunk/src
- Timestamp:
- 13 Jun 2012, 06:48:48 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/etranzact/browser.py
r8698 r8704 21 21 from xml.dom.minidom import parseString 22 22 import grok 23 from zope.component import getUtility 24 from zope.catalog.interfaces import ICatalog 23 25 from waeup.kofa.interfaces import IUniversity 26 from waeup.kofa.payments.interfaces import IPaymentWebservice 24 27 from waeup.kofa.browser.layout import KofaPage, UtilityView 25 28 from waeup.kofa.students.viewlets import ApprovePaymentActionButton as APABStudent … … 37 40 38 41 def update(self, PAYEE_ID=None): 39 if PAYEE_ID == 'p1331829148308': 40 self.output = 'PayeeName=John Tester&Amount=9500.00' 42 cat = getUtility(ICatalog, name='payments_catalog') 43 results = list(cat.searchResults(p_id=(PAYEE_ID, PAYEE_ID))) 44 if len(results) != 1: 45 self.output = '-1' 41 46 else: 42 self.output = '-1' 47 try: 48 owner = IPaymentWebservice(results[0]).payee 49 except (TypeError, AttributeError): 50 self.output = '-1' 51 return 52 amount = results[0].amount_auth 53 self.output = 'PayeeName=%s&Amount=%s' % (owner, amount) 43 54 return 44 55
Note: See TracChangeset for help on using the changeset viewer.