Ignore:
Timestamp:
20 Jun 2012, 13:37:27 (12 years ago)
Author:
Henrik Bettermann
Message:

Log IP addresses.

Explain why regular school fee tickets can't be added.

File:
1 edited

Legend:

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

    r8764 r8769  
    3333from waeup.aaue.applicants.interfaces import ICustomApplicantOnlinePayment
    3434
     35#ACCEPTED_IP = ('195.219.3.181', '195.219.3.184')
    3536ACCEPTED_IP = None
     37
    3638
    3739# Kofa's webservice
     
    4446    def update(self, PAYEE_ID=None):
    4547        real_ip = self.request.get('HTTP_X_FORWARDED_FOR', None)
     48        # We can forego the logging once eTranzact payments run smoothly
     49        # and the accepted IP addresses are used.
     50        if real_ip:
     51            self.context.logger.info('KofaFeeRequest called: %s' % real_ip)
    4652        if real_ip  and ACCEPTED_IP:
    47             if real_ip != ACCEPTED_IP:
     53            if real_ip not in ACCEPTED_IP:
    4854                self.output = '-4'
    4955                return
     
    122128        success = f.read()
    123129        success = success.replace('\r\n','')
    124         if 'COL1' not in success:
     130        if 'COL6' not in success:
    125131            msg = _('Invalid or unsuccessful callback: ${a}',
    126132                mapping = {'a': success})
     
    248254        applicant = self.context.__parent__
    249255        success, msg, log = query_etranzact(confirmation_number,self.context)
    250         applicant.loggerInfo(ob_class, log)
     256        applicant.writeLogMessage(self, log)
    251257        if not success:
    252258            self.flash(msg)
     
    254260        success, msg, log = self.context.doAfterApplicantPayment()
    255261        if log is not None:
    256             applicant.loggerInfo(ob_class, log)
     262            applicant.writeLogMessage(self, log)
    257263        self.flash(msg)
    258264        return
Note: See TracChangeset for help on using the changeset viewer.