Changeset 10032 for main/waeup.aaue
- Timestamp:
- 17 Mar 2013, 08:51:34 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/etranzact/browser.py
r9935 r10032 24 24 from zope.catalog.interfaces import ICatalog 25 25 from waeup.kofa.interfaces import IUniversity 26 from waeup.kofa.payments.interfaces import IPaymentWebservice 26 from waeup.kofa.payments.interfaces import IPayer 27 from waeup.kofa.webservices import PaymentDataWebservice 27 28 from waeup.kofa.browser.layout import KofaPage, UtilityView 28 29 from waeup.kofa.students.viewlets import ApprovePaymentActionButton as APABStudent … … 38 39 from waeup.aaue.applicants.interfaces import ICustomApplicantOnlinePayment 39 40 40 #ACCEPTED_IP = ('195.219.3.181', '195.219.3.184') 41 ACCEPTED_IP = None 42 43 44 # Kofa's webservice 45 46 class KofaFeeRequest(grok.View): 47 grok.context(IUniversity)41 class CustomPaymentDataWebservice(PaymentDataWebservice): 42 """A simple webservice to publish payment and payer details on request from 43 accepted IP addresses without authentication. 44 45 Etranzact is asking for the PAYEE_ID which is indeed misleading. 46 These are not the data of the payee but of the payer. And it's 47 not the id of the payer but of the payment. 48 """ 48 49 grok.name('feerequest') 49 grok.require('waeup.Public') 50 51 #ACCEPTED_IP = ('195.219.3.181', '195.219.3.184') 52 ACCEPTED_IP = None 50 53 51 54 def update(self, PAYEE_ID=None): … … 57 60 # and the accepted IP addresses are used. 58 61 if real_ip: 59 self.context.logger.info(' KofaFeeRequestcalled: %s' % real_ip)60 if real_ip and ACCEPTED_IP:61 if real_ip not in ACCEPTED_IP:62 self.context.logger.info('PaymentDataWebservice called: %s' % real_ip) 63 if real_ip and self.ACCEPTED_IP: 64 if real_ip not in self.ACCEPTED_IP: 62 65 self.output = '-4' 63 66 return … … 81 84 return 82 85 try: 83 owner = IPay mentWebservice(results[0])86 owner = IPayer(results[0]) 84 87 full_name = owner.display_fullname 85 88 matric_no = owner.id … … 109 112 academic_session, matric_no, amount, status) 110 113 return 111 112 def render(self):113 return self.output114 114 115 115
Note: See TracChangeset for help on using the changeset viewer.