Ignore:
Timestamp:
26 May 2012, 05:42:39 (12 years ago)
Author:
Henrik Bettermann
Message:

Determine application fee and set payment attributes in ApplicantsUtility?.setPaymentDetails.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py

    r8046 r8524  
    1919"""
    2020
     21from time import time
    2122import grok
    2223from waeup.kofa.applicants.interfaces import IApplicantsUtils
     
    3637      'form.screening_score': _(u'Process Data'),
    3738      }
     39
     40    def setPaymentDetails(self, container, payment):
     41        """Set the payment data of an applicant.
     42        """
     43        timestamp = "%d" % int(time()*1000)
     44        session = str(container.year)
     45        try:
     46            session_config = grok.getSite()['configuration'][session]
     47        except KeyError:
     48            return _(u'Session configuration object is not available.')
     49        payment.p_id = "p%s" % timestamp
     50        payment.p_item = container.title
     51        payment.p_session = container.year
     52        payment.p_category = 'application'
     53        payment.amount_auth = session_config.application_fee
     54        return None
Note: See TracChangeset for help on using the changeset viewer.