Changeset 10032


Ignore:
Timestamp:
17 Mar 2013, 08:51:34 (12 years ago)
Author:
Henrik Bettermann
Message:

Class names have changed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/etranzact/browser.py

    r9935 r10032  
    2424from zope.catalog.interfaces import ICatalog
    2525from waeup.kofa.interfaces import IUniversity
    26 from waeup.kofa.payments.interfaces import IPaymentWebservice
     26from waeup.kofa.payments.interfaces import IPayer
     27from waeup.kofa.webservices import PaymentDataWebservice
    2728from waeup.kofa.browser.layout import KofaPage, UtilityView
    2829from waeup.kofa.students.viewlets import ApprovePaymentActionButton as APABStudent
     
    3839from waeup.aaue.applicants.interfaces import ICustomApplicantOnlinePayment
    3940
    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)
     41class 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    """
    4849    grok.name('feerequest')
    49     grok.require('waeup.Public')
     50
     51    #ACCEPTED_IP = ('195.219.3.181', '195.219.3.184')
     52    ACCEPTED_IP = None
    5053
    5154    def update(self, PAYEE_ID=None):
     
    5760        # and the accepted IP addresses are used.
    5861        if real_ip:
    59             self.context.logger.info('KofaFeeRequest called: %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:
    6265                self.output = '-4'
    6366                return
     
    8184            return
    8285        try:
    83             owner = IPaymentWebservice(results[0])
     86            owner = IPayer(results[0])
    8487            full_name = owner.display_fullname
    8588            matric_no = owner.id
     
    109112            academic_session, matric_no, amount, status)
    110113        return
    111 
    112     def render(self):
    113         return self.output
    114114
    115115
Note: See TracChangeset for help on using the changeset viewer.